/* The invoice lists (pre-registration, approval, approved, archived, …): two-line rows with the main
   value on top and details below (InvoiceListHeader / InvoiceListCells). Headers are captions like the
   index panel's section titles; rows are separated by a hairline instead of stripes. */
.invoice-list .mud-table-head .mud-table-cell {
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mud-palette-text-secondary);
    background-color: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

/* Alternate rows a faint grey, so a row is easy to follow across the width; hover still shows on top. */
.invoice-list .mud-table-body .mud-table-row:nth-child(even) {
    background-color: color-mix(in srgb, var(--mud-palette-text-primary) 5%, var(--mud-palette-surface));
}

/* Hover: a light green from the primary colour, so it stands apart from the grey alternate rows. Set through
   MudBlazor's own hover colour: its hover rule is more specific than anything here. */
.invoice-list {
    --mud-palette-table-hover: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface));
}

.invoice-list .mud-table-body .mud-table-cell {
    padding: 8px 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.il-main {
    font-size: 0.875rem;
    line-height: 20px;
}

.il-strong {
    font-weight: 500;
}

.il-sub {
    font-size: 0.75rem;
    line-height: 16px;
    color: var(--mud-palette-text-secondary);
}

.invoice-list .il-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Currency code after the total: smaller and grey, so the amounts still line up by eye. */
.il-currency {
    margin-left: 4px;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--mud-palette-text-secondary);
}

/* Invoice details (company, document type, date, PO), each with a small icon. The line is a flex row so
   the icons don't push the text off its baseline; spacing separates the items. */
.il-sub-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.il-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.il-item .mud-icon-root {
    width: 14px;
    height: 14px;
    font-size: 14px;
    opacity: 0.8;
}

/* Soft status pill in the status's own hue (inline style from StatusColorHelper.ToTintStyle). */
.il-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Due date: the note below it turns red when overdue and amber when due within a week; the date itself
   keeps the normal colour so a list full of old invoices doesn't turn red. */
.il-sub.il-overdue {
    color: var(--mud-palette-error);
}

.il-sub.il-due-soon {
    color: var(--index-warning-text);
}

/* The person holding the task as initials (green: you); attachments as a quiet icon. */
.il-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 500;
    background-color: var(--index-selected-bg);
    color: var(--mud-palette-primary);
}

/* Someone else holds the task: grey instead of the app colour. */
.il-avatar.other {
    background-color: var(--index-field-bg-hover);
    color: var(--mud-palette-text-secondary);
}

/* Claim holder and attachment icons in front of the row. A fixed width that fits both, so the column
   keeps its place (and the other columns theirs) also when no row on the page has either. */
.invoice-list .il-indicators {
    width: 74px;
    min-width: 74px;
    white-space: nowrap;
    padding-right: 4px;
}

.invoice-list .il-indicators > * {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 4px;
}

.invoice-list .il-indicators .mud-icon-root {
    color: var(--mud-palette-text-secondary);
}

/* Document type column: the sort label with the filter button next to it. */
.il-th-with-filter {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.il-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--mud-palette-text-secondary);
}

.il-filter-button .mud-icon-root {
    font-size: 1rem;
}

.il-filter-button:hover {
    background-color: var(--mud-palette-action-default-hover);
}

.il-filter-button.active {
    color: var(--mud-palette-primary);
    background-color: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
}

/* The filter's checklist. */
.doc-type-filter {
    min-width: 220px;
    padding: 8px 8px 4px 8px;
}

.doc-type-filter-title {
    padding: 0 8px 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.doc-type-filter .mud-checkbox .mud-typography {
    font-size: 0.875rem;
}

.doc-type-filter-empty {
    padding: 4px 8px;
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

.doc-type-filter-actions {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--mud-palette-lines-default);
    margin-top: 4px;
    padding-top: 2px;
}
