/**
 * MenteUp - Base Styles & Reset
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-family-base);
  font-size: 0.9375rem; /* 15px */
  color: var(--text-main);
  background-color: var(--bg-page);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-family: var(--font-family-sans-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1 {
  font-size: 2.25rem;
  letter-spacing: -0.035em;
  font-weight: 700;
}

h2 {
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

h4 {
  font-size: 1.05rem;
  font-weight: 600;
}

.font-display {
  font-family: var(--font-family-display);
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

p.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Focus States Acessíveis */
:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-subtle);
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* App View Root */
#app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Badge & Tag */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px 9px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

.badge-primary {
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-border);
}

.badge-accent {
  background: var(--accent-50);
  color: var(--accent-700);
  border: 1px solid var(--accent-border);
}

.badge-success {
  background: var(--success-50);
  color: var(--success-600);
  border: 1px solid var(--success-border);
}

.badge-neutral {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Acessibilidade & Navegação por Teclado (WCAG 2.1 AA)
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #7c3aed;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  font-size: 0.875rem;
  z-index: 99999;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
  transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

/* Focus Visible Aprimorado para Navegação por Teclado */
:focus-visible {
  outline: 2px solid #7c3aed !important;
  outline-offset: 2px !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #7c3aed !important;
  outline-offset: 2px !important;
}

/* ==========================================================================
   Banner de Consentimento de Cookies (LGPD)
   ========================================================================== */
.cookie-banner-backdrop {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 16px 20px;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.cookie-banner-card {
  pointer-events: auto;
  max-width: 980px;
  width: 100%;
  background: var(--bg-surface, #ffffff);
  border: 1.5px solid var(--border-medium, #e2e8f0);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(124, 58, 237, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  animation: slideUpCookie 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpCookie {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookie-banner-info {
  flex: 1;
  min-width: 280px;
}

.cookie-banner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin-bottom: 6px;
}

.cookie-banner-text {
  font-size: 0.8125rem;
  color: var(--text-secondary, #475569);
  line-height: 1.55;
  margin: 0;
}

.cookie-banner-text a {
  color: #7c3aed;
  text-decoration: underline;
  font-weight: 600;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .cookie-banner-card {
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    gap: 16px;
  }
  .cookie-banner-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Tipografia e Formatação de Modais Legais (Termos, Privacidade, Reembolso)
   ========================================================================== */
.legal-modal-body {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary, #334155);
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 8px;
}

.legal-badge-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legal-meta-box {
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.8125rem;
  margin-bottom: 20px;
  color: var(--text-muted, #64748b);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.legal-section-block {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light, #f1f5f9);
}

.legal-section-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-list {
  padding-left: 20px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-highlight-box {
  background: #f5f3ff;
  border-left: 3px solid #7c3aed;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 0.8125rem;
  color: #4c1d95;
}

.legal-highlight-warning {
  background: #fffbeb;
  border-left: 3px solid #d97706;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 0.8125rem;
  color: #92400e;
}

