/* ── 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;
}

/* ── Process External Transactions columns — header widths for
   ClientTransactionsProcessDialog's ScrollTable, which runs with FixedLayout
   (table-layout: fixed): the header row alone sets each column's width, so the
   columns no longer shift as the virtualized rows scroll (CR-223, CLIENT95).
   Each width includes the cell's 16px padding on both sides (border-box).
   ──────────────────────────────────────────────────────────────────────────── */
.process-col-date {
    width: 110px;
}

.process-col-first-name {
    width: 100px;
}

.process-col-last-name {
    width: 110px;
}

.process-col-member-hint {
    width: 140px;
}

.process-col-amount {
    width: 110px;
}

.process-col-fee {
    width: 100px;
}

.process-col-type {
    width: 140px;
}

.process-col-description {
    width: 170px;
}

.process-col-comment {
    width: 120px;
}

.process-col-account {
    width: 140px;
}

/* Under fixed layout the header width is the column width, so an action column
   must hold a Large icon button (60px) plus the cell padding on both sides.
   Eir.AspTools ScrollTableStyles publishes that padding as
   --scroll-table-cell-padding-x (it already changes at the 960px breakpoint), so
   the width follows upstream. Two classes, so this beats .action-col-header's 52px
   above; auto-layout tables keep sizing from content (CR-223 CLIENT95, CR-255 CLIENT101). */
.scroll-table-fixed-layout .action-col-header {
    width: calc(60px + 2 * var(--scroll-table-cell-padding-x));
    min-width: calc(60px + 2 * var(--scroll-table-cell-padding-x));
    max-width: calc(60px + 2 * var(--scroll-table-cell-padding-x));
}

/* ── 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;
    }
}
