/* =============================================
   Tee Time Snipe — Legal Pages (Terms, Privacy)
   Layered on top of style-index.css
   ============================================= */

/* ---- Header ---- */
.legal-header {
  background: var(--nav-bg);
  padding: 120px 0 56px 0;
  color: #fff;
}

.legal-header .legal-eyebrow {
  display: inline-block;
  background: rgba(44, 206, 102, .14);
  border: 1px solid rgba(44, 206, 102, .35);
  color: var(--green-accent);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.legal-header h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.legal-header .legal-intro {
  color: rgba(255, 255, 255, .72);
  max-width: 720px;
  font-size: 1.05rem;
}

.legal-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 24px;
  font-size: .875rem;
  color: var(--text-muted);
}

.legal-dates strong { color: #fff; font-weight: 600; }

/* ---- Summary callout ---- */
.legal-summary {
  background: var(--green-light);
  border: 1px solid rgba(15, 81, 50, .12);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 44px;
}

.legal-summary h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Wins over the `.legal-content ul` disc rule defined further down. */
.legal-content .legal-summary ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.legal-summary li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 9px;
  color: var(--card-dark);
  font-size: .95rem;
}

.legal-summary li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green-accent);
  font-weight: 700;
}

.legal-summary .legal-summary-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 81, 50, .12);
  font-size: .85rem;
  color: var(--text-gray);
}

/* ---- Body layout ---- */
.legal-body { padding: 56px 0 80px 0; }

.legal-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 56px;
  align-items: start;
}

/* ---- Table of contents ---- */
.legal-toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  min-width: 0;
}

.legal-toc h2 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  border-left: 2px solid #E7EAE8;
}

.legal-toc li { counter-increment: toc; }

.legal-toc a {
  display: block;
  padding: 6px 0 6px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--text-gray);
  font-size: .875rem;
  line-height: 1.35;
  transition: color .15s, border-color .15s;
}

.legal-toc a::before {
  content: counter(toc) '. ';
  color: var(--text-muted);
}

.legal-toc a:hover,
.legal-toc a.active {
  color: var(--green-dark);
  border-left-color: var(--green-accent);
  font-weight: 600;
}

/* ---- Content ---- */
/* min-width:0 stops the min-content width of a wide table from blowing out the
   grid column, which would otherwise defeat .legal-table-wrap's overflow-x. */
.legal-content {
  max-width: 760px;
  min-width: 0;
}

.legal-content section { scroll-margin-top: 88px; margin-bottom: 44px; }

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--card-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #E7EAE8;
}

.legal-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--green-dark);
  margin: 26px 0 10px 0;
}

.legal-content p,
.legal-content li {
  color: var(--text-gray);
  font-size: .975rem;
  line-height: 1.7;
}

.legal-content p { margin-bottom: 14px; }

.legal-content ul,
.legal-content ol {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 16px;
}

.legal-content ol { list-style: decimal; }
.legal-content li { margin-bottom: 8px; }
.legal-content li::marker { color: var(--green-accent); }

.legal-content a {
  color: var(--green-dark);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.legal-content strong { color: var(--card-dark); font-weight: 600; }

/* ---- Emphasis blocks ---- */
.legal-note {
  background: #F6F8F7;
  border-left: 3px solid var(--green-accent);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 18px 0;
}

.legal-note p:last-child { margin-bottom: 0; }

.legal-note.legal-note-alert {
  background: #FFF8EC;
  border-left-color: #E8A33D;
}

/* ---- Data table ---- */
.legal-table-wrap {
  overflow-x: auto;
  margin: 18px 0 22px 0;
  border: 1px solid #E7EAE8;
  border-radius: 10px;
}

.legal-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: .9rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #E7EAE8;
  vertical-align: top;
  color: var(--text-gray);
}

.legal-table th {
  background: #F6F8F7;
  color: var(--card-dark);
  font-weight: 600;
}

.legal-table tr:last-child td { border-bottom: none; }

/* ---- Contact card ---- */
.legal-contact {
  background: var(--card-dark);
  border-radius: 14px;
  padding: 28px 32px;
  color: #fff;
}

.legal-contact h3 { color: var(--green-accent); margin-top: 0; }
.legal-contact p { color: rgba(255, 255, 255, .75); }
.legal-contact a { color: var(--green-accent); }
.legal-contact a:hover { color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; }

  .legal-toc {
    position: static;
    max-height: none;
    background: #F6F8F7;
    border-radius: 12px;
    padding: 20px 24px;
  }

  .legal-toc ol {
    columns: 2;
    column-gap: 28px;
    border-left: none;
  }

  .legal-toc a { padding-left: 0; border-left: none; }
  .legal-toc a:hover, .legal-toc a.active { border-left: none; }
}

@media (max-width: 640px) {
  .legal-header { padding: 100px 0 40px 0; }
  .legal-header h1 { font-size: 2rem; }
  .legal-toc ol { columns: 1; }
  .legal-summary { padding: 20px; }
  .legal-contact { padding: 24px; }
}
