/* auth.css - Estilos modernos para páginas de autenticação */

:root {
  /* Sistema de cores principal */
  --primary-hue: 246;
  --primary-sat: 70%;
  --primary-rgb: 79, 70, 229;
  --primary-color: hsl(var(--primary-hue), var(--primary-sat), 59%);
  --primary-color-light: hsl(var(--primary-hue), var(--primary-sat), 67%);
  --primary-color-dark: hsl(var(--primary-hue), var(--primary-sat), 45%);
  --primary-focus: hsla(var(--primary-hue), var(--primary-sat), 59%, 0.25);
  
  /* Sistema de cores secundário */
  --secondary-hue: 160;
  --secondary-sat: 84%;
  --secondary-rgb: 16, 185, 129;
  --secondary-color: hsl(var(--secondary-hue), var(--secondary-sat), 39%);
  
  /* Cores de fundo */
  --bg-color: #f9fafb;
  --card-bg: #ffffff;
  --card-bg-dark: #1f2937;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  
  /* Cores de texto */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-color: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  
  /* Cores de borda */
  --border-color: #e5e7eb;
  --border-color-light: #f3f4f6;
  
  /* Cores de estado */
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  
  /* Arredondamentos */
  --border-radius-sm: 0.25rem;
  --border-radius: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-full: 9999px;
  --input-radius: 0.5rem;
  
  /* Transições */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Tipografia */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reset e estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--bg-color);
  min-height: 100vh;
  min-height: 100dvh; /* Suporte para altura dinâmica em dispositivos móveis */
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-color-light);
  text-decoration: underline;
}

/* Layout da página de autenticação */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem;
  background-color: var(--bg-color);
  background-image: url('../img/auth-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
  isolation: isolate; /* Cria um novo contexto de empilhamento */
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0; /* Substitui top, right, bottom, left: 0 */
  background: linear-gradient(135deg, 
    hsla(var(--primary-hue), var(--primary-sat), 10%, 0.92), 
    hsla(var(--primary-hue), var(--primary-sat), 20%, 0.85));
  z-index: -1;
}

.auth-container {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.6s ease-out;
}

.auth-card {
  background-color: var(--glass-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  padding: 0;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  transform: translateZ(0); /* Otimização para dispositivos móveis */
  will-change: transform, box-shadow; /* Otimização de performance */
}

.auth-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Cabeçalho */
.auth-header {
  padding: 2.5rem 2.5rem 1.5rem;
  text-align: center;
  position: relative;
}

.auth-logo {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
  position: relative;
  transition: var(--transition);
}

.auth-logo::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 40px;
  height: 3px;
  background: var(--primary-color);
  transform: translateX(-50%);
  border-radius: 3px;
  transition: width var(--transition);
}

.auth-logo:hover {
  transform: translateY(-2px);
}

.auth-logo:hover::after {
  width: 60px;
}

.auth-header h1 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Formulário */
.auth-form {
  padding: 1.5rem 2.5rem 2.5rem;
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 1.75rem;
  position: relative;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 2;
}

.input-icon-right {
  position: absolute;
  right: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  z-index: 2;
}

.input-icon-right:hover {
  color: var(--primary-color);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  border-radius: var(--input-radius);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) inset;
  -webkit-appearance: none; /* Remove estilo padrão em iOS */
}

.form-control:focus {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 0 0 3px var(--primary-focus);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Campo de senha */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  background: none;
  border: none;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.password-toggle:hover, 
.password-toggle:focus {
  color: var(--primary-color);
}

.password-toggle:focus {
  outline: none;
}

.form-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-left: 0;
  user-select: none;
}

.form-check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
  margin-top: 0;
  margin-right: 0;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input:checked::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%) rotate(45deg);
}

.form-check-input:focus {
  border-color: var(--primary-color-light);
  box-shadow: 0 0 0 3px var(--primary-focus);
  outline: none;
}

.form-check-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Link para recuperação de senha */
.forgot-password {
  display: block;
  text-align: right;
  font-size: 0.875rem;
  margin-top: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.forgot-password:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: var(--input-radius);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-block {
  display: flex;
  width: 100%;
  margin-top: 2rem;
}

.btn-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
  color: white;
  border: none;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition-slow);
}

.btn-gradient:hover {
  background: linear-gradient(135deg, var(--primary-color-light), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(var(--primary-rgb), 0.4);
}

.btn-gradient:hover::before {
  left: 100%;
}

.btn-gradient:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(var(--primary-rgb), 0.3);
}

/* Divisor com texto */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--glass-border);
}

