/*
 * print.css — tiskova a PDF podoba stranky.
 * Ctenar si tiskne hlavne recenze a srovnani, takze zustava obsah i tabulky
 * a mizi vse, co na papire nefunguje (navigace, CTA, prilepene prvky).
 * Tiskovou paletu definuje variables.css, tady se uz jen pouziva.
 */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: var(--c-print-ink) !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html,
    body {
        width: 100%;
        margin: 0;
        padding: 0;
        background: var(--c-print-paper) !important;
        font-size: 11pt;
        line-height: 1.45;
    }

    .container,
    .container--narrow {
        max-width: none;
        padding-inline: 0;
    }

    /* Prvky, ktere na papire nemaji smysl. */
    .bz-header,
    .bz-nav,
    .bz-mobile-nav,
    .bz-footer,
    .bz-sticky-cta,
    .bz-to-top,
    .bz-skip-link,
    .bz-filters,
    .bz-newsletter,
    .bz-cookie,
    .bz-age-gate,
    .bz-theme-toggle,
    .bz-toc,
    .bz-share,
    .bz-btn,
    video,
    iframe,
    [aria-hidden="true"] {
        display: none !important;
    }

    /* Karty a tabulky musi zustat citelne, jen bez vypllni a stinu. */
    .bz-card,
    .u-surface,
    .bz-table-wrap,
    details,
    .bz-prose table,
    .bz-prose blockquote,
    .bz-prose pre,
    .bz-prose code {
        border: 1px solid var(--c-print-rule) !important;
        border-radius: 0 !important;
    }

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

    .bz-table-wrap::after {
        display: none !important;
    }

    table {
        width: 100% !important;
        display: table !important;
        page-break-inside: auto;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img,
    figure,
    blockquote,
    .bz-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Rozbalovaci bloky se tisknou rozbalene, jinak by chybel obsah FAQ. */
    details {
        display: block !important;
    }

    details > *:not(summary) {
        display: block !important;
        height: auto !important;
        visibility: visible !important;
    }

    summary::after {
        display: none !important;
    }

    h1, h2, h3, h4 {
        page-break-after: avoid;
        break-after: avoid;
        orphans: 3;
        widows: 3;
    }

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

    .bz-prose {
        max-width: none;
    }

    /* U tistene stranky se hodi videt cilovou adresu odkazu. */
    .bz-prose a[href^="http"]::after,
    .bz-prose a[href^="/"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: var(--c-print-mute) !important;
        word-break: break-all;
    }

    a {
        text-decoration: underline;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    @page {
        margin: 15mm 14mm;
    }
}
