/* ============================================
   LEGAL PAGES - UNIFIED STYLES
   Used by: Terms of Service, Privacy Policy, Cookie Statement
   ============================================ */

/* --- Common Layout & Background --- */
/* Make body a positioning context for the header background */
.terms-of-service-page,
.cookie-statement-page,
.about-page-alternate {
  position: relative;
}

/* Header background - only affects header itself (not full width) */
.header {
  background-color: transparent !important;
}

/* Full-width background behind notification banner + header for legal pages */
.terms-of-service-page::before,
.cookie-statement-page::before,
.about-page-alternate::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 118px; /* notification-banner (42px) + header (76px) */
  background-color: var(--backgroundcontentcontent-primary);
  z-index: 1; /* Below header (z-index: 100) but above content */
  pointer-events: none; /* Allow clicks to pass through */
}

.sized-content-text {
  flex-direction: column !important;
  gap: 0px !important;
  padding: 0px 76px;
}

/* --- Common Section Styles --- */
.legal-page {
  background-color: var(--backgroundcontentbackground-third);
  padding: 96px 0;
  color: var(--backgroundcontentcontent-primary);
  justify-items: center;
}

/* --- Common Content Spacing --- */
.legal-page__content {
  padding-top: 64px;
  max-width: 1440px;
}

/* --- Common Typography - Titles --- */
.legal-page__title {
  font-family: var(--headline-primary-font-family);
  font-size: 40px;
  line-height: 120%;
  margin-bottom: 12px;
}

.legal-page__subtitle {
  font-family: var(--body-primary-font-family);
  font-size: 16px;
  line-height: 1.5;
  color: var(--backgroundcontentcontent-secondary);
  margin: 0 0 24px 0;
}

.legal-page__text a {
  color: var(--brand-colorsmain-brand-color);
  text-decoration: underline;
}

.legal-page__text a:hover {
  opacity: 0.85;
}

/* --- Common Dividers --- */
.legal-page__divider {
  border: none;
  border-top: 1px solid #d6d6d6;
  margin-bottom: 32px;
  width: 100%;
}

/* --- Actions (e.g. Download button) --- */
.legal-page__actions {
  margin: 0 0 32px 0;
}

.legal-page__actions .primary-button {
  display: inline-flex;
}

/* --- Common Text Styles --- */
.terms-of-service-page .legal-page__text {
    font-family: var(--body-primary-font-family);
    font-size: 20px;
    line-height: 140%;
    max-width: 1350px;
}
    
.cookie-statement-page .legal-page__text {
    font-family: var(--body-primary-font-family);
    font-size: 20px;
    line-height: 140%;
    max-width: 1260px;
}

.about-page-alternate .legal-page__text {
  font-family: var(--body-primary-font-family);
  font-size: 20px;
  line-height: 140%;
  max-width: 1260px;
}

/* --- Common Paragraph Styles --- */
.legal-page__text p {
  margin-bottom: 24px;
}

/* --- Common List Styles --- */
ul {
  list-style: initial;
}

.legal-page__text ul {
  margin: 0 0 20px 20px;
}

/* --- Terms of Service: markup from TermsAndConditions (BIFA 2025) --- */
.terms-of-service-page .legal-page__text .highlight {
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.terms-of-service-page .legal-page__text .start-clause-title {
  font-weight: bold;
  font-size: 22px;
  border-bottom: 1px solid #6F6F6F;
  padding-bottom: 6px;
  margin: 28px 0 12px 0;
}

.terms-of-service-page .legal-page__text .tc-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 20px 0;
  counter-reset: item;
}

.terms-of-service-page .legal-page__text .tc-list > li {
  counter-increment: item;
  position: relative;
  padding-left: 10px;
  padding-bottom: 6px;
  margin-top: 12px;
}