.divider::before {
  margin-right: 1rem;
}

.divider::after {
  margin-left: 1rem;
}

/* Botões de login social */
.social-login {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--input-radius);
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.social-btn i {
  font-size: 1.25rem;
}

/* Rodapé do card */
.auth-footer {
  text-align: center;
  padding: 1.75rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.95rem;
  color: var(--text-secondary);
  background-color: rgba(0, 0, 0, 0.1);
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.auth-footer a:hover {
  color: var(--primary-color-light);
  text-decoration: underline;
}

/* Alertas */
.alert {
  position: relative;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert::before {
  content: '';
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.alert-success {
  color: #0f766e;
  background-color: #d1fae5;
  border-color: #a7f3d0;
}

.alert-success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%230f766e'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.alert-danger {
  color: #b91c1c;
  background-color: #fee2e2;
  border-color: #fecaca;
}

.alert-danger::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23b91c1c'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.alert-warning {
  color: #92400e;
  background-color: #fef3c7;
  border-color: #fde68a;
}

.alert-warning::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2392400e'%3E%3Cpath fill-rule='evenodd' d='M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.alert-info {
  color: #1e40af;
  background-color: #dbeafe;
  border-color: #bfdbfe;
}

.alert-info::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231e40af'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2h-1V9a1 1 0 00-1-1z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

/* Mensagens de erro e sucesso */
.form-message {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.error-message {
  color: var(--danger-color);
}

.success-message {
  color: var(--success-color);
}

/* Sistema de afiliados */
.affiliate-badge {
  background: linear-gradient(135deg, var(--primary-color-light), var(--primary-color));
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-top: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.3);
  animation: pulse 2s infinite;
}

.affiliate-info {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color-light);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Animações */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); }
}

/* Media queries para responsividade */
@media (max-width: 576px) {
  .auth-page {
    padding: 1rem 0.75rem;
    align-items: flex-start;
    background-attachment: scroll; /* Melhor performance em mobile */
  }
  
  .auth-container {
    margin-top: 2rem;
    margin-bottom: 2rem;
  }
  
  .auth-card {
    border-radius: calc(var(--border-radius-lg) - 2px);
  }
  
  .auth-header {
    padding: 2rem 1.5rem 1rem;
  }
  
  .auth-logo {
    font-size: 2rem;
  }
  
  .auth-header h1 {
    font-size: 1.35rem;
  }
  
  .auth-form {
    padding: 1rem 1.5rem 1.75rem;
  }
  
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  .form-control {
    padding: 0.75rem 0.875rem 0.75rem 2.25rem;
    font-size: 0.95rem;
  }
  
  .btn {
    padding: 0.75rem 1.25rem;
  }
  
  .auth-footer {
    padding: 1.25rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .social-login {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Suporte para telas muito pequenas */
@media (max-width: 360px) {
  .auth-header {
    padding: 1.5rem 1.25rem 0.75rem;
  }
  
  .auth-logo {
    font-size: 1.75rem;
  }
  
  .auth-form {
    padding: 0.75rem 1.25rem 1.5rem;
  }
  
  .auth-footer {
    padding: 1rem 1.25rem;
    font-size: 0.8rem;
  }
}

/* Suporte para telas grandes */
@media (min-width: 992px) {
  .auth-container {
    max-width: 480px;
  }
}

/* Suporte para modo escuro do sistema */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #111827;
    --card-bg: #1f2937;
    --text-color: #f9fafb;
    --text-muted: #9ca3af;
    --text-light: #6b7280;
    --border-color: #374151;
    --border-color-light: #374151;
  }
  
  .auth-page::before {
    background: linear-gradient(135deg, 
      rgba(15, 23, 42, 0.92), 
      rgba(30, 41, 59, 0.85));
  }
}

/* Suporte para preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  .auth-container,
  .auth-card,
  .auth-logo,
  .btn,
  .form-control,
  .password-toggle,
  .forgot-password,
  .social-btn {
    transition: none;
    animation: none;
  }
  
  .btn::before {
    display: none;
  }
  
  @keyframes pulse {
    0%, 100% { box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.3); }
  }
}

/* Suporte para alto contraste */
@media (forced-colors: active) {
  .auth-card {
    border: 2px solid CanvasText;
  }
  
  .form-control {
    border: 1px solid CanvasText;
  }
  
  .btn {
    border: 1px solid CanvasText;
  }
  
  .form-check-input:checked::after {
    border-color: Canvas;
  }
}

/* Sistema de Alertas Aprimorado */
.alert {
  --alert-padding-x: 1.25rem;
  --alert-padding-y: 1rem;
  --alert-border-width: 1px;
  --alert-icon-size: 1.5rem;
  --alert-gap: 0.875rem;
  
  position: relative;
  padding: var(--alert-padding-y) var(--alert-padding-x);
  padding-left: calc(var(--alert-padding-x) + var(--alert-icon-size) + var(--alert-gap));
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  animation: alertFadeIn 0.4s ease-out;
  border-left-width: 4px;
  border-left-style: solid;
}

/* Ícone do alerta */
.alert::before {
  content: '';
  position: absolute;
  left: var(--alert-padding-x);
  top: var(--alert-padding-y);
  width: var(--alert-icon-size);
  height: var(--alert-icon-size);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}

/* Conteúdo do alerta */
.alert-content {
  flex: 1;
}

/* Título do alerta (opcional) */
.alert-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  display: block;
}

