/*
 * shared/print.css — common @media print rules used across operator-facing pages.
 *
 * v135.513 (F-cat-print-formatting-elegance Phase 1) — extracts the universal
 * print primitives from rundown.html / timetable.html / prep.html. Per-page
 * @media print blocks STAY in those pages for selector-specific rules
 * (.tt-card / .prep-tl-row / .rd-table etc.); this file owns:
 *
 *   1. Base reset — html/body background + color + transform/zoom neutralization.
 *   2. .no-print — utility class for hiding controls / chrome on print.
 *   3. .print-keep-bg — utility class to force print-color-adjust: exact on
 *      elements whose tinted backgrounds must survive Chrome's "remove
 *      backgrounds" default (chip pills, status badges, etc.).
 *   4. .print-no-break — utility class to keep a row/card whole on its page.
 *
 * Page-specific overrides (e.g. transform:none on .tt-grid, the prep poster's
 * masthead bar) belong in the consuming page so we don't accidentally couple
 * print layouts across surfaces.
 *
 * Consumers (load near the top of <head> via standard <link rel=stylesheet>
 * with cache-bust ?v=X-Y):
 *   - prep.html
 *   - rundown.html
 *   - timetable.html
 *
 * Future consumers (per F-cat-print-formatting-elegance plan-doc): every page
 * the operator may print. Pages without explicit @media print blocks today
 * benefit from .no-print + the body color reset for free.
 *
 * Per Platform Invariant #5 (rapid iteration over rollback insurance) +
 * preserving existing print behavior: extract ONLY the rules that are
 * definitionally cross-page, not the page-shape-specific ones. Pre/post
 * extraction the printed output for each page should be visually identical.
 */

@media print {
    /* ── Universal page reset ─────────────────────────────────────────
       Every operator-facing page needs the same baseline: white background,
       black ink, no inherited screen transform, no inherited zoom. Pages
       that need to override (e.g. tt-print-fit transform neutralization)
       still can — they keep their @media print block and override
       these defaults via more-specific selectors / !important. */
    html, body {
        background: #fff !important;
        color: #000 !important;
        transform: none !important;
        zoom: 1 !important;
    }

    /* ── .no-print utility ────────────────────────────────────────────
       Apply to any element you want hidden when printing. Used today by
       rundown.html for the edit column, register.html for the lang
       toggle, and similar control chrome. !important to beat inline
       styles set by JS. */
    .no-print {
        display: none !important;
    }

    /* ── .print-keep-bg utility ───────────────────────────────────────
       Force backgrounds + colors to survive Chrome's default
       "Background graphics" off setting. Apply to chip pills, status
       badges, alternating-row backgrounds, anywhere the visual relies
       on fill colors carrying through to paper. */
    .print-keep-bg {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* ── .print-no-break utility ──────────────────────────────────────
       Apply to any block that should not split across a page boundary
       (cards, table rows, sections). Both modern + legacy syntax for
       cross-browser coverage. */
    .print-no-break {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
}
