/* ===== COMPONENTS - Clube da Hora ===== */
/* Componentes reutilizáveis: botões, cards, badges, avatares */

/* ===== BUTTONS ===== */

.btn-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.5;
  font-family: inherit;
}

.btn-modern:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-modern:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Variações de cor */
.btn-primary {
  background: #1e40af; /* Azul primário */
  color: var(--white);
  border-color: #1e40af;
}

.btn-primary:hover {
  background: #1e3a8a; /* Azul mais escuro */
  border-color: #1e3a8a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.35);
  text-decoration: none;
  color: var(--white);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-800);
  text-decoration: none;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Tamanhos de botão */
.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Botão de largura total */
.btn-block {
  width: 100%;
  display: flex;
}

/* Botões de ação (pequenos e quadrados) */
.action-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-base);
  border: 1px solid;
  text-decoration: none;
}

.action-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.action-btn-show {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
  border-color: rgba(59, 130, 246, 0.2);
}

.action-btn-show:hover {
  background: var(--info);
  color: var(--white);
  border-color: var(--info);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.action-btn-edit {
  background: rgba(107, 114, 128, 0.1);
  color: var(--gray-600);
  border-color: rgba(107, 114, 128, 0.2);
}

.action-btn-edit:hover {
  background: var(--gray-600);
  color: var(--white);
  border-color: var(--gray-600);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.action-btn-delete {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.action-btn-delete:hover {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ===== CARDS ===== */

.card-modern {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-base);
  border: 1px solid var(--gray-200);
}

.card-modern:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header-modern {
  background: var(--primary);
  color: var(--white);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header-modern h1,
.card-header-modern h2,
.card-header-modern h3,
.card-header-modern h4,
.card-header-modern h5,
.card-header-modern h6 {
  margin: 0;
  color: var(--white);
  font-weight: 600;
}

.card-body-modern {
  padding: 1.5rem;
}

.card-footer-modern {
  padding: 1rem 1.5rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}

/* ===== BADGES ===== */

.badge-modern {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.badge-warning {
  background: rgba(234, 88, 12, 0.1);
  color: var(--primary);
  border-color: rgba(234, 88, 12, 0.2);
}

.badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
  border-color: rgba(59, 130, 246, 0.2);
}

.badge-gray {
  background: rgba(107, 114, 128, 0.1);
  color: var(--gray-600);
  border-color: rgba(107, 114, 128, 0.2);
}

/* ===== AVATARS ===== */

.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 1.125rem;
}

.avatar-xl {
  width: 64px;
  height: 64px;
  font-size: 1.5rem;
}

/* Avatar com imagem */
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

/* ===== ALERTS ===== */

.alert-modern {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  margin-bottom: 1rem;
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.alert-success {
  background: #f0fdf4;
  border-color: var(--success);
  color: #166534;
}

.alert-danger {
  background: #fef2f2;
  border-color: var(--danger);
  color: #991b1b;
}

.alert-warning {
  background: #fef3c7;
  border-color: var(--warning);
  color: #78350f;
}

.alert-info {
  background: #eff6ff;
  border-color: var(--info);
  color: #1e40af;
}

.alert-modern i {
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

/* ===== DIVIDER ===== */

.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 1rem 0;
}

/* ===== SPINNER ===== */

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}