/* ========================
   LEGAL PAGE STYLES
   css/legal.css
   Shared by privacy-policy.html and terms-of-service.html
   ======================== */

/* ========================
   LEGAL LAST UPDATED BADGE
   ======================== */
.legal-updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--color-text-muted, #A0AEC0);
  margin-top: 20px;
}

.legal-updated-badge svg {
  width: 13px;
  height: 13px;
  color: var(--color-accent, #00D4FF);
  flex-shrink: 0;
}

/* ========================
   LEGAL LAYOUT
   ======================== */
.legal-outer {
  padding: 80px 0 120px;
  background: var(--color-primary, #0A0F2C);
}

.legal-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================
   TABLE OF CONTENTS
   ======================== */
.legal-toc {
  background: rgba(5, 8, 16, 0.7);
  border: 1px solid rgba(0, 212, 255, 0.14);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 56px;
}

.legal-toc-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-accent, #00D4FF);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 32px;
}

.legal-toc-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.legal-toc-list li .toc-num {
  font-size: 0.72rem;
  color: var(--color-text-muted, #A0AEC0);
  font-weight: 600;
  opacity: 0.6;
  flex-shrink: 0;
  min-width: 20px;
}

.legal-toc-list li a {
  font-size: 0.88rem;
  color: var(--color-text-muted, #A0AEC0);
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.4;
}

.legal-toc-list li a:hover {
  color: var(--color-accent, #00D4FF);
}

/* ========================
   LEGAL SECTIONS
   ======================== */
.legal-section {
  margin-bottom: 52px;
  scroll-margin-top: 100px;
}

.legal-section-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-section-title .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-accent, #00D4FF);
  flex-shrink: 0;
}

.legal-text {
  color: var(--color-text-muted, #A0AEC0);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

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

.legal-sub-heading {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 24px 0 10px;
}

.legal-sub-heading:first-child {
  margin-top: 0;
}

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

.legal-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-text-muted, #A0AEC0);
  font-size: 0.92rem;
  line-height: 1.6;
}

.legal-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent, #00D4FF);
  flex-shrink: 0;
  margin-top: 9px;
  opacity: 0.7;
}

.legal-list li a {
  color: var(--color-accent, #00D4FF);
  text-decoration: none;
}

.legal-list li a:hover {
  text-decoration: underline;
}

/* Highlight box for important callouts */
.legal-highlight {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-left: 3px solid var(--color-accent, #00D4FF);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}

.legal-highlight.highlight-purple {
  background: rgba(123, 47, 255, 0.05);
  border-color: rgba(123, 47, 255, 0.18);
  border-left-color: var(--color-accent-purple, #7B2FFF);
}

/* Third party links inside legal-list */
.legal-third-party-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legal-third-party-item strong {
  color: #fff;
  font-size: 0.9rem;
}

.legal-third-party-item a {
  color: var(--color-accent, #00D4FF);
  text-decoration: none;
  font-size: 0.82rem;
  opacity: 0.8;
}

.legal-third-party-item a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Contact callout */
.legal-contact-box {
  background: rgba(10, 15, 44, 0.8);
  border: 1px solid rgba(0, 212, 255, 0.14);
  border-radius: 10px;
  padding: 24px 28px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.legal-contact-box svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent, #00D4FF);
  flex-shrink: 0;
}

.legal-contact-box .legal-contact-detail {
  flex: 1;
}

.legal-contact-box .legal-contact-detail strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.legal-contact-box .legal-contact-detail a {
  color: var(--color-accent, #00D4FF);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.legal-contact-box .legal-contact-detail a:hover {
  text-decoration: underline;
}

.legal-contact-box .legal-contact-note {
  color: var(--color-text-muted, #A0AEC0);
  font-size: 0.82rem;
  margin-top: 2px;
}

/* ========================
   BACK TO TOP BUTTON
   ======================== */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary, #0A0F2C);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--color-accent, #00D4FF);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 500;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--color-accent, #00D4FF);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.25);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

/* ========================
   AGREE CHECKBOX (contact form)
   ======================== */
.agree-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 16px 20px;
  background: rgba(10, 15, 44, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  transition: border-color 0.2s ease;
  margin-bottom: 4px;
}

.agree-label:hover {
  border-color: rgba(0, 212, 255, 0.2);
}

.form-group.has-error .agree-label {
  border-color: #FF4D6D;
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.1);
}

.agree-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent, #00D4FF);
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
}

.agree-label span {
  color: var(--color-text-muted, #A0AEC0);
  font-size: 0.9rem;
  line-height: 1.5;
}

.agree-label span a {
  color: var(--color-accent, #00D4FF);
  text-decoration: none;
  font-weight: 500;
}

.agree-label span a:hover {
  text-decoration: underline;
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 768px) {
  .legal-toc {
    padding: 20px 20px;
  }

  .legal-toc-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .legal-outer {
    padding: 60px 0 80px;
  }

  .legal-section {
    margin-bottom: 40px;
  }

  .back-to-top {
    bottom: 88px;
    right: 16px;
  }
}

/* ========================
   PRINT STYLES
   ======================== */
@media print {
  #navbar,
  .navbar,
  .footer,
  .back-to-top,
  #sova-chat,
  .chatbot-widget,
  .breadcrumb-bar {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .svc-hero {
    background: #fff !important;
    padding: 24px 0 !important;
    min-height: unset !important;
  }

  .svc-hero h1,
  .svc-hero .svc-hero-sub {
    color: #000 !important;
  }

  .text-gradient {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #000 !important;
    color: #000 !important;
  }

  .hero-orbs,
  .hero-bg-grid,
  .orb {
    display: none !important;
  }

  .legal-outer {
    padding: 16px 0 !important;
  }

  .legal-wrap {
    max-width: 100%;
  }

  .legal-toc {
    background: #f5f5f5 !important;
    border-color: #ccc !important;
    page-break-inside: avoid;
  }

  .legal-toc-list li a,
  .legal-toc-title {
    color: #000 !important;
  }

  .legal-section {
    page-break-inside: avoid;
  }

  .legal-section-title {
    color: #000 !important;
    border-bottom-color: #ccc !important;
  }

  .legal-section-title .section-num {
    background: #eee !important;
    border-color: #ccc !important;
    color: #000 !important;
  }

  .legal-text,
  .legal-list li {
    color: #333 !important;
  }

  .legal-sub-heading {
    color: #000 !important;
  }

  .legal-highlight {
    background: #f0f8ff !important;
    border-color: #0088aa !important;
    color: #000 !important;
  }

  .legal-contact-box {
    background: #f5f5f5 !important;
    border-color: #ccc !important;
  }

  .legal-contact-box .legal-contact-detail strong,
  .legal-contact-box .legal-contact-detail a {
    color: #000 !important;
  }

  .svc-eyebrow,
  .legal-updated-badge {
    display: none !important;
  }
}
