/* ── Utility classes ────────────────────────────────────────────────────────── */

/* Right-align text in table cells and form labels */
.text-right {
    text-align: right;
}

/* Fill container height — used in full-height panels and dialog content areas */
.height-full {
    height: 100%;
}

/* ── Action column — fixed-width icon-button column in scroll tables ─────────
   Use on both the <MudTh> header and <MudTd> cell for the action (icon-button)
   column to guarantee a stable, non-expanding width.
   ──────────────────────────────────────────────────────────────────────────── */
.action-col-header,
.action-col-cell {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    text-align: right;
    white-space: nowrap;
}

.action-col-cell {
    padding-right: 4px;
}

.action-col-cell .mud-icon-button {
    margin-left: auto;
}

/* ── Repair-status column — like .action-col-cell/.action-col-header, but wide
   enough for a MudChip (used by ClientTransactionsProcessDialog's IsRepair
   indicator) instead of a single bare icon-button.
   ──────────────────────────────────────────────────────────────────────────── */
.repair-col-header,
.repair-col-cell {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
    white-space: nowrap;
}

/* ── Print isolation — used by pages with a "Print / Save as PDF" affordance ──
   Mark the printable region `print-area`; everything else on the page is hidden
   during printing. Mark any control inside that region that shouldn't appear on
   the printed page (buttons, toggles, filter inputs) `no-print`.
   MudBlazor's text colors (--mud-palette-text-primary/-secondary, and the
   Color.Success/Error accents) are theme-driven CSS custom properties injected
   by MudThemeProvider at runtime. With dark mode as this app's default UI state
   (MainLayout.razor.cs), those variables resolve to the dark theme's light/pastel
   values — fine on a dark screen background, but printers/PDF export always render
   on white paper, so that text comes out washed-out and hard to read regardless of
   which theme the user last had active. Force high-contrast, print-safe colors
   inside `print-area` instead of relying on the current theme. ────────────────── */
@media print {
    body {
        background-color: #fff !important;
    }

    body * {
        visibility: hidden;
    }

    .print-area,
    .print-area * {
        visibility: visible;
        color: #000 !important;
    }

    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background-color: #fff !important;
    }

    /* Higher specificity than MudBlazor's own .mud-success-text/.mud-error-text
       (color: var(--mud-palette-success/error) !important) so these win regardless
       of stylesheet load order — preserves the report's profit/loss color cue with
       fixed, print-safe dark shades instead of the theme's (possibly light) accent. */
    .print-area .mud-success-text {
        color: #1b5e20 !important;
    }

    .print-area .mud-error-text {
        color: #b71c1c !important;
    }

    .no-print {
        display: none !important;
    }
}
