/* ==========================================================
   legal.css — BuzzChat Legal Pages Styles
   The Stellar Corp® · BuzzChat Corp®
   ========================================================== */

/* ----------------------------------------------------------
   LEGAL PAGE LAYOUT
   ---------------------------------------------------------- */
.legal-page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 120px 40px 60px;
}

.legal-container {
  max-width: 820px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   LEGAL HEADER
   ---------------------------------------------------------- */
.legal-header {
  text-align: center;
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  margin-bottom: 24px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #c4b5fd;
}

.legal-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* ----------------------------------------------------------
   LEGAL CONTENT
   ---------------------------------------------------------- */
.legal-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.legal-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
  border-bottom: none;
}

.legal-section h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-primary);
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: #c4b5fd;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.legal-section h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 20px 0 12px;
  color: var(--text-primary);
  padding-left: 50px;
}

.legal-section p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 14px;
  padding-left: 50px;
}

.legal-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 16px;
  padding-left: 50px;
}

.legal-section ul li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-purple);
  opacity: 0.6;
}

.legal-section ul li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-section a {
  color: #c4b5fd;
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 181, 253, 0.3);
  transition: var(--transition);
}

.legal-section a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

/* ----------------------------------------------------------
   CONTACT BOX
   ---------------------------------------------------------- */
.legal-contact-box {
  margin-top: 16px;
  margin-left: 50px;
  padding: 20px 24px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-contact-box p {
  padding-left: 0 !important;
  margin-bottom: 0 !important;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-contact-box i {
  color: #c4b5fd;
  width: 16px;
  text-align: center;
}

/* ----------------------------------------------------------
   COOKIE TABLE
   ---------------------------------------------------------- */
.cookie-table {
  margin: 16px 0 20px;
  margin-left: 50px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cookie-row {
  display: grid;
  grid-template-columns: 140px 1fr 120px;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  align-items: center;
}

.cookie-row:last-child {
  border-bottom: none;
}

.cookie-header-row {
  background: rgba(124, 58, 237, 0.08);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.cookie-type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.cookie-type.essential {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.cookie-type.functional {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.cookie-type.analytics {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.cookie-type.performance {
  background: rgba(124, 58, 237, 0.15);
  color: #c4b5fd;
}

.cookie-row code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ----------------------------------------------------------
   LEGAL NAVIGATION
   ---------------------------------------------------------- */
.legal-nav {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.legal-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  text-align: right;
}

.legal-nav-link:hover {
  border-color: var(--border-hover);
  background: rgba(124, 58, 237, 0.06);
  transform: translateY(-2px);
}

.legal-nav-link span {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.legal-nav-link strong {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 700;
}

.legal-nav-link strong i {
  color: #c4b5fd;
}

.legal-nav-prev {
  text-align: left;
}

/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .legal-page {
    padding: 100px 20px 40px;
  }

  .legal-section h3,
  .legal-section p,
  .legal-section ul {
    padding-left: 0;
  }

  .legal-contact-box,
  .cookie-table {
    margin-left: 0;
  }

  .cookie-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cookie-header-row {
    display: none;
  }

  .legal-nav {
    flex-direction: column;
  }

  .legal-nav-link {
    text-align: left;
  }
}

/* ==========================================================
   LIGHT THEME — Legal Pages
   ========================================================== */
[data-theme="light"] .legal-header h1 {
  background: linear-gradient(135deg, #1a1a2e, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .legal-badge { color: #5b21b6; }
[data-theme="light"] .legal-section a { color: #7c3aed; border-bottom-color: rgba(124,58,237,0.3); }
[data-theme="light"] .legal-section a:hover { color: #5b21b6; border-bottom-color: #5b21b6; }
[data-theme="light"] .section-number { color: #5b21b6; }
[data-theme="light"] .legal-contact-box {
  background: rgba(124,58,237,0.05);
  border-color: rgba(124,58,237,0.12);
}
[data-theme="light"] .legal-contact-box i { color: #7c3aed; }
[data-theme="light"] .cookie-header-row { background: rgba(124,58,237,0.05); }
[data-theme="light"] .cookie-row code { color: #7c3aed; background: rgba(124,58,237,0.06); }
[data-theme="light"] .cookie-type.essential { color: #059669; }
[data-theme="light"] .cookie-type.functional { color: #2563eb; }
[data-theme="light"] .cookie-type.analytics { color: #d97706; }
[data-theme="light"] .cookie-type.performance { color: #7c3aed; }
[data-theme="light"] .legal-nav-link strong i { color: #7c3aed; }
