/* d00/ election & geography pages: skip target, focus, data nav, table contrast */

#main-content a:focus-visible,
#main-content button:focus-visible {
    outline: 3px solid #246bce;
    outline-offset: 2px;
}

/* Geo / election sub-nav (shared include) */
#main-content .data_options_nav {
    color: #1a1a1a;
    background-color: #f1f5f9;
    border-color: #94a3b8;
}
#main-content .data_options_nav .form-group > label,
#main-content .data_options_nav .redistricting-fieldset-legend {
    color: #0f172a;
}
#main-content .data_options_nav .radio:not(.disabled) label {
    color: #1a1a1a;
}
#main-content .data_options_nav select.form-control {
    color: #0f172a;
    background-color: #fff;
    border-color: #64748b;
}
#main-content .data_options_nav .disabled label {
    color: #4b5563;
}
#main-content .data_options_nav input[type="radio"]:focus-visible,
#main-content .data_options_nav select:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 2px;
}

/* Legacy mytable2 downloads (orange theme → readable contrast) */
#main-content table.mytable2 {
    border-collapse: collapse;
    width: 100%;
    max-width: 100%;
    color: #1a1a1a;
}

#main-content table.mytable2 caption {
    width: auto;
    max-width: 100%;
    color: #0f172a;
    font: 600 1rem/1.45 system-ui, "Segoe UI", sans-serif;
    font-style: normal;
    text-align: left;
    padding: 0.5rem 0.25rem 0.75rem;
}

#main-content table.mytable2 thead th,
#main-content table.mytable2 tbody th {
    background: #fde68a;
    color: #0f172a;
    border: 1px solid #64748b;
    padding: 0.45rem 0.5rem;
    font: 600 0.8125rem/1.35 system-ui, "Segoe UI", sans-serif;
    text-transform: none;
    letter-spacing: normal;
    vertical-align: bottom;
}

#main-content table.mytable2 tbody th {
    text-align: left;
    vertical-align: top;
}

#main-content table.mytable2 td {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #94a3b8;
    padding: 0.5rem 0.5rem;
    font: 0.8125rem/1.45 system-ui, "Segoe UI", sans-serif;
}

#main-content table.mytable2 td.alt {
    background: #f1f5f9;
    color: #1a1a1a;
}

#main-content table.mytable2 td a,
#main-content table.mytable2 th a {
    color: #0b4f9c;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

#main-content table.mytable2 td a:visited,
#main-content table.mytable2 th a:visited {
    color: #5b21b6;
}

#main-content table.mytable2 th.spec,
#main-content table.mytable2 th.specalt {
    background: #fef3c7;
    color: #0f172a;
    border: 1px solid #64748b;
}

/* Bootstrap data tables on d00 (same as d20 election include) */
#main-content table.d20-data-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 100%;
    color: #1a1a1a;
}

#main-content table.d20-data-table caption.d20-table-caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
    padding: 0.75rem 0.25rem 1rem;
    line-height: 1.45;
}

#main-content table.d20-data-table thead th {
    background: #fde68a;
    color: #0f172a;
    border: 1px solid #64748b;
    padding: 0.5rem 0.45rem;
    vertical-align: bottom;
    text-align: center;
}

#main-content table.d20-data-table tbody th[scope="row"] {
    background: #fef3c7;
    color: #0f172a;
    border: 1px solid #64748b;
    font-weight: 600;
    text-align: left;
    padding: 0.5rem 0.5rem;
    vertical-align: top;
}

#main-content table.d20-data-table tbody td {
    color: #1a1a1a;
    border: 1px solid #94a3b8;
    padding: 0.5rem 0.5rem;
    vertical-align: top;
    text-align: center;
}

#main-content table.d20-data-table tbody tr:nth-child(odd) td:not(.alt) {
    background: #ffffff;
}

#main-content table.d20-data-table tbody tr:nth-child(even) td:not(.alt) {
    background: #f1f5f9;
}

#main-content table.d20-data-table tbody td.alt {
    background: #e8eef5;
    color: #1a1a1a;
}

#main-content table.d20-data-table td a,
#main-content table.d20-data-table th a {
    color: #0b4f9c;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#main-content table.d20-data-table td a:visited,
#main-content table.d20-data-table th a:visited {
    color: #5b21b6;
}

#main-content table.d20-data-table .county-num {
    color: #334155;
    font-weight: 700;
}

/* Generic Bootstrap tables in main (no d20 class) */
#main-content table.table.table-bordered thead th {
    background: #fde68a;
    color: #0f172a;
    border-color: #64748b;
}

#main-content table.table.table-bordered tbody td,
#main-content table.table.table-bordered tbody th {
    border-color: #94a3b8;
    color: #1a1a1a;
}

#main-content table.table.table-bordered td a {
    color: #0b4f9c;
    text-decoration: underline;
    text-underline-offset: 2px;
}