/* Botão de fechar */
.alert-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  opacity: 0.6;
  cursor: pointer;
  transition: all 0.2s ease;
  color: currentColor;
}

.alert-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.05);
}

.alert-close:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.alert-close::before,
.alert-close::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
}

.alert-close::before {
  transform: rotate(45deg);
}

.alert-close::after {
  transform: rotate(-45deg);
}

/* Variantes de alerta */
.alert-danger {
  background: rgba(var(--danger-rgb), 0.08);
  border: var(--alert-border-width) solid rgba(var(--danger-rgb), 0.15);
  border-left-color: var(--danger);
  color: var(--danger);
}

.alert-danger::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ef4444'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-7v2h2v-2h-2zm0-8v6h2V7h-2z'/%3E%3C/svg%3E");
}

.alert-info {
  background: rgba(var(--info-rgb), 0.08);
  border: var(--alert-border-width) solid rgba(var(--info-rgb), 0.15);
  border-left-color: var(--info);
  color: var(--info);
}

.alert-info::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233b82f6'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-11v6h2v-6h-2zm0-4v2h2V7h-2z'/%3E%3C/svg%3E");
}

.alert-success {
  background: rgba(var(--success-rgb), 0.08);
  border: var(--alert-border-width) solid rgba(var(--success-rgb), 0.15);
  border-left-color: var(--success);
  color: var(--success);
}

.alert-success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310b981'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-.997-6l7.07-7.071-1.414-1.414-5.656 5.657-2.829-2.829-1.414 1.414L11.003 16z'/%3E%3C/svg%3E");
}

.alert-warning {
  background: rgba(var(--warning-rgb), 0.08);
  border: var(--alert-border-width) solid rgba(var(--warning-rgb), 0.15);
  border-left-color: var(--warning);
  color: var(--warning);
}

.alert-warning::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f59e0b'%3E%3Cpath d='M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-1-7v2h2v-2h-2zm0-8v6h2V7h-2z'/%3E%3C/svg%3E");
}

/* Variantes de tamanho */
.alert-sm {
  --alert-padding-y: 0.5rem;
  --alert-padding-x: 0.75rem;
  --alert-icon-size: 1.25rem;
  --alert-gap: 0.625rem;
  font-size: 0.875rem;
}

.alert-lg {
  --alert-padding-y: 1.25rem;
  --alert-padding-x: 1.5rem;
  --alert-icon-size: 1.75rem;
  --alert-gap: 1rem;
  font-size: 1.05rem;
}

/* Variantes de estilo */
.alert-filled {
  color: white;
}

.alert-filled.alert-danger {
  background-color: var(--danger);
  border-color: var(--danger);
}

.alert-filled.alert-info {
  background-color: var(--info);
  border-color: var(--info);
}

.alert-filled.alert-success {
  background-color: var(--success);
  border-color: var(--success);
}

.alert-filled.alert-warning {
  background-color: var(--warning);
  border-color: var(--warning);
}

.alert-filled::before {
  filter: brightness(0) invert(1);
}

/* Alerta com borda arredondada */
.alert-rounded {
  border-radius: 9999px;
}

/* Alerta com sombra elevada */
.alert-elevated {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Animação de entrada */
@keyframes alertFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animação de saída (para uso com JavaScript) */
.alert-dismissing {
  animation: alertFadeOut 0.3s forwards;
}

@keyframes alertFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Suporte para modo escuro */
@media (prefers-color-scheme: dark) {
  .alert {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  
  .alert-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* Suporte para preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  .alert {
    animation: none;
    transition: none;
  }
  
  .alert-close {
    transition: none;
  }
  
  .alert-dismissing {
    animation: none;
    opacity: 0;
  }
}