/*
    Paper layout for the Concurrent Usage report.

    Linked with media="print", so nothing here can affect the screen and the rules need
    no @media wrapper.

    Everything is gated on :has(.cc-print-area) — the marker class on ConcurrencyPanel's
    root. That way these rules only bite when that report is actually on screen (the rest
    of the portal keeps the browser's default print behaviour), and a plain Ctrl+P on the
    report produces exactly the same document as the Save as PDF button.
*/

/* The app chrome is navigation, not report. */
body:has(.cc-print-area) .app-header,
body:has(.cc-print-area) .app-sidebar,
body:has(.cc-print-area) .app-footer,
body:has(.cc-print-area) .app-drawer,
body:has(.cc-print-area) .backdrop {
    display: none !important;
}

/*
    The shell is a fixed-height grid that scrolls internally (see app-shell.css). Left
    alone, paper gets exactly one screenful and the rest of the report is clipped away —
    so the whole chain has to collapse to ordinary block flow for printing.
*/
body:has(.cc-print-area),
body:has(.cc-print-area) .app-wrap,
body:has(.cc-print-area) .app-body,
body:has(.cc-print-area) .app-content,
body:has(.cc-print-area) .content-wrapper,
body:has(.cc-print-area) .main-content,
body:has(.cc-print-area) .main-content > .container-fluid {
    display: block !important;
    position: static !important;
    overflow: visible !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
}

/*
    Siblings of the report inside the page container — the "Call Logs" heading, the range
    picker, the stat tiles, the report selector — are all controls for producing the
    report, not part of it.
*/
.container-fluid:has(> .cc-print-area) > *:not(.cc-print-area) {
    display: none !important;
}

@page {
    size: letter portrait;
    margin: 13mm 12mm 14mm;
}
