/* Report of the items of the boxes (wms-reports, D275, Blazor only). Screen: the item table of each box inside its own scroll wrapper (never the page), the rows that differ from the last round of the
   item check in the warning tint, the note about the lines of the order. Paper: A4 landscape (the item table is wide), black on white like the report of the shipping check (fixed paper colors, not theme
   tokens), rendered in the print section of the Workspace and the only thing printed while it exists; the header of a table repeats on a new page, a row never splits and a box title stays with its table. */
.boxitems-table {
    min-width: 900px
}

.boxitems-table tr.is-divergent td {
    background: var(--warning-faint)
}

.reports-hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted)
}

@page boxitems-report {
    size: A4 landscape;
    margin: 10mm 10mm 12mm;

    @bottom-right {
        content: counter(page) " / " counter(pages);
        font: 8pt Arial, sans-serif;
        color: var(--print-ink);
    }
}

.boxitems-report {
    page: boxitems-report;
    font: 8pt/1.3 Arial, sans-serif;
    color: var(--print-ink);
    background: var(--print-paper);
}

.boxitems-report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8mm;
    border-bottom: 2px solid var(--print-ink);
    padding-bottom: 2mm;
}

.boxitems-report-header small {
    font-size: 8pt;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.boxitems-report-header h1 {
    margin: 1mm 0;
    font-size: 15pt;
    /* The global h1 of styles.css has a negative letter-spacing for the screen titles: on paper it glued the words. */
    letter-spacing: 0;
    word-spacing: normal;
}

.boxitems-report-header p {
    margin: 0;
}

.boxitems-report-printed {
    text-align: right;
    font-size: 8pt;
}

.boxitems-report-totals {
    margin: 2mm 0;
    font-weight: 700;
}

.boxitems-report-notice {
    margin: 0 0 3mm;
    border: 1px solid var(--print-ink);
    padding: 2mm;
    font-weight: 700;
}

.boxitems-report-box {
    margin-top: 4mm;
}

.boxitems-report-box h2 {
    margin: 0;
    padding: 1mm 0;
    border-bottom: 1.5px solid var(--print-ink);
    font-size: 10.5pt;
    letter-spacing: 0;
    break-after: avoid;
    page-break-after: avoid;
}

.boxitems-report-facts {
    margin: 1mm 0;
    break-after: avoid;
    page-break-after: avoid;
}

.boxitems-report-table {
    width: 100%;
    margin-top: 1mm;
    border-collapse: collapse;
}

.boxitems-report-table thead {
    display: table-header-group;
}

.boxitems-report-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
}

.boxitems-report-table th,
.boxitems-report-table td {
    border-bottom: 1px solid var(--print-ink);
    padding: .7mm 1.2mm;
    text-align: left;
    vertical-align: top;
}

.boxitems-report-table th {
    border-top: 1px solid var(--print-ink);
    font-size: 6.5pt;
    text-transform: uppercase;
}

.boxitems-report-table .is-number {
    text-align: right;
}

/* A row that differs from the check: bold, never a color (the paper is black on white). */
.boxitems-report-table tr.is-divergent td {
    font-weight: 700;
}

.boxitems-report-note {
    margin-top: 3mm;
    font-size: 7.5pt;
}

@media print {
    body:has(.print-area.boxitems-report-print) .workspace {
        display: none !important;
    }

    .print-area.boxitems-report-print {
        position: static !important;
    }

    html:has(.print-area.boxitems-report-print),
    body:has(.print-area.boxitems-report-print) {
        background: var(--print-paper) !important;
    }
}
