/*
 * GO CLINIC MD — privacy.css
 * Legal pages: Privacy Policy, Notice of Privacy Practices, SMS Terms.
 *
 * Design tokens, header/nav, footer, .container, .breadcrumb, .eyebrow
 * all come from home.css (loaded globally, dependency set in functions.php).
 */

/* =====================================================================
   PAGE HEAD  (breadcrumb + title banner)
   ===================================================================== */
.legal-head {
  padding: 48px 0 44px;
  background: linear-gradient(180deg, var(--peach) 0%, #fff 100%);
  border-bottom: 1px solid var(--border-2);
  position: relative;
  overflow: hidden;
}

.legal-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(0,100,221,0.05) 1px, transparent 0);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at top right, black 0%, transparent 55%);
  pointer-events: none;
}

.legal-head .container { position: relative; }

.legal-head h1 {
  font-size: clamp(28px, 3.2vw, 42px);
  max-width: 24ch;
  margin-top: 10px;
  margin-bottom: 0;
}

/* Lede paragraph under h1 */
.legal-lede {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 56ch;
  margin-top: 14px;
  margin-bottom: 20px;
}

/* Effective date pill */
.legal-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px;
}

.legal-date .date-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* =====================================================================
   CONTENT BODY
   ===================================================================== */
.legal-body {
  padding: 64px 0 96px;
}

/* Two-column layout: sidebar + content */
.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}

/* Grid children default to min-width:auto which lets them blow past
   the column boundary. min-width:0 keeps them inside their track. */
.legal-layout > * {
  min-width: 0;
}

/* =====================================================================
   SIDEBAR TOC
   ===================================================================== */
.legal-sidebar {
  position: sticky;
  top: 100px;
}

.toc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2, #9ca3af);
  margin-bottom: 14px;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 12px;
  border-left: 3px solid transparent;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.15s, border-color 0.15s;
  border-radius: 0 4px 4px 0;
}

.toc-link:hover {
  color: var(--navy);
  border-left-color: var(--border);
  background: var(--surface);
}

.toc-link.active {
  color: var(--blue);
  border-left-color: var(--blue);
  font-weight: 600;
  background: var(--surface);
}

.toc-num {
  font-size: 11px;
  color: var(--muted-2, #9ca3af);
  flex-shrink: 0;
  margin-top: 1px;
  min-width: 20px;
  font-weight: 500;
}

/* =====================================================================
   CONTENT HEADINGS
   ===================================================================== */
.legal-content h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 700;
  color: var(--navy);
  margin-top: 52px;
  margin-bottom: 18px;
  padding-top: 8px;
  scroll-margin-top: 120px;
}

.legal-content h2:first-child { margin-top: 0; }

.h2-dash {
  color: var(--blue);
  font-weight: 300;
  font-size: 1.3em;
  line-height: 1;
  flex-shrink: 0;
}

.legal-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 24px;
  margin-bottom: 10px;
}

/* =====================================================================
   PROSE TYPOGRAPHY
   ===================================================================== */
.legal-content p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.legal-content ul,
.legal-content ol {
  padding-left: 22px;
  margin-bottom: 1rem;
}

.legal-content li {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0.35rem;
}

.legal-content i {
  color: var(--navy);
  font-style: italic;
}

.legal-content a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content a:hover { color: var(--blue-hover); }

.legal-content a.d-block {
  display: block;
  margin-bottom: 6px;
}

/* =====================================================================
   DATA TABLE  (CCPA disclosure table in Privacy Policy)
   ===================================================================== */
.table_component {
  overflow-x: auto;
  width: 100%;
  max-width: 100%;        /* can't escape its grid column */
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
}

.table_component table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  min-width: 420px;       /* allows table to be readable; wrapper scrolls it */
}

.table_component th {
  background: var(--surface);
  color: var(--navy);
  font-weight: 600;
  font-family: 'Figtree', system-ui, sans-serif;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.table_component th:last-child { border-right: none; }

.table_component td {
  padding: 12px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--border-2);
  border-right: 1px solid var(--border-2);
  vertical-align: top;
  line-height: 1.6;
  font-size: 14px;
}

.table_component td:last-child { border-right: none; }
.table_component tr:last-child td { border-bottom: none; }
.table_component tr:nth-child(even) td { background: var(--surface); }

/* =====================================================================
   ACCOUNT DELETION FORM
   ===================================================================== */
.deletion-form-wrap {
  max-width: 560px;
}

/* =====================================================================
   404 PAGE
   ===================================================================== */
.not-found-wrap {
  padding: 24px 0 48px;
  max-width: 560px;
}

.not-found-code {
  font-size: clamp(80px, 12vw, 140px);
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.15;
  letter-spacing: -4px;
}

.not-found-msg {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 28px;
}

.not-found-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
  .legal-head { padding: 36px 0 28px; }
  .legal-body { padding: 40px 0 72px; }
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .legal-sidebar {
    position: static;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    background: var(--surface);
    width: 100%;
    box-sizing: border-box;
  }
  .legal-content {
    width: 100%;
    overflow-x: hidden;  /* last-resort clip so content never bleeds */
  }
  .legal-content p,
  .legal-content li { font-size: 14.5px; }
}

@media (max-width: 520px) {
  .legal-head { padding: 28px 0 22px; }
  .legal-body { padding: 32px 0 56px; }
  .legal-lede { font-size: 15px; }
  .legal-content h2 { font-size: 18px; }
  .table_component table { min-width: 340px; font-size: 13px; }
  .table_component th,
  .table_component td { padding: 10px 12px; }
}
