/* =====================================================
   Print / PDF Export Styles
   ===================================================== */

@media print {
    @page {
        margin: 0;
        padding: 0;
        size: auto; /* Browser will use the page size from print dialog */
    }

    /* Hide absolutely everything in the app */
    body > *:not(#_print_canvas_holder) {
        display: none !important;
    }

    /* Reset body to neutral */
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    /* Show only our clean print canvas holder */
    #_print_canvas_holder {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;           /* top/right/bottom/left = 0 */
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        z-index: 99999 !important;
        page-break-inside: avoid;
    }

    /* The canvas itself should fill the holder completely */
    #_print_canvas_holder canvas {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        /* object-fit not applicable to canvas but explicit size guarantees coverage */
        margin: 0 !important;
        padding: 0 !important;
    }
}
