/**
 * Legal document pages — layout, TOC, print.
 * Loaded only on legal templates (no inline styles on pages).
 */

.vs-legal-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.vs-legal-shell {
  min-height: 420px;
}

.vs-legal-toc-column {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

@media (min-width: 992px) {
  .vs-legal-toc-column {
    border-bottom: none;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
  }
}

.vs-legal-toc-sticky {
  position: sticky;
  top: 0;
  max-height: min(100vh, 920px);
  overflow-y: auto;
  background: #ffffff;
  z-index: 2;
}

.vs-legal-toc-nav .vs-legal-toc-link {
  color: var(--vs-ent-text-muted, #64748b);
  padding: 0.35rem 0;
  border-radius: 6px;
  font-size: 0.9rem;
}

.vs-legal-toc-nav .vs-legal-toc-link:hover {
  color: var(--vs-ent-primary, #1d4ed8);
  background: rgba(29, 78, 216, 0.06);
}

.vs-legal-article-column {
  background: #ffffff;
}

.vs-legal-article {
  max-height: min(78vh, 900px);
  overflow-y: auto;
  scroll-behavior: smooth;
}

.vs-legal-effective-badge {
  background: rgba(29, 78, 216, 0.12);
  color: var(--vs-ent-primary, #1d4ed8);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.vs-legal-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--vs-ent-text, #0f172a);
}

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

.vs-legal-placeholder {
  color: var(--vs-ent-text-muted, #64748b);
  font-style: italic;
}

.vs-legal-section {
  padding-top: 0.25rem;
  margin-bottom: 2rem;
}

.vs-legal-section:last-child {
  margin-bottom: 0;
}

.vs-accept-scroll {
  max-height: min(52vh, 560px);
  overflow-y: auto;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  background: #ffffff;
}

.vs-accept-document {
  font-size: 0.95rem;
  line-height: 1.65;
}

@media print {
  .layout-menu,
  .layout-navbar,
  .layout-overlay,
  .content-footer,
  .layout-menu-toggle {
    display: none !important;
  }

  .layout-page,
  .content-wrapper {
    background: #ffffff !important;
  }

  .vs-legal-toc-sticky {
    position: static;
    max-height: none;
    overflow: visible;
    border-right: none !important;
  }

  .vs-legal-article {
    max-height: none;
    overflow: visible;
  }

  .vs-legal-card {
    box-shadow: none !important;
    border: none !important;
  }

  .vs-accept-scroll {
    max-height: none;
    overflow: visible;
    border: none;
    padding: 0;
  }
}
