/* ============================================================
   Little Explorers — Policies & SOPs (print / PDF)
   ============================================================ */

@media print {
  @page {
    size: A4;
    margin: 18mm 16mm 22mm 16mm;

    @bottom-center {
      content: none;
    }
  }

  html,
  body.policy-page {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print,
  .policy-topbar,
  .policy-doc__screen-actions,
  .site-header,
  .main-header,
  .announcement-bar,
  .site-footer,
  .footer-wave,
  .prefooter-cta,
  .float-actions,
  .nav-mobile,
  .nav-mobile-overlay,
  .skip-link,
  .page-banner {
    display: none !important;
  }

  .policy-print-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12pt;
    padding-bottom: 8pt;
    margin-bottom: 14pt;
    border-bottom: 1.5pt solid #3e8e8e;
  }

  .policy-print-header__brand {
    display: flex;
    align-items: center;
    gap: 10pt;
  }

  .policy-print-header__logo {
    height: 42pt;
    width: auto;
  }

  .policy-print-header__text {
    font-family: "Nunito", sans-serif;
  }

  .policy-print-header__school {
    display: block;
    font-weight: 800;
    font-size: 11pt;
    color: #2f6f6f;
  }

  .policy-print-header__code {
    display: block;
    font-size: 9pt;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #3e8e8e;
    margin-top: 2pt;
  }

  .policy-print-footer {
    display: block !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: 6pt;
    border-top: 0.75pt solid #ccc;
    font-size: 8pt;
    color: #555;
  }

  .policy-print-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8pt;
  }

  .policy-print-footer__contact {
    line-height: 1.35;
  }

  .policy-print-footer__mark {
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
  }

  /* Page numbers via counter (browser support varies) */
  body.policy-page {
    counter-reset: policy-page;
  }

  .policy-doc {
    max-width: none;
    margin: 0;
    padding: 0 0 28pt;
  }

  .policy-doc__title {
    font-size: 16pt;
    margin-bottom: 10pt;
    color: #2f6f6f !important;
  }

  .policy-meta {
    box-shadow: none !important;
    border: 0.75pt solid #ccc;
    background: #f7f7f7 !important;
    page-break-inside: avoid;
    margin-bottom: 12pt;
  }

  .policy-meta__label {
    color: #3e8e8e !important;
  }

  .policy-section {
    page-break-inside: avoid;
    margin-bottom: 10pt;
  }

  .policy-section h2 {
    font-size: 12pt;
    color: #2f6f6f !important;
    border-bottom-color: #d7ecec !important;
  }

  .policy-admin-note {
    background: #eef6f6 !important;
    border: 0.75pt solid #3e8e8e;
    page-break-inside: avoid;
  }

  a {
    color: inherit !important;
    text-decoration: none !important;
  }

  .policy-library,
  .policy-category-grid,
  .policy-list,
  .policy-chips,
  .policy-search,
  .policy-library__toolbar {
    /* Index pages still printable but chrome hidden */
  }
}

/* Running page number fallback for engines that support content: counter(page) */
@media print {
  .policy-print-footer__pages::after {
    content: "Page " counter(page);
  }
}

@supports (content: counter(page)) {
  @media print {
    .policy-print-footer__pages::after {
      content: "Page " counter(page);
    }
  }
}
