/**
 * ICDVVA Funding Awards dashboard.
 * Styled to ICDV brand system.
 *
 * @author Fudo
 * @date 2026-07-24
 */

.icdvva-funding-dashboard {
    --icdvva-series-1: #374C56;
    --icdvva-series-2: #386370;
    --icdvva-series-3: #C65128;
    --icdvva-series-4: #DAB2A4;
    --icdvva-series-5: #EBECE5;
    --icdvva-series-6: #D6DFDF;
    --icdvva-series-7: #A8BCAF;
    --icdvva-series-8: #1A1A1A;
    --icdvva-series-9: #7A4F3A;
    --icdvva-series-10: #4A6E6A;
    margin-block: 2rem;
}

/* Charts ----------------------------------------------------------------- */

.icdvva-funding-charts {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-bottom: 1.5rem;
}

@media (min-width: 900px) {
    .icdvva-funding-charts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .icdvva-chart-regions {
        grid-column: 1 / -1;
    }
}

.icdvva-chart-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--icdv-teal-dark, #374C56);
}

.icdvva-chart-canvas {
    position: relative;
    height: 320px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.icdvva-chart-canvas canvas {
    max-width: 100% !important;
}

.icdvva-chart-canvas--tall {
    height: 460px;
}

.icdvva-chart[hidden] {
    display: none;
}

.icdvva-chart-note {
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
    color: var(--icdv-teal-dark, #374C56);
}

/* Table ------------------------------------------------------------------ */

.icdvva-funding-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 16px;
    border: 1px solid var(--icdv-ice, #D6DFDF);
}

.icdvva-funding-table th:not(:last-child),
.icdvva-funding-table td:not(:last-child) {
    border-right: 1px solid var(--icdv-ice, #D6DFDF);
}

.icdvva-funding-table thead th:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.icdvva-funding-table caption {
    caption-side: top;
    font-weight: 700;
    padding-bottom: 0.75rem;
    text-align: left;
    color: var(--icdv-teal-dark, #374C56);
    font-size: 16px;
}

.icdvva-funding-table thead th {
    background: var(--icdv-teal-dark, #374C56);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 20px;
    white-space: nowrap;
    border-bottom: none;
}

.icdvva-funding-table thead th:not(:first-child) {
    text-align: right;
}

.icdvva-funding-table tbody tr:nth-child(even) {
    background: var(--icdv-off-white, #F6F7F3);
}

.icdvva-funding-table tbody tr:hover {
    background: var(--icdv-ice, #D6DFDF);
}

.icdvva-funding-table th,
.icdvva-funding-table td {
    padding: 10px 12px;
    text-align: right;
}

.icdvva-funding-table thead th,
.icdvva-funding-table tbody th {
    text-align: left;
}

.icdvva-funding-table tbody th {
    font-weight: 600;
    color: var(--icdv-black, #1A1A1A);
}

.icdvva-funding-table tfoot th,
.icdvva-funding-table tfoot td {
    border-top: 2px solid var(--icdv-teal-dark, #374C56);
    border-bottom: none;
    font-weight: 700;
    background: var(--icdv-sage, #EBECE5);
    color: var(--icdv-black, #1A1A1A);
}

.icdvva-funding-table a {
    color: var(--icdv-teal, #386370);
    text-decoration: underline;
}

.icdvva-funding-table a:hover {
    color: var(--icdv-rust, #C65128);
}

.icdvva-funding-table:focus-visible {
    outline: 3px solid var(--icdv-teal, #386370);
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .icdvva-funding-table {
        display: block;
        overflow-x: auto;
    }
}
