/* PrintWizzard — Print stylesheet (v2.48.0, Phase 5)
 *
 * Loaded with `media="print"` from _base.html. Only applies
 * when the operator prints a report or list (end-of-shift
 * reconciliation, paper triage handoff). Drops everything that
 * doesn't belong on paper: nav, footer chips, install banners,
 * PWA chrome.
 *
 * Pages this matters for today: /admin/triage, /admin/print-jobs,
 * /admin/reports/*. Other pages still print but are not tuned.
 */

@media print {
    /* Universal: turn off backgrounds so coloured chrome doesn't
       suck up toner. Keep semantic state colors (success/danger/
       warning) as borders only — readable in B&W. */
    * {
        background-color: transparent !important;
        box-shadow: none !important;
    }
    html, body {
        color: #000;
        background: #fff;
        font-size: 11pt;
        line-height: 1.4;
    }

    /* Hide everything that's not the actual data. */
    header,
    nav,
    .pw-nav,
    .pw-kiosk-header,
    .app-footer,
    footer,
    .operator-footer,
    .qa-agent-banner,
    .mode-switcher,
    #pwa-install-banner,
    .verify-banner,
    .attention-banner,
    .pw-btn,
    .pw-toast,
    .refresh-picker,
    .op-rip-controls,
    .op-jobs-actions,
    .qa-actions,
    form[method="post"],
    .ext-link::after {
        display: none !important;
    }

    /* Tables: black borders, no background. Headers bold. */
    .pw-table,
    table {
        width: 100%;
        border-collapse: collapse;
    }
    .pw-table th,
    .pw-table td,
    table th,
    table td {
        border: 1px solid #000 !important;
        padding: 4pt 6pt !important;
        color: #000 !important;
    }
    .pw-table th,
    table th {
        font-weight: 700;
        background: #eee !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Status pills: outline-only so they're readable in B&W. */
    .pw-pill {
        border: 1px solid #000 !important;
        color: #000 !important;
        padding: 1pt 4pt !important;
    }

    /* Links: render the URL after the link text so paper readers
       can follow them. Internal /admin/ links skip the URL since
       they're meaningless off-screen. */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #444 !important;
        word-wrap: break-word;
    }

    /* Page breaks: keep each <section> together; allow breaks
       inside long tables only between rows. */
    section, .pw-card { page-break-inside: avoid; }
    tr { page-break-inside: avoid; }

    /* Headings: don't orphan. */
    h1, h2, h3 { page-break-after: avoid; }

    /* The kiosk + station chrome is dark by default — invert
       to readable B&W on paper. */
    .operator-body,
    .qa-body {
        background: #fff !important;
        color: #000 !important;
    }
}
