/* Shared skin for the Informal-Agreement "schedule" tables so the Proposals dialog and the Submit
   Amendment dialog render an IDENTICAL surface from a SINGLE source of truth instead of two parallel
   stylesheets that can drift. Apply the `proposal-schedule-table` class to each table.

   The Proposals dialog builds its tables with MudBlazor <MudTable> (DOM: .mud-table-head /
   .mud-table-body / .mud-table-cell), while the Submit Amendment dialog uses <MudSimpleTable> (raw
   <thead>/<th>/<tbody>/<td>). Every rule below therefore targets BOTH shapes so the two match exactly.

   This is a global (non-isolated) stylesheet linked from index.html, so it is NOT scoped to a single
   component — that is deliberate: it is the shared contract both dialogs opt into via the class. */

/* Pin the app's Montserrat stack explicitly (the MudTheme Default family). MudTable cells get this
   via MudText/typography, but MudSimpleTable's raw <table>/<th>/<td> markup only inherits it — which
   is fragile (e.g. before the web font loads). Setting it here keeps both tables on the same font. */
.proposal-schedule-table,
.proposal-schedule-table th,
.proposal-schedule-table td,
.proposal-schedule-table .mud-table-cell {
    font-family: var(--mud-typography-default-family, "Montserrat", Arial, sans-serif);
}

/* Elevated white card. */
.proposal-schedule-table {
    background: #fff;
    box-shadow: var(--mud-elevation-4);
    -webkit-border-radius: 2px;
    -moz-border-radius: 0 2px;
    border-radius: 0 2px;
}

.proposal-schedule-table tbody,
.proposal-schedule-table .mud-table tbody {
    background: #fff;
}

/* Navy header bar with white 600-weight headings. !important overrides MudBlazor's sticky-header
   default, which paints header cells the surface (white) colour at equal specificity. */
.proposal-schedule-table .mud-table-head,
.proposal-schedule-table .mud-table-head .mud-table-cell,
.proposal-schedule-table thead th {
    background-color: var(--mud-palette-secondary) !important;
}

.proposal-schedule-table .mud-table-head span,
.proposal-schedule-table thead th {
    text-wrap: nowrap;
    white-space: nowrap;
    font-weight: 600;
    color: #fff;
}

/* Body cells read navy + semibold. */
.proposal-schedule-table .mud-table-body .mud-table-cell,
.proposal-schedule-table tbody td {
    color: var(--mud-palette-secondary);
    font-weight: 600;
}

/* Dense cell padding (6px 16px) + square, borderless header cells. */
.proposal-schedule-table .mud-table-dense * .mud-table-row .mud-table-cell,
.proposal-schedule-table th,
.proposal-schedule-table td {
    padding: 6px 16px;
    min-width: auto;
    height: 42px;
}

.proposal-schedule-table .mud-table-dense * .mud-table-row th.mud-table-cell {
    border-radius: 0px;
    border-bottom: 0px;
    white-space: nowrap;
}

.proposal-schedule-table .mud-table-cell > p,
.proposal-schedule-table .mud-table-cell > a {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 200px;
    font-size: 14px;
    display: block;
}

/* Right-aligned money columns (.currency = MudTable markup, .amount = MudSimpleTable markup). */
.proposal-schedule-table .currency,
.proposal-schedule-table .amount {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Labelled fee rows and reconciled totals read in primary. Covers the Proposals dialog's footer rows
   (.mud-table-foot) and inline .fee cells, plus the Submit Amendment dialog's .fee-row / .total-row. */
.proposal-schedule-table .mud-table-foot *,
.proposal-schedule-table .mud-table-body .mud-table-cell.fee *,
.proposal-schedule-table tr.fee-row td,
.proposal-schedule-table tr.total-row td {
    color: var(--mud-palette-primary) !important; /* override MudText's hard-coded colors */
}

/* Excluded creditor rows read in error (Proposals dialog markup). */
.proposal-schedule-table .mud-table-body .mud-table-cell.excluded * {
    color: var(--mud-palette-error);
}
