/* ==========================================================================
   THEUZINHOTV - ESTILOS DAS PÁGINAS LEGAIS (TERMOS E PRIVACIDADE)
   ========================================================================== */

@import url('../css/variables.css');

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body.legal-page {
  background-color: var(--bg-main, #06090f);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb, 0, 132, 255), 0.12) 0%, rgba(6, 9, 15, 0.98) 60%),
    linear-gradient(180deg, #06090f 0%, #030508 100%);
  background-attachment: fixed;
  color: var(--text-primary, #ffffff);
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TOPO FIXO / HEADER DE NAVEGAÇÃO
   ========================================================================== */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  height: 70px;
}

.legal-header-inner {
  max-width: 1060px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Marca Oficial */
.legal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-brand, 'Helvetica Neue', Helvetica, Arial, sans-serif);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  transition: opacity 0.2s ease;
}

.legal-brand:hover {
  opacity: 0.9;
}

.legal-brand .brand-tv {
  color: var(--accent-blue, #0084ff);
  text-shadow: 0 0 14px rgba(var(--accent-rgb, 0, 132, 255), 0.5);
  margin-left: 2px;
}

/* Abas de Navegação (Termos vs Privacidade) */
.legal-nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.legal-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.legal-nav-tab svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.legal-nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.legal-nav-tab.active {
  color: var(--accent-on-primary, #ffffff);
  background: var(--accent-gradient, linear-gradient(135deg, #0084ff 0%, #00d2ff 100%));
  box-shadow: 0 2px 10px rgba(var(--accent-rgb, 0, 132, 255), 0.35);
}

/* Botão Voltar ao Início */
.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-back-home svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.btn-back-home:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-2px);
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL
   ========================================================================== */
.legal-main {
  flex: 1;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Hero / Cabeçalho do Documento */
.legal-hero {
  text-align: center;
  margin-bottom: 40px;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-cyan, #00d2ff);
  background: rgba(var(--accent-cyan-rgb, 0, 210, 255), 0.1);
  border: 1px solid rgba(var(--accent-cyan-rgb, 0, 210, 255), 0.25);
  border-radius: 999px;
  margin-bottom: 16px;
}

.legal-badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-cyan, #00d2ff);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan, #00d2ff);
}

.legal-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.25;
}

.legal-subtitle {
  font-size: 1.02rem;
  color: var(--text-secondary, #94a3b8);
  max-width: 720px;
  margin: 0 auto 16px;
}

.legal-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
}

.legal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legal-meta-item svg {
  width: 14px;
  height: 14px;
}

/* Sumário Rápido (Table of Contents) */
.legal-toc-card {
  background: var(--bg-card, rgba(15, 22, 36, 0.88));
  border: 1px solid var(--border-card, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.legal-toc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.legal-toc-header svg {
  width: 20px;
  height: 20px;
  color: var(--accent-blue, #0084ff);
}

.legal-toc-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legal-toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.legal-toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary, #94a3b8);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.legal-toc-link span.num {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--accent-blue, #0084ff);
  background: rgba(var(--accent-rgb, 0, 132, 255), 0.12);
  padding: 2px 7px;
  border-radius: 6px;
}

.legal-toc-link:hover {
  color: #ffffff;
  background: rgba(var(--accent-rgb, 0, 132, 255), 0.08);
  border-color: rgba(var(--accent-rgb, 0, 132, 255), 0.25);
  transform: translateX(3px);
}

/* ==========================================================================
   SEÇÕES DE CLÁUSULAS (LEGAL SECTIONS)
   ========================================================================== */
.legal-card-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.legal-section-card {
  background: var(--bg-card, rgba(15, 22, 36, 0.88));
  border: 1px solid var(--border-card, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.2s ease;
  scroll-margin-top: 90px;
}

.legal-section-card:hover {
  border-color: rgba(var(--accent-rgb, 0, 132, 255), 0.25);
}

.legal-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
}

.legal-section-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient, linear-gradient(135deg, #0084ff 0%, #00d2ff 100%));
  color: var(--accent-on-primary, #ffffff);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb, 0, 132, 255), 0.35);
  flex-shrink: 0;
}

.legal-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.legal-section-content {
  font-size: 0.94rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.legal-section-content p {
  line-height: 1.7;
}

.legal-section-content strong {
  color: #ffffff;
  font-weight: 600;
}

.legal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 0;
}

.legal-list li {
  position: relative;
  padding-left: 24px;
  line-height: 1.6;
}

.legal-list li::before {
  content: "•";
  position: absolute;
  left: 8px;
  top: 0;
  color: var(--accent-blue, #0084ff);
  font-size: 1.2rem;
  line-height: 1.4;
}

/* Caixas de Destaque / Callouts */
.legal-callout {
  background: rgba(0, 132, 255, 0.08);
  border-left: 4px solid var(--accent-blue, #0084ff);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 10px 0;
}

.legal-callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: var(--color-warning, #f59e0b);
}

.legal-callout-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-callout-title svg {
  width: 16px;
  height: 16px;
  color: var(--accent-blue, #0084ff);
}

.legal-callout-warning .legal-callout-title svg {
  color: var(--color-warning, #f59e0b);
}

.legal-callout p {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   RODAPÉ OFICIAL DA PÁGINA LEGAL
   ========================================================================== */
.legal-footer {
  background: #030508;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  padding: 36px 24px;
  margin-top: auto;
}

.legal-footer-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.legal-footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.legal-footer-link {
  color: var(--text-secondary, #94a3b8);
  font-size: 0.84rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-footer-link:hover,
.legal-footer-link.active {
  color: var(--accent-cyan, #00d2ff);
}

.legal-footer-link.active {
  font-weight: 600;
}

.legal-inline-link {
  color: var(--accent-cyan, #00d2ff);
  text-decoration: underline;
}

.legal-redirect-body {
  background-color: #06090f;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  text-align: center;
}

.legal-redirect-link {
  color: var(--accent-blue, #0084ff);
  text-decoration: underline;
}

.legal-footer-copy {
  font-size: 0.78rem;
  color: var(--text-dimmed, #475569);
}

/* Botão Flutuante Voltar ao Topo */
.legal-btn-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-card-solid, #0f1624);
  border: 1px solid var(--border-card, rgba(255, 255, 255, 0.12));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 90;
}

.legal-btn-top.visible {
  opacity: 1;
  visibility: visible;
}

.legal-btn-top:hover {
  background: var(--accent-blue, #0084ff);
  color: var(--accent-on-primary, #ffffff);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb, 0, 132, 255), 0.4);
}

.legal-btn-top svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   RESPONSIVIDADE (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 768px) {
  .legal-header-inner {
    padding: 0 16px;
  }

  .legal-nav-tabs {
    display: none; /* Em telas menores, foca no botão de voltar */
  }

  .legal-title {
    font-size: 1.75rem;
  }

  .legal-subtitle {
    font-size: 0.92rem;
  }

  .legal-section-card {
    padding: 24px 18px;
  }

  .legal-toc-card {
    padding: 18px;
  }

  .legal-toc-grid {
    grid-template-columns: 1fr;
  }
}
