/* Udskrift af en guide: sort tekst på hvid baggrund, kun selve guiden og en tjekliste med tomme bokse.
   Linkes med media="print". Reglerne står også i @media print, så de aldrig gælder på skærmen. */

@media print {
    @page {
        margin: 18mm 16mm;
    }

    :root {
        color-scheme: light;
    }

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

    body {
        font-size: 11pt;
        line-height: 1.5;
    }

    *,
    *::before,
    *::after {
        background: transparent !important;
        box-shadow: none !important;
        color: #000 !important;
        text-shadow: none !important;
    }

    /* Guiden fylder hele papirets bredde. Står før reglerne for skjulte dele, så fx headeren med .wrap stadig skjules. */
    .wrap,
    .article-layout,
    .prose,
    .page-top {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .page-top {
        margin-bottom: 8mm !important;
    }

    /* Det, der kun giver mening på skærmen */
    .skip-link,
    .concept-bar,
    .header,
    .footer,
    #blazor-error-ui,
    .back-link,
    .print-action,
    .toc,
    .guide-tools,
    .guide-search,
    .guide-search-form,
    .search-row,
    .search-suggestions,
    .kopier,
    .kopier-knap,
    .checklist-note,
    .related-guides,
    .keywords,
    .next-guide,
    .resource-links,
    button {
        display: none !important;
    }

    h1 {
        font-size: 20pt;
        line-height: 1.2;
    }

    h2 {
        margin-top: 6mm;
        font-size: 14pt;
        break-after: avoid;
        page-break-after: avoid;
    }

    p,
    li {
        orphans: 3;
        widows: 3;
    }

    a {
        text-decoration: underline;
    }

    /* Links til andres materiale får adressen skrevet ud */
    a.reference::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        overflow-wrap: anywhere;
    }

    .template,
    .note,
    .reference,
    .step-list li,
    tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .template,
    .note,
    .reference {
        padding: 3mm 4mm !important;
        border: 1px solid #000 !important;
    }

    .template pre {
        white-space: pre-wrap;
    }

    .table-wrap {
        overflow: visible !important;
    }

    th,
    td {
        border-color: #000 !important;
    }

    /* Tjeklisten med tomme bokse at krydse af med en kuglepen */
    .checklist {
        margin-top: 8mm;
        padding: 4mm 5mm !important;
        border: 1px solid #000 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .checklist input {
        display: none !important;
    }

    .checklist label {
        display: grid !important;
        grid-template-columns: 5mm minmax(0, 1fr);
        gap: 3mm;
        align-items: start;
    }

    .checklist label::before {
        content: "";
        display: block;
        width: 4mm;
        height: 4mm;
        margin-top: 0.6mm;
        border: 1.2px solid #000 !important;
    }

    .checklist li {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
