/* Outcome-decision letter — GLOBAL print stylesheet (Phase 2)
   ==========================================================
   A GLOBAL (non-scoped) stylesheet linked from App.razor. It must be global, not a *.razor.css,
   because the @media print rules hide console chrome (.topbar / .sidebar / .console-main) that
   lives OUTSIDE the OutcomePane component's scope; Blazor CSS isolation would rewrite those
   selectors with the pane's scope attribute and they would never match the chrome.

   Scope: ONLY the @media print treatment. The full letter LAYOUT (the .oc-letter document,
   letterhead, decision chip band colours, verification facts, signature/seal) is owned by the
   pane's scoped OutcomePane.razor.css — Phase 2 made the chip a plain scoped span, so the old
   global .oc-badge band rules are gone.

   "Save PDF" now downloads a REAL server-side PDF (the API's outcome/letter.pdf endpoint), so this
   stylesheet is no longer the primary export path — but the browser print view stays clean and
   A4-correct for an ad-hoc Ctrl-P of the on-screen letter. */

@media print {
    @page {
        size: A4;
        margin: 14mm 14mm 16mm 14mm;
    }

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

    /* Hide the console chrome (Topbar / Sidebar primitives + console shell rows) and the pane's
       in-pane controls (caption, segmented control, Save PDF / Send buttons) so only the
       outcome letter prints. */
    .topbar,
    .sidebar,
    .console-env-pill,
    [data-testid="outcome-controls"],
    [data-print-hide] {
        display: none !important;
    }

    /* Collapse the console grid so the main column spans the page. */
    .console-app,
    .console-main {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* The stage chrome (canvas tint, padding, the between-documents divider) is screen-only. */
    .oc-stage {
        display: block !important;
        padding: 0 !important;
        background: #fff !important;
        gap: 0 !important;
    }

    .oc-divider {
        display: none !important;
    }

    /* Render each letter full-bleed: no card chrome, edge-to-edge on A4. In "Both" mode the
       second document starts on a fresh page. */
    .oc-letter {
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        width: auto !important;
        max-width: none !important;
        min-height: 0 !important;
        padding: 0 !important;
        break-inside: auto;
    }

    .oc-letter + .oc-divider + .oc-letter,
    .oc-letter + .oc-letter {
        break-before: page;
    }

    /* Keep logical blocks from splitting across page breaks. */
    .oc-letterhead,
    .oc-titlerow,
    .oc-recipient,
    .oc-section,
    .oc-sign {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .oc-section-head {
        break-after: avoid;
    }
}
