/* ============================================================
   Reports section — shared styles
   Replaces the hardcoded inline #001f3f / #999 styling that was
   duplicated across every report page.
   ============================================================ */

/* Brand navy — primary (filled) action buttons */
.report-btn-primary.mud-button-root {
    background-color: var(--cas-navy-700) !important;
    color: #ffffff !important;
}

.report-btn-primary.mud-button-root:hover {
    background-color: var(--cas-navy-800) !important;
}

/* Brand navy — secondary (outlined) action buttons */
.report-btn-outline.mud-button-root {
    border-color: var(--cas-navy-700) !important;
    color: var(--cas-navy-700) !important;
}

.report-btn-outline.mud-button-root:hover {
    background-color: rgba(30, 58, 95, 0.06) !important;
}

/* Muted placeholder used for empty / "—" cell values */
.report-muted {
    color: var(--cas-faint);
}

/* Generic single-line truncation cell (use with a MudTooltip) */
.report-truncate {
    display: inline-block;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.report-truncate-sm {
    max-width: 12rem;
}

.report-truncate-lg {
    max-width: 22rem;
}

.report-truncate-xl {
    max-width: 25rem;
}

/* Lists of chips can otherwise make a column consume the entire table width. */
.report-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 22rem;
}

/* Caption under a filter card */
.report-filter-caption {
    color: var(--cas-muted);
}

.report-results-bar {
    min-height: 34px;
}

.report-results-actions {
    justify-content: flex-end;
}

/* Full-width report page — keep rows on one line so the table stays compact
   and scrolls horizontally inside its own container rather than overflowing the page. */
.report-page {
    padding-left: 12px;
    padding-right: 12px;
    min-width: 0;
}

/* Compact, muted one-line description shown at the top of each report (replaces the old h4 header). */
.report-description {
    color: var(--cas-muted);
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.report-page .mud-table-cell {
    white-space: nowrap;
    vertical-align: middle;
}

/* Tighten the dense filter card spacing */
.report-page .mud-input-control-margin-dense {
    margin-top: 0;
}

/* Keep every filter control on the same baseline. This is especially important
   for date pickers, selects and action buttons sharing a grid row. */
.report-page > .mud-paper > .mud-grid {
    align-items: flex-end !important;
}

.report-page > .mud-paper > .mud-grid > .mud-grid-item {
    min-width: 0;
}

.report-page > .mud-paper > .mud-grid > .mud-grid-item > .mud-input-control {
    width: 100%;
}

/* MudTable defaults to vertical overflow only. Report tables can be much wider
   than the viewport, so give them an explicit horizontal scrolling boundary and
   size columns from their content instead of squeezing text into adjacent cells. */
.report-page .mud-table-container {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

@media (min-width: 601px) {
    .report-page .mud-table-root {
        min-width: max-content;
    }
}

/* On phones MudBlazor changes table rows into labelled cards. Let values wrap
   within those cards and keep actions readable instead of forcing overflow. */
@media (max-width: 600px) {
    .report-page {
        padding-left: 8px;
        padding-right: 8px;
    }

    .report-page .mud-table-cell {
        min-width: 0;
        gap: 12px;
        white-space: normal;
    }

    .report-page .mud-table-root {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed;
    }

    .report-page .mud-table-cell > :last-child {
        min-width: 0;
        max-width: 65%;
        overflow-wrap: anywhere;
        text-align: end;
    }

    .report-results-bar,
    .report-results-actions {
        width: 100%;
    }

    .report-results-actions {
        justify-content: flex-start;
    }

    .report-truncate,
    .report-truncate-sm,
    .report-truncate-lg,
    .report-truncate-xl,
    .report-chip-list {
        max-width: 100%;
    }

    .report-truncate,
    .report-truncate-sm,
    .report-truncate-lg,
    .report-truncate-xl {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}
