/* ==========================================================================
   COMPLAINTPOINT LEGAL & COMPLIANCE PAGES STYLES (legal.css)
   WCAG 2.2 AA Compliant | Fluid Typography | Sticky Scrollspy Navigation
   ========================================================================== */

/* Hero Header */
.legal-hero {
  background: linear-gradient(135deg, #0b1528 0%, #172554 50%, #1e3a8a 100%);
  color: #ffffff;
  padding: 4.5rem 1.5rem 3.5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.legal-hero::before {
  content: '';
  position: absolute;
  top: -25%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0) 70%);
  pointer-events: none;
}

.legal-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 600;
  color: #e0e7ff;
  margin-bottom: 1.25rem;
}

.legal-hero-badge .status-dot {
  width: 8px;
  height: 8px;
  background-color: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 10px #34d399;
}

.legal-hero-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.legal-hero-meta {
  font-size: 0.95rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

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

/* Key Takeaway Highlight Cards */
.legal-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 980px;
  margin: 0 auto;
  text-align: left;
}

.legal-summary-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.legal-summary-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-summary-card p {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

/* Photopic Transition Wave */
.legal-hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 32px;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
}

.legal-hero-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Persona Switcher (For Terms of Service) */
.legal-persona-wrapper {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 1.5rem;
  position: sticky;
  top: 72px;
  z-index: 40;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

.legal-persona-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.legal-persona-tabs {
  display: inline-flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
}

.legal-persona-btn {
  padding: 0.55rem 1.4rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  background: none;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.legal-persona-btn:hover {
  color: #0f172a;
}

.legal-persona-btn.active {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.35);
}

.legal-persona-hint {
  font-size: 0.85rem;
  color: #64748b;
}

/* Document Layout: Two Column Layout */
.legal-main-section {
  background-color: #f8fafc;
  padding: 3.5rem 1.5rem 5rem;
}

.legal-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 960px) {
  .legal-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Sticky Sidebar Table of Contents */
.legal-sidebar {
  position: sticky;
  top: 150px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

@media (max-width: 960px) {
  .legal-sidebar {
    position: static;
  }
}

.legal-toc-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.legal-toc-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.legal-toc-link:hover {
  background: #f1f5f9;
  color: #1d4ed8;
}

.legal-toc-link.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  border-left: 3px solid #1d4ed8;
}

/* Content Body */
.legal-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 3rem 2.5rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

@media (max-width: 640px) {
  .legal-content {
    padding: 2rem 1.25rem;
  }
}

.legal-article h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  scroll-margin-top: 160px;
}

.legal-article h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.legal-article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-article p {
  font-size: 1rem;
  color: #334155;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.legal-article ul,
.legal-article ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.legal-article p,
.legal-article ul,
.legal-article ol {
  max-width: 75ch;
}

.legal-article li {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

/* Callouts & Alert Boxes */
.legal-callout {
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
  font-size: 0.925rem;
  line-height: 1.65;
}

.legal-callout.info {
  background: #eff6ff;
  border-left-color: #2563eb;
  color: #1e3a8a;
}

.legal-callout.warning {
  background: #fffbeb;
  border-left-color: #d97706;
  color: #92400e;
}

.legal-callout.success {
  background: #ecfdf5;
  border-left-color: #059669;
  color: #065f46;
}

.legal-callout strong {
  color: inherit;
  font-weight: 700;
}

/* Tab Panels */
.legal-tab-panel {
  display: none;
}

.legal-tab-panel.active {
  display: block;
}

/* Footer Accessibility Overrides */
.site-footer .brand-name,
.footer-logo .brand-name,
.footer-brand-col .brand-name {
  color: #ffffff !important;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Print Friendly Styles */
@media print {
  .site-header,
  .top-bar,
  .legal-persona-wrapper,
  .legal-sidebar,
  .site-footer {
    display: none !important;
  }

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

  .legal-content {
    border: none;
    box-shadow: none;
    padding: 0;
  }
}
