/* Print stylesheet for country-scoped legal pages.
 *
 * Loaded by templates/legal/_layout.html.twig via
 * <link rel="stylesheet" media="print" ...>. Only @media print
 * rules live here so this file has zero effect on screen rendering.
 */

@media print {
    /* Strip site chrome: header, footer, cookie banner, country nav. */
    .sano-public > header,
    header.sano-header,
    .sano-footer,
    footer.sano-footer,
    .cookie-consent,
    nav[aria-label],
    .sano-legal-toc,
    .sano-legal-skip,
    .sano-legal-draft-banner,
    [role="status"] {
        display: none !important;
    }

    /* Force black-on-white text and remove background fills. */
    body,
    main,
    article,
    .sano-legal-body,
    .container {
        background: #fff !important;
        color: #000 !important;
    }

    /* Tighter typography for paper output. */
    body {
        font-size: 11pt;
        line-height: 1.45;
        font-family: Georgia, "Times New Roman", serif;
    }

    h1 { font-size: 18pt; margin: 0 0 12pt 0; }
    h2 { font-size: 13pt; margin: 14pt 0 6pt 0; page-break-after: avoid; }
    h3 { font-size: 11pt; margin: 10pt 0 4pt 0; page-break-after: avoid; }

    /* Keep paragraphs together when reasonable. */
    p, li { orphans: 3; widows: 3; }

    /* Show link target URLs in print output, alongside the link text. */
    .sano-legal-body a[href^="http"]::after,
    .sano-legal-body a[href^="mailto:"]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        color: #555;
    }

    /* Drop in-page anchor URLs from print (e.g. #data-rights). */
    .sano-legal-body a[href^="#"]::after {
        content: "";
    }

    /* Page setup: comfortable margins, page numbers on the bottom. */
    @page {
        margin: 1.8cm 2cm;
    }
}
