/* Print rules that have to be GLOBAL.

   Blazor scopes a component's stylesheet to that component, so a page can only hide
   its own markup. The admin chrome — the sidebar nav, the top bar with search and
   notifications, the user menu — belongs to MainLayout, under a different scope id.
   A page's own @media print block cannot touch it, so every printed sheet carried the
   whole application around the content.

   Anything a page wants hidden on paper gets .no-print; anything the layout always
   hides is listed here. */

@media print {
    /* The application around the page. Names taken from the live DOM, not guessed:
       aside.sidebar, header.app-header and div.mobile-overlay are MainLayout's own. */
    .sidebar,
    .app-header,
    .mobile-overlay {
        display: none !important;
    }

    /* Per-page opt-out, usable from any component. */
    .no-print { display: none !important; }

    /* The content is the whole sheet once the chrome has gone. */
    .main-wrapper,
    main {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
    }

    html, body {
        background: #FFFFFF !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Print the colours the page chose rather than the browser's economy version —
       a tick column with no ticks is a packing list nobody can use. */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
