﻿/*
 * ReportSection page styles — table of contents for a Campaign Finance report.
 * Uses the shared report-grid rules for consistent table header and row colours.
 * Unlike ReportDetail, ibox-content keeps the default white background (#ffffff)
 * to match the legacy Inspinia card appearance.
 */

/* Ensure HTML VIEW links pass WCAG AA on both row backgrounds:
 *   #ffffff  (odd rows)  → ~6.82:1  ✓
 *   #dbedf7  (even rows) → ~5.68:1  ✓
 * !important overrides Kendo Ocean Blue theme link colour rules. */
table.report-grid a {
    color: #0052cc !important;
}

/* ── Shared report-grid styling (also used by ReportDetail) ────────── */
/*
 * Bootstrap 5 applies table striping via a `box-shadow: inset 0 0 0 9999px <color>`
 * overlay driven by --bs-table-bg-type / --bs-table-accent-bg CSS variables, not via
 * background-color.  Kendo's Ocean Blue theme (applied to <body class="k-content">)
 * redefines --bs-table-accent-bg to a grey value, which makes even rows appear grey
 * even though background-color is set correctly with !important.
 * Resetting these variables at the table scope forces the inset box-shadow to resolve
 * to transparent so our explicit background-color rules take full effect.
 */
table.report-grid {
    --bs-table-striped-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-bg-state: initial;
    --bs-table-bg-type: initial;
}

table.report-grid > thead > tr > th,
table.report-grid thead > tr > th,
.table-striped.report-grid > thead > tr > th {
    background-color: #c4e2f7 !important;
    color: inherit;
}

table.report-grid > tbody > tr:nth-of-type(odd) > td,
table.report-grid > tbody > tr:nth-of-type(odd) > th,
table.report-grid tbody > tr:nth-of-type(odd) > td,
table.report-grid tbody > tr:nth-of-type(odd) > th,
.table-striped.report-grid > tbody > tr:nth-of-type(odd) > td,
.table-striped.report-grid > tbody > tr:nth-of-type(odd) > th {
    background-color: #ffffff !important;
}

table.report-grid > tbody > tr:nth-of-type(even) > td,
table.report-grid > tbody > tr:nth-of-type(even) > th,
table.report-grid tbody > tr:nth-of-type(even) > td,
table.report-grid tbody > tr:nth-of-type(even) > th,
.table-striped.report-grid > tbody > tr:nth-of-type(even) > td,
.table-striped.report-grid > tbody > tr:nth-of-type(even) > th {
    background-color: #dbedf7 !important;
}

