/* Print layout for the report screens. On screen this file does nothing; when the browser prints,
   the app chrome and the report's own controls drop away so the page is the heading plus the table. */
@media print {
    /* App shell: sidebar, top bar, and the "Signed in as" row are navigation, not report content. */
    .sidebar,
    .top-row,
    nav,
    footer,
    .d-print-none,
    .report-toolbar,
    #blazor-error-ui,
    .blazor-error-boundary {
        display: none !important;
    }

    /* The content column owns the whole sheet once the chrome is gone. */
    html, body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    main,
    .content,
    article,
    .portal-page {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
    }

    /* A scrolling table container would otherwise print only its visible slice. */
    .table-responsive {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
    }

    /* Repeat headings on every page and keep rows from splitting across a page break. */
    table thead {
        display: table-header-group;
    }

    table tfoot {
        display: table-footer-group;
    }

    table tr,
    table td,
    table th {
        page-break-inside: avoid;
    }

    /* Bootstrap's striping and colours cost ink and mostly do not survive greyscale; keep a plain
       ruled table, but leave the totals row bold so it still reads as a total. */
    .table > tbody > tr > td,
    .table > thead > tr > th {
        background: transparent !important;
        color: #000 !important;
        border-color: #999 !important;
    }

    .table {
        width: 100% !important;
        font-size: 10pt;
        border-collapse: collapse !important;
    }

    /* The sort arrow is a screen affordance and means nothing on paper. */
    .sort-indicator {
        display: none !important;
    }

    a[href]::after {
        content: "";
    }

    @page {
        margin: 12mm;
    }
}

/* Screen-only affordance for the sortable headings. */
.sortable-header {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable-header:hover {
    text-decoration: underline;
}

.sort-indicator {
    font-size: 0.8em;
    opacity: 0.8;
}
