/* ══════════════════════════════════════════════════════════════════════
   print.css — loaded LAST (after the scoped-component bundle) so it wins the
   cascade. Blazor CSS-isolation does NOT scope @page, so each report page's
   "@page { margin: 12mm }" leaks globally; this single rule overrides them all.
   margin:0 leaves the browser no margin box to draw its automatic date / URL /
   page-number header & footer — so the printed document is clean. Each printable
   sheet supplies its own inner padding for whitespace.
   ══════════════════════════════════════════════════════════════════════ */
@page { size: auto; margin: 0; }

@media print {
    /* Paper is white. On screen the shell paints itself --bg (#f0f4f8) so the sheets read as sheets; with background
       graphics on (which every report needs, for the seal and the table headings) that tint printed across the whole
       page, so the area around each sheet came out pale blue-grey instead of the paper's own white. */
    html, body { background: #fff !important; }

    /* Facility reports print in LANDSCAPE — both the interactive dashboard (.rpt-content) and the
       formatted Status Report sheet (.print-report-sheet) — so their wide multi-column grids get the
       page width they need and lay out like on screen, instead of collapsing into a cramped column.
       Scoped to facility-report classes only; every other printable page keeps its orientation.
       Page margin is 0 (suppresses the browser's automatic date/URL/page-number header & footer);
       whitespace comes from inner padding. Degrades gracefully where named pages are unsupported. */
    @page report-landscape { size: A4 landscape; margin: 0; }

    /* Landscape page for the Financial Reports export: the trend chart and the seven-column facility table
       are laid out for width, and portrait squeezed both. Margin is 0 so the browser has no margin box to
       draw its automatic date / title / URL / page-number chrome into; the sheet pads itself instead. */
    @page report-doc { size: A4 landscape; margin: 0; }

    .rpt-content,
    .print-report-sheet { page: report-landscape; }

    /* Whitespace via inner padding (page margin is 0). The Status Report's .rpt-content wraps the
       sheet — only the sheet pads there; the dashboard .rpt-content pads itself. */
    .print-report-sheet { padding: 12mm !important; }
    /* Holder rosters span the paper; the screen shell otherwise reserves sidebar width even after hiding the
       sidebar. Keep the change local to these two document families. */
    .admin-main:has(.space-roster-sheet),
    .admin-main:has(.lsh-doc-panel) { width: 100% !important; display: block !important; }
    .rpt-content:not(.print-document-content) { padding: 12mm !important; }
}