.terms-of-service-page .legal-page__text .tc-list > li::before {
  content: counter(item);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.terms-of-service-page .legal-page__text .tc-alpha,
.terms-of-service-page .legal-page__text .tc-roman,
.terms-of-service-page .legal-page__text .tc-sub-alpha {
  list-style: none;
  padding-left: 0;
}

.terms-of-service-page .legal-page__text .tc-alpha { counter-reset: alpha; }
.terms-of-service-page .legal-page__text .tc-alpha > li {
  counter-increment: alpha;
  position: relative;
  padding-left: 20px;
  padding-bottom: 4px;
}

.terms-of-service-page .legal-page__text .tc-alpha > li::before {
  content: "(" counter(alpha, upper-alpha) ")";
  font-weight: bold;
  position: absolute;
  left: 0;
}

.terms-of-service-page .legal-page__text .tc-roman { counter-reset: roman; }
.terms-of-service-page .legal-page__text .tc-roman > li {
  counter-increment: roman;
  position: relative;
  padding-left: 20px;
}

.terms-of-service-page .legal-page__text .tc-roman > li::before {
  content: "(" counter(roman, lower-roman) ")";
  font-weight: bold;
  position: absolute;
  left: 0;
}

.terms-of-service-page .legal-page__text .tc-sub-alpha { counter-reset: alpha; }
.terms-of-service-page .legal-page__text .tc-sub-alpha > li {
  counter-increment: alpha;
  position: relative;
  padding-left: 20px;
  padding-bottom: 4px;
}

.terms-of-service-page .legal-page__text .tc-sub-alpha > li::before {
  content: "(" counter(alpha, lower-alpha) ")";
  font-weight: bold;
  position: absolute;
  left: 0;
}

.terms-of-service-page .legal-page__text .tc-text {
  display: inline-block;
  padding-left: 17px;
  vertical-align: top;
}

.terms-of-service-page .legal-page__text .tc-empty > li::before {
  content: "";
}

.terms-of-service-page .legal-page__text table {
  width: 100%;
  margin-top: 15px;
  border-collapse: collapse;
}

.terms-of-service-page .legal-page__text table td {
  padding: 5px 10px 5px 0;
  vertical-align: top;
}

/* Remove default list markers for Terms */
.terms-of-service-page .legal-page__text ul {
  list-style: none;
  margin-left: 0;
}

.terms-of-service-page .legal-page__text li::marker {
  display: none;
  content: '';
}

/* --- Privacy Policy Specific --- */
.bold {
  font-weight: 600;
}

/* --- Cookie Statement Specific --- */
.cookie-link {
  color: #007bff;
  text-decoration: underline;
}

.cookie-category {
  margin-top: 32px;
}

.cookie-category h3 {
  font-family: var(--body-primary-font-family);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 16px;
}

.cookie-category ul {
  list-style-type: disc !important;
  margin-left: 20px !important;
  padding-left: 0;
  margin-bottom: 24px;
}

.cookie-category li {
  display: list-item !important;
  padding-left: 8px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .legal-page__title {
        font-size: 32px;
        line-height: 40px;
    }

    .legal-page__text {
        font-size: 15px;
    }
}
@media (max-width: 743px) {
  /* Banner (62px) + header (80px) on mobile */
  .terms-of-service-page::before,
  .cookie-statement-page::before,
  .about-page-alternate::before {
    height: 142px;
  }

/* --- Common Content Spacing --- */
 .legal-page__content {
  padding-top: 20px;
 }

 .sized-content-text {
  padding: 0px 16px;
 }

 /* --- Common Typography - Titles --- */
.legal-page__title {
  font-size: 24px;
  margin-bottom: 12px;
 }

    /* --- Common Text Styles --- */
    .terms-of-service-page .legal-page__text {
        font-size: 14px;
        line-height: 140%;
        max-width: 342px;
    }

    /* --- Common Text Styles --- */
    .cookie-statement-page .legal-page__text {
        font-size: 14px;
        line-height: 140%;
        max-width: 342px;
    }

    /* --- Common Text Styles --- */
    .about-page-alternate .legal-page__text {
        font-size: 14px;
        line-height: 140%;
        max-width: 342px;
    }

    /* --- Common Dividers --- */
    .legal-page__divider {
        margin-bottom: 12px;
    }

    /* --- Common Section Styles --- */
    .legal-page {
        background-color: var(--backgroundcontentbackground-third);
        padding: 96px 0 36px 0;
        color: var(--backgroundcontentcontent-primary);
        justify-items: center;
    }
}
