/**
 * UzaDebt - Editorial Legal & Compliance Stylesheet
 * Shared across privacy.php, terms.php, complaints.php, and compliance.php
 * Theme: Warm Paper Canvas (#f8f4ec), White Reading Sheet (#ffffff), Royal Purple (#6b21a8)
 */

.legal-band {
  background: #f8f4ec;
  color: #1c1b18;
  padding: 40px 0 72px;
  border-bottom: 1px solid #e4decb;
}

.legal-shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
  box-sizing: border-box;
  width: 100%;
}

/* Top Header & Editorial Meta */
.legal-top-header {
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e4decb;
}

.legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b21a8;
  margin-bottom: 8px;
}

.legal-kicker::before {
  content: "";
  width: 16px;
  height: 2px;
  background: #6b21a8;
}

.legal-top-header h1 {
  font-family: var(--font);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  color: #1c1b18;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: 0 0 10px;
}

.legal-meta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #6e6a61;
  line-height: 1.5;
}

.legal-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d5cdbc;
  flex-shrink: 0;
}

/* Policy Tab Bar */
.legal-doc-tabs {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-bottom: 2px solid #e4decb;
  padding: 0 2px;
  margin: 0 0 32px;
  width: 100%;
  box-sizing: border-box;
}

.legal-doc-tabs::-webkit-scrollbar {
  display: none;
}

.legal-doc-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 4px 12px;
  margin-bottom: -2px;
  border-bottom: 3px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #4b4840;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.legal-doc-tab .ic {
  width: 15px;
  height: 15px;
  color: #6e6a61;
  flex-shrink: 0;
}

.legal-doc-tab:hover {
  color: #1c1b18;
}

.legal-doc-tab:hover .ic {
  color: #1c1b18;
}

.legal-doc-tab.active {
  color: #6b21a8;
  border-bottom-color: #6b21a8;
  font-weight: 700;
}

.legal-doc-tab.active .ic {
  color: #6b21a8;
}

/* Content Grid & Sidebar */
.legal-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legal-toc-card,
.legal-contact-card {
  background: #ffffff;
  border: 1px solid #e4decb;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(28, 27, 24, 0.04);
  box-sizing: border-box;
}

.legal-toc-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #6e6a61;
  margin: 0 0 12px;
}

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

.legal-toc-list a {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #4b4840;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}

.legal-toc-list a:hover {
  color: #6b21a8;
  background: #faf7f1;
  border-left-color: #6b21a8;
}

.legal-contact-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1c1b18;
  margin: 0 0 6px;
}

.legal-contact-card p {
  font-size: 12.5px;
  line-height: 1.55;
  color: #6e6a61;
  margin: 0 0 12px;
}

.legal-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: #6b21a8;
  text-decoration: none;
}

.legal-contact-link .ic {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* White Reading Sheet */
.legal-sheet {
  background: #ffffff;
  border: 1px solid #e4decb;
  padding: 40px 44px;
  box-shadow: 0 2px 12px rgba(28, 27, 24, 0.05);
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
  color: #1c1b18;
}

.legal-sheet,
.legal-section p,
.legal-section li {
  overflow-wrap: break-word;
  word-break: break-word;
}

.legal-section {
  padding-top: 26px;
  margin-top: 26px;
  border-top: 1px solid #f0ebe0;
  scroll-margin-top: 96px;
}

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

.legal-sec-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: #6b21a8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.legal-section h2 {
  font-size: 21px;
  font-weight: 800;
  color: #1c1b18;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.legal-section p,
.legal-section li {
  font-size: 15px;
  color: #4b4840;
  line-height: 1.75;
  margin: 0 0 12px;
}

.legal-section ul {
  padding-left: 20px;
  margin: 10px 0 16px;
}

.legal-section li strong,
.legal-section p strong {
  color: #1c1b18;
}

.legal-section a {
  color: #6b21a8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 18px 0 22px;
  border: 1px solid #e4decb;
  background: #ffffff;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.legal-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.legal-table th {
  background: #fbf8f2;
  color: #1c1b18;
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #e4decb;
  white-space: nowrap;
}

.legal-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0ebe0;
  color: #4b4840;
  vertical-align: top;
  line-height: 1.55;
}

.legal-table td:first-child {
  font-weight: 600;
  color: #1c1b18;
}

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

/* Tablet Breakpoint */
@media (max-width: 960px) {
  .legal-band {
    padding: 28px 0 56px;
  }
  .legal-shell {
    padding: 0 24px;
  }
  .legal-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .legal-sidebar {
    display: contents;
  }
  .legal-toc-card {
    order: 1;
    width: 100%;
  }
  .legal-toc-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
  }
  .legal-sheet {
    order: 2;
    padding: 30px 24px;
  }
  .legal-contact-card {
    order: 3;
    width: 100%;
  }
}

/* Mobile Breakpoint */
@media (max-width: 620px) {
  .legal-band {
    padding: 20px 0 44px;
  }
  .legal-shell {
    padding: 0 16px;
  }
  .legal-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 12px;
  }
  .legal-meta-dot {
    display: none;
  }
  .legal-doc-tabs {
    gap: 1.1rem;
    margin: 0 -16px 20px;
    padding: 0 16px;
  }
  .legal-toc-list {
    grid-template-columns: 1fr;
  }
  .legal-sheet {
    padding: 24px 18px;
  }
  .legal-section h2 {
    font-size: 18px;
  }
  .legal-section p,
  .legal-section li {
    font-size: 14.5px;
  }
}
