/* --- Choices.js: Ellipsis and Wrapping Fixes for Dropdowns --- */
#er #menu .choices__list--single .choices__item,
#er #menu .choices__item.choices__item--selectable {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: block;
}

#er #menu .choices__list--dropdown .choices__item--selectable,
#er #menu .choices__list[aria-expanded] .choices__item--selectable {
    word-break: break-word;
    white-space: normal;
    overflow-wrap: anywhere;
    /* Prevents breaking in the middle of words unless necessary */
}
/* Header */
#er #er_brand {
    padding-bottom: 8px;
    table-layout: fixed;
}

#brand .landscape {
    height: 75px;
}

#er #labels {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr;
    gap: 12px;
    margin-top: 12px;
    box-sizing: border-box;
}

    #er #labels label {
        font-weight: bold;
        text-align: left;
        padding: 0;
        min-height: 20px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

#er #menu {
    margin-top: 4px;
    display: grid;
    grid-template-columns: 1fr 2fr 2fr;
    gap: 12px;
    box-sizing: border-box;
    align-items: start;
    padding-right: 2px;
}

    #er #menu select {
        padding: 6px 8px;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 14px;
        width: 100%;
    }

    /* Choices.js overrides for the group/contest menu */
    #er #menu .choices {
        width: 100%;
        font-size: 14px;
        margin-bottom: 0; /* override Choices default of 24px */
        overflow: visible; /* prevent caret being clipped on right edge */
        color: #000;
    }

    #er #menu .choices__inner {
        padding: 0;
        border: 1px solid #A6A6A6;
        border-radius: 4px;
        min-height: 0;
        background-color: #fff;
        font-size: 14px;
    }

    /* Override padding-bottom that select-one adds */
    #er #menu .choices[data-type*="select-one"] .choices__inner {
        padding-bottom: 0;
    }

    /* Vertically pad the single selected item to match native select height */
    #er #menu .choices__list--single {
        padding: 6px 24px 6px 8px; /* right space reserves room for the caret */
        line-height: 1.4;
    }

    /* Keep border consistent on focus/open — must beat .is-focused .choices__inner specificity */
    #er #menu .is-focused .choices__inner,
    #er #menu .is-open .choices__inner {
        border-color: #0077be;
        outline: none;
    }

    #er #menu .choices__input {
        font-size: 14px;
        margin-bottom: 0;
        background-color: transparent;
    }

    #er #menu .choices__list--dropdown,
    #er #menu .choices__list[aria-expanded] {
        z-index: 1001;
        border-color: #A6A6A6;
    }

    /* Remove the padding-right:100px that Choices.js reserves for "Press to select" hint text */
    #er #menu .choices__list--dropdown .choices__item--selectable,
    #er #menu .choices__list[aria-expanded] .choices__item--selectable {
        padding-right: 10px;
    }

    #er #menu .choices__list--dropdown .choices__item--selectable::after,
    #er #menu .choices__list[aria-expanded] .choices__item--selectable::after {
        display: none;
    }

    #er #menu .choices__group-heading {
        padding: 4px 10px;
        font-weight: bold;
        font-size: 12px;
        color: #444444;
        background: #f0f0f0;
        border-bottom: 1px solid #ddd;
    }

    #er #menu .choices__group-heading--clickable {
        cursor: pointer;
    }

        #er #menu .choices__group-heading--clickable:hover {
            background: #dce8f5;
            color: #0077be;
        }

    #er #menu .choices__placeholder {
        opacity: 1;
        color: #444444;
    }

    /* Hide the placeholder from the open dropdown list */
    #er #menu .choices__list--dropdown .choices__placeholder,
    #er #menu .choices__list[aria-expanded] .choices__placeholder {
        display: none;
    }

    #er #menu.stuck {
        position: fixed;
        top: 0;
        left: 0;
        margin: 0;
        padding: 4px 8px;
        width: 100%;
        background: #fff;
        z-index: 999;
        text-align: left;
        border-top: 1px solid #A6A6A6;
        box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
        /* Switch from grid to flex so visible items size independently */
        display: flex;
        align-items: center;
        gap: 8px;
    }

        /* Jump-to dropdown: 30% of the sticky bar */
        #er #menu.stuck .choices {
            width: 30%;
            flex-shrink: 0;
            margin-bottom: 0;
        }

        /* Back to top: only as wide as its text */
        #er #menu.stuck #scroll-top {
            margin: 0;
            padding: 6px 10px;
            font-size: 14px;
            font-family: Arial;
            line-height: 1.4;
            color: #444444;
            background: #eee;
            border: 1px solid #555555;
            cursor: pointer;
            float: none;
            white-space: nowrap;
            width: auto;
            flex-shrink: 0;
            box-sizing: border-box;
        }

            #er #menu.stuck #scroll-top:hover {
                background: #E5F1FB;
                border: 1px solid #0077be;
            }

            #er #menu.stuck #scroll-top::-moz-focus-inner {
                border: 0;
                padding: 0;
            }

        #er #menu.stuck .precincts-reporting {
            padding: 8px 8px 0 8px;
            font-size: 12px;
        }

        /* Time-stamp: push to far right via flex, hidden in normal mode */
        #er #menu .time-stamp {
            display: none;
        }

        #er #menu.stuck .time-stamp {
            display: block;
            flex-shrink: 1;
            font-size: 12px;
            color: #555;
            text-align: left;
            line-height: 1.4;
            min-width: 150px;
            box-sizing: border-box;
            overflow: hidden;
            word-wrap: break-word;
        }

.election-results-image {
    display: table-cell;
    width: 60px;
    vertical-align: middle;
}

    .election-results-image img {
        width: 50px;
        height: 50px;
    }

.election-results-header {
    display: table-cell;
    width: 100%;
    font-size: 30px;
    font-weight: bold;
    vertical-align: bottom;
}

.election-list {
    display: table-cell;
    width: 116px;
    vertical-align: bottom;
}

#election-title .hd_pri {
    padding-bottom: 8px;
}

#precinct-title .hd_pri {
    padding-bottom: 5px;
}

.precinct-title {
    padding-bottom: 5px;
    display: inline;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 36px;
}

.election-title {
    display: inline;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 34px;
}

#cand-reg-title {
    margin-top: 20px;
    font-size: 20px;
    border-bottom: 1px solid #cccccc;
}

    #cand-reg-title .hd_pri {
        font-size: 36px;
    }

.election-textonly-title {
    display: inline;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 28px;
}

.election-sub-title {
    display: inline;
    margin: 0px 12px;
    font-size: 18px;
}

#election-chart {
    font-family: Arial, Helvetica, sans-serif;
    margin: 12px 0;
    overflow: hidden;
    border-bottom: 1px solid #ccc;
}

    #election-chart .chart-container {
        height: 130px;
        text-align: center;
    }

#election-footer {
    color: #333333;
    font-size: 11px;
}

    #election-footer div.row {
        margin: 0px;
    }

    #election-footer div {
        margin: 6px 0px 6px 0px;
    }

.hd_pri {
    text-transform: none;
    margin: 24px 0 0;
    background: none;
    color: #111;
    font-weight: normal;
    border-bottom: 3px solid #0077be;
}

.hd_pri_text {
    text-transform: none;
    margin: 0;
    background: none;
    color: #111;
    font-weight: normal;
    border-bottom: 3px solid #0077be;
}

#er .hd2 {
    padding: 0;
    margin: 0 0 4px 0;
    border: none;
}

#contest-data {
    font-family: Arial, Helvetica, sans-serif;
}

.contest-group-title {
    padding: 8px 0;
    font-size: 28px;
    float: left;
}

.contest {
    padding: 0 4px 12px 4px;
}

.contest-title {
    position: relative;
    padding: 20px 0 8px 0;
    margin: 0 0 4px 0;
    font-weight: normal;
    font-size: 18px;
    border-bottom: 1px solid #000000;
    color: #111;
}

.precinct_title {
    position: relative;
    padding: 20px 0 8px 0;
    margin: 0 0 4px 0;
    font-weight: normal;
    font-size: 16px;
    border-bottom: 1px solid #000000;
    color: #111;
}

.contest-sub-title {
    margin-top: 4px;
    font-size: 13px;
    font-weight: normal;
    color: #767676;
}

.contest-sub-title-shown {
    margin-top: 4px;
    font-size: 13px;
    font-weight: normal;
    color: #000;
}

.contest-pad {
    position: relative;
    height: 8px;
}

.contest-info {
    margin-top: 4px;
    text-align: left;
    color: #595959;
    font-size: 13px;
}

    .contest-info span {
        padding: 0 4px;
        /*border-right: 1px solid #cccccc;*/
    }

.candidate-winner {
    font-weight: bold;
}

.candidate .row {
    table-layout: fixed;
}

.candidate-name {
    padding: 0 8px;
    text-align: left;
}

.data {
    display: table-cell;
}

.res {
    font-size: 14px;
    padding: 0;
    border-bottom: 1px solid #ccc;
}

    .res .row {
        border: none;
    }

    .res .keys {
        width: 40px;
        vertical-align: middle;
    }

        .res .keys .key {
            text-align: center;
            width: 40px;
            height: 40px;
            font-size: 28px;
            font-weight: normal;
        }

    .res .key .pad_t {
        padding-top: 5px;
    }

    .res .name {
        width: 17%;
        height: 25px;
        vertical-align: middle;
        display: table-cell;
    }

    .res .perc {
        width: 50px;
        text-align: right;
        vertical-align: middle;
        padding: 0 8px 0 0;
    }

    .res .bar-container {
        width: 532px;
        vertical-align: middle;
    }

.bar-background {
    background: #B3B3B3;
    height: 18px;
}

    .bar-background .bar {
        width: 0px;
        height: 18px;
    }

.res .total {
    position: static !important;
    width: 80px;
    top: auto !important;
    margin: 0;
    float: none;
    vertical-align: middle;
    text-align: right;
}

/**
    Party Colors
*/

/* Ballot Colors */
.key-democratic {
    background: #3F6F9C;/*updated*/
}

.key-republican {
    background: #6F4D99;/*updated*/
}

.key-green {
    background: #C4002B;/*updated*/
}

.key-libertarian {
    background: #A37A00;/*updated*/
}

.key-independent {
    background: #9A7A33;/*updated*/
}

.key-peace-and-freedom {
    background: #8C6A3D;/*updated*/
}

.key-american-independent {
    background: #C25600;/*updated*/
}

.key-americans-elect {
    background: #595959;/*updated*/
}

.key-non-partisan {
    background: #1F6B1C;/*updated*/
}

/* VR, Sample Ballot Colors */
/*.key-democratic {
    background: #b7ccdb;
}
.key-republican {
    background: #c9add8;
}
.key-green {
    background: #fc758e;
}
.key-libertarian {
    background: #ede5ad;
}
.key-independent {
    background: #C2A86A;
}
.key-peace-and-freedom {
    background: #d8b596;
}
.key-american-independent {
    background: #fccc93;
}
.key-americans-elect {
    background: #aaaaaa;
}
.key-non-partisan {
    background: #aadd96;
}*/

.key-yes {
    background: #3C5B1D;
}

.key-no {
    background: #92191B;
}

#key {
    font-size: 12px;
}

    #key .key {
        margin-right: 2px;
        width: 15px;
        height: 15px;
    }

.loading {
    position: absolute;
    top: 18px;
    left: -40px;
}

.m select {
    margin: 0 4px 0 0;
    padding: 4px;
}

.m select,
.m option {
    font-size: 16px;
}

.dx-menu {
    font-size: 15px;
    font-weight: normal;
    font-family: Arial, Helvetica, sans-serif;
}

.dx-menu-base .dx-menu-item-content {
    padding: 12px;
}

#content {
    margin-top: 5px;
}

#pg_content {
    padding: 0;
    min-height: 800px;
    border-top: none;
    border-bottom: none;
    padding-top: 0;
    max-width: 100%;
    box-sizing: border-box;
}

#div_pg_content {
    padding: 0;
    min-height: 800px;
    border-top: none;
    border-bottom: none;
    padding-top: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.elec_result_menu ul li {
    list-style-type: none;
}

.elec_result_menu ul#list_sort_alpha {
    padding-left: 0px;
}

.elec_result_menu .list_items, #content_det ul {
    padding-left: 0px;
}

    .elec_result_menu .list_items li,
    .expandable_item,
    #content_det ul li {
        margin-bottom: 0px;
    }

    .elec_result_menu ul.list_items li,
    li#item_sort_alpha,
    li#item_sort_alpha li,
    #content_det ul li {
        background: none;
        background-repeat: no-repeat;
        background-position: 0% top;
        padding-left: 0px;
    }

        .elec_result_menu ul.list_items li,
        li#item_sort_alpha,
        li#item_sort_alpha li,
        #content_det ul li {
            background: none;
            background-repeat: no-repeat;
            background-position: 0% top;
            padding-left: 0px;
        }

.scroll_up {
    position: fixed;
    bottom: 0;
    right: 100px;
    display: none;
    text-indent: -9999px;
    background-color: #0077be;
}

.txt_lrg {
    font-size: 22px;
}

/* Fixed Footer */
#body {
    padding-bottom: 100px;
}

#footer {
    background-color: #333333;
    padding-top: 10px;
    width: 100%;
    height: 100px;
    bottom: 0;
    left: 0;
    position: absolute;
}

html,
body,
form,
.sfPublicWrapper {
    height: 100%;
}

/* Text Only Site */
#er_txt_nav_list {
    width: 180px;
    display: table-cell;
    vertical-align: top;
    padding-top: 5px;
    padding-right: 2px;
    border-right: 1px solid #cccccc;
}

#er_txt_chg_election {
    display: table-cell;
    width: 145px;
    vertical-align: bottom;
}

    #er_txt_chg_election a {
        display: table-cell;
        width: 200px;
        vertical-align: bottom;
        font-size: 16px;
        font-weight: bold;
        font-size: 16px;
        font-weight: bold;
    }

#er-txt-content {
    display: table-cell;
    padding-left: 25px;
}

#er_txt_contest_table,
.er_txt_contest_table {
    width: 100%;
    font-size: 15px;
}

    #er_txt_contest_table tr,
    .er_txt_contest_table tr {
        padding: 5px 0 5px 0;
    }

    #er_txt_contest_table .table-td-l,
    .er_txt_contest_table .table-td-l {
        width: 50%;
        text-align: left;
    }

    #er_txt_contest_table .table-td-r1,
    .er_txt_contest_table .table-td-r1 {
        width: 15%;
        text-align: right;
    }

    #er_txt_contest_table .table-td-r2,
    .er_txt_contest_table .table-td-r2 {
        width: 35%;
        text-align: right;
    }

.er_txt_contest_group {
    max-width: none;
    padding-top: 10px;
    font-size: 28px;
}

.er_txt_nav_list_item {
    padding-bottom: 5px;
}

#m_er_txt_nav_list {
    display: none;
}

#er_txt_table {
    width: 100%;
    display: table;
    padding-top: 10px;
}

#er_txt_stats_table {
    width: 100%;
    display: table;
}

#er_txt_stats_row {
    display: table-row;
    padding-left: 100px;
    width: 100%;
}

#er_txt_stats_data {
    width: 25%;
    padding-left: 10px;
    display: table-cell;
}

#er_txt_stats_tbl li {
    list-style-image: url("/images/icon_list_item.png");
    padding-bottom: 10px;
    margin-left: 30px;
}

.border_blue_lrg {
    border-bottom: 7px solid #0077be;
    padding-bottom: 4px;
    table-layout: fixed;
}

#er_list_txt_caption {
    font-size: 18px;
}

/* Precincts Reporting */
._3_col th,
._3_col td {
    width: 30%;
}

#precincts_reporting th,
#precincts_reporting td {
    width: 42%;
    height: 42px;
    border-bottom: 1px solid #A6A6A6;
}

#precincts_reporting .hdr {
    width: 50%;
    /*height: 42px;*/
    border-bottom: 1px solid #A6A6A6;
    padding-bottom: 5px;
    font-weight: bold;
    margin-bottom: -2px;
}

#precincts_reporting .perc {
    padding: 10px 0 10px 0;
    border-bottom: 1px solid #A6A6A6;
}
/* #precincts_reporting .perc .bar_slot { */
.bar_slot {
    width: 800px;
    max-width: 100%;
    background-color: #A6A6A6;
}

#precincts_reporting .perc .num {
    width: 40px;
    padding-top: 7px;
}

#precincts_reporting .perc .bar {
    background-color: #0077be;
    height: 32px;
}

#precincts_reporting #precinct_rep {
    font-size: 18px;
}

#precincts_reporting .submit {
    background-color: #0077be;
    color: #ffffff;
    font-weight: bold;
    height: 38px; /* 36px; */
    width: 100px;
    border: none;
}

    #precincts_reporting .submit:hover {
        opacity: .7;
    }

#sub_desc {
    font-size: 11px;
    color: #595959;
}

#precinct_sub_desc {
    font-size: 11px;
    color: #595959;
    border-top: 1px solid #ccc;
    padding-top: 10px;
    margin-bottom: 30px;
}
/* #srch_precincts #sel { */
.sel {
    width: 380px;
}

#nav_primary_drop_down .nav-item a:hover {
    background-color: #0077be;
    color: #ffffff;
}

#pr_srch {
    margin-top: 10px;
}

    #pr_srch #pr_srch_box {
        padding: 5px;
        border: 1px solid #0077be;
    }

    #pr_srch input {
        width: 200px;
        border: none;
    }

        #pr_srch input::-ms-clear {
            display: none;
        }

    #pr_srch #input {
        width: 80%;
    }

    #pr_srch #btn_filter {
        background-color: #cccccc;
        color: #ffffff;
        text-transform: uppercase;
        padding: 4px;
        cursor: default;
        float: left;
        width: 65px;
    }

.precinct_srch_desc {
    position: relative;
    padding: 20px 0 10px 0;
    margin: 0 0 10px 0;
    font-weight: normal;
    font-size: 18px;
    color: #111;
    /*border-bottom: 1px solid #cccccc;*/
}

#precinct_srch_box {
    width: 280px;
}

#precinct_srch_res {
    border-top: 1px solid #cccccc;
}
/*.candList-title {
    padding-bottom: 5px;
    display: inline;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 32px;*/
/*#app_brand {
    color: #000000;
}*/

/* Mobile */
@media screen and (max-width: 64em) {
    #er .elec_type .pie {
        width: 100%;
    }

    #er .pie:nth-child(1) {
        margin-right: 0;
    }

    #er #labels {
        display: none;
    }

    #er #menu {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 10px;
        padding: 0;
    }

        #er #menu select {
            width: 100%;
            box-sizing: border-box;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 14px;
            color: #000;
            padding: 6px 8px;
            border: 1px solid #595959;
            border-radius: 4px;
            background-color: #fff;
        }

    #group-menu {
        width: 100%;
        margin-bottom: 4px;
    }

    #er #menu.stuck {
        padding: 4px;
        box-sizing: border-box;
        flex-wrap: wrap;
        align-items: center;
    }

        /* Full-width dropdown on mobile sticky bar */
        #er #menu.stuck .choices {
            width: 100%;
            flex-shrink: 1;
        }

        #er #menu.stuck #scroll-top {
            float: none;
            width: auto;
        }

        #er #menu.stuck .precincts-reporting {
            display: block;
            padding: 4px 8px 0 4px;
            font-size: 12px;
        }

        #er #menu.stuck .time-stamp {
            display: block;
            padding: 8px 8px 4px 4px;
            font-size: 12px;
            float: none;
        }

    #scroll-top {
        margin-top: 4px;
    }

    .election-results-header {
        font-size: 22px;
    }

    .election-title {
        display: block;
        padding: 0;
        font-size: 24px;
    }

    .election-textonly-title {
        display: inline;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 28px;
        max-width: 170px;
    }

    .election-sub-title {
        display: block;
        padding-top: 10px;
        bottom: 0;
        font-size: 16px;
        float: right;
    }

    .graph-container {
        display: block;
        margin: 0;
    }

    .election-list {
        display: none;
    }

    .election-list-button {
        display: block;
        margin: 10px 0;
        padding: 8px 14px;
        font-size: 14px;
        font-family: Arial, Helvetica, sans-serif;
        font-weight: bold;
        text-align: center;
        text-decoration: none !important;
        color: #fff !important;
        background: #0077be;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }

        .election-list-button:hover {
            background: #005f99;
        }

    #footer {
        background-color: #333333;
        padding-top: 10px;
        width: 100%;
        height: 180px;
        bottom: 0;
        left: 0;
        position: static;
        float: left;
    }

    .res {
        padding-bottom: 6px;
    }

        .res .row {
            margin: 2px;
            padding: 0;
        }

        .res .candidate {
            margin-bottom: 5px;
        }

        .res .keys {
            width: 24px;
        }

            .res .keys .key {
                width: 24px;
                height: 24px;
                font-size: 14px;
                font-weight: bold;
            }

        .res .key .pad_t {
            padding-top: 4px;
        }

        .res .name {
            width: auto;
        }

        .res .perc {
            width: 40px;
            padding: 0;
        }

        .res .total {
            width: 80px;
        }

        .res .bar-container {
            width: 100%;
        }

        .res .bar-background {
            height: 12px;
        }

            .res .bar-background .bar {
                height: 12px;
            }

    #body {
        padding-bottom: 180px;
    }

    html,
    body,
    form,
    .sfPublicWrapper {
        height: 100%;
    }

    /* Text Only Site */
    #er_txt_nav_list {
        display: none;
    }

    #er-txt-content {
        display: table-cell;
        padding-left: 0px;
    }

    #er_txt_stats_data {
        width: 100%;
        display: table-row;
    }

    .er_txt_contest_group {
        max-width: 170px;
        font-size: 20px;
        float: left;
    }

    #m_er_txt_nav_list {
        display: block;
    }

    #er_txt_chg_election {
        display: none;
    }

    .popup {
        left: 0 !important;
        top: 0 !important;
        z-index: 1000 !important;
        width: 100% !important;
        height: 100% !important;
    }
}

#project {
    min-height: 100%;
    position: relative;
}

/* Desktop: when content forces a horizontal scrollbar, make #project grow
   so #header (overflow:hidden) and #footer (position:absolute width:100%)
   both span the full scrollable width instead of stopping at viewport edge. */
@media screen and (min-width: 64.0625em) {
    #project {
        min-width: min-content;
    }
}

hr {
    color: #595959;
    background-color: #cccccc;
    height: 1px;
    width: 100%;
    border: 0 none;
}

#page .caption_text {
    font-size: 12px;
    color: #595959;
}

.top_button {
    position: absolute;
    right: 0px;
    bottom: 0px;
    font-size: 16px;
    font-weight: bold;
}

/* Loading */
.loading_ind {
    top: 50%;
    left: 50%;
}

    .loading_ind div {
        width: 65px;
    }



#er_txt_go_election {
    display: table-cell;
    width: 145px;
    vertical-align: bottom;
}

    #er_txt_go_election a {
        display: table-cell;
        /*width: 1000px;*/
        vertical-align: bottom;
        font-size: 16px;
        font-weight: bold;
        font-size: 16px;
        font-weight: bold;
    }


/**LACERA Start**/
.LaceraTable {
    position: center;
    width:100%;
    border-collapse: collapse;
    text-align: center;
}

    .LaceraTable th {
        padding: 20px;
        border: 1px solid #aaaaaa;
        border-collapse: collapse;
        background: white;
        text-align: center;
        font-size: medium;
    }

    .LaceraTable tr:hover td {
        background-color: aqua;
    }

    .LaceraTable tr:nth-child(odd) {
        background: #CEE3F6;
    }

    .LaceraTable tr:nth-child(even) {
        background: white;
    }
    
    .LaceraTable tr:last-child td {
       
        border-top: double;
         /*background: white;*/
         font:bold;
    }

    .LaceraTable td {
        padding: 10px;        
        border: 1px solid #595959;
        border-collapse: collapse;
    }

/* Contest Filter */
.contest-filter {
    margin-top: 5px;
    font-size: 11px;
}
    .contest-filter > span {
        display: block;
        padding: 5px;
    }
    .contest-filter:hover {
        opacity: .75;
    }
    .contest-filter .label {
        padding: 5px;
    }
#popup-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #003471;
    opacity: .75;
    z-index: 100;
    display: none;
}
.popup {
    position: fixed;
    margin: auto;
    padding: 0 !important;
    left: 25%;
    top: 12%;
    z-index: 200;
    width: 50%;
    height: 50%;
    display: none;
    overflow-y: inherit !important;
    border-top: 5px solid #13b5ea;
    border-right: 1px solid #595959;
    border-bottom: 1px solid #595959;
    border-left: 1px solid #595959;
}
    .popup #popup-header {
        background-color: #003471;
        padding: 10px;
        box-sizing: border-box;
    }
        .popup #popup-header .title {
            font-size: 24px;
            font-weight: normal;
            color: #fff !important;
        }
    .popup .popup-content {
        background-color: #fff;
        line-height: 1.6em;
        position: relative;
        height: 100%;
        padding: 10px;
        overflow-y: scroll;
    }
        .popup .popup-content > div {
            display: table;
        }
        .popup .popup-content .description {
            padding: 5px 25px 25px 25px;
        }
        .popup .popup-content .filter-option:last-child {
            padding-bottom: 70px;
        }
.unfiltered {
    display: none;
}
.disabled {
    pointer-events: none;
    opacity: .7;
}
.contest-filter-sticky > .base {
    float: none;
}
#button_refresh {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #003471;
    color: #fff;
    z-index: 100;
    border: 1px solid #fff;
}
    #button_refresh div:first-child {
        padding: 15px 5px 10px 15px;
    }
    #button_refresh div:last-child {
        padding: 8px 10px 5px 5px;
    }

/* Initial hidden states — replaces inline style="display:none" / style="visibility:hidden" attributes */
#scroll-top { display: none; }
#contest-filter-sticky { display: none; }
#header-stats { display: none; }
.precincts-reporting { display: none; }
/*.time-stamp { display: none; }*/
#process-running { visibility: hidden; }
.process-indicator-row { margin-bottom: -30px; }
/* ElectionList */
.electonContent.indent.fs { display: block; }
/* IndexTextOnly */
.textonly-top-right { margin-top: 10px; }
.hd_pri.row { position: relative; }
/* Align header title row with the body content container */
#header #title_row .main_content {
    width: 100%;
    max-width: 1416px;
    margin: 0 auto;
    box-sizing: border-box;
}
/* Keep footer policy links centered */
#footer .landscape {
    width: 100%;
}
#footer #policy {
    float: none;
    width: 100%;
    display: block;
    text-align: center;
}
#footer #policy > div {
    text-align: center;
}
/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-nav {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 9999;
    padding: 8px 16px;
    background: #fff;
    color: #000;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid #000;
}
.skip-nav:focus {
    top: 0;
}
.textonly-bottom-row { position: relative; margin: 24px 0 0; }

/* Outer page sidebar layout */
#page-sidebar-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    max-width: 1416px; /* 1100 content + 16 gap + 300 sidebar */
    margin: 0 auto;
}

#page-sidebar-layout > .main_content {
    flex: 1;
    margin: 0;
    overflow-x: clip;
}

#contest-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 52px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background: #fafafa;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    box-sizing: border-box;
    text-align: left;
}

#contest-sidebar-progress {
    display: none;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 8px;
    overflow: hidden;
}

#contest-sidebar-progress-bar {
    height: 100%;
    width: 0%;
    background: #0077be;
    border-radius: 2px;
    transition: width 0.1s ease;
}

#contest-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #0077be;
}

#contest-sidebar-title {
    font-weight: bold;
    font-size: 14px;
}

#contest-sidebar-toggleall {
    font-size: 11px;
    padding: 2px 6px;
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    font-family: Arial, Helvetica, sans-serif;
}

#contest-sidebar-toggleall:hover {
    background: #e5f1fb;
    border-color: #0077be;
}

.contest-sidebar-item {
    display: flex;
    align-items: flex-start;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    line-height: 1.3;
}

.contest-sidebar-item:last-child {
    border-bottom: none;
}

.contest-sidebar-item input[type="checkbox"] {
    margin-right: 6px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.contest-sidebar-group-item {
    font-weight: bold;
    font-size: 13px;
    background: #fafafa;
    margin: 0 -10px;
    padding: 5px 10px;
    border-bottom: 1px solid #ddd;
    user-select: none;
}

.contest-sidebar-group-item:last-child {
    border-bottom: none;
}

.contest-sidebar-group-toggle {
    display: inline-block;
    margin-right: 5px;
    font-size: 10px;
    transition: transform 0.15s;
    flex-shrink: 0;
}

.contest-sidebar-group-toggle.expanded {
    transform: rotate(90deg);
}

.contest-sidebar-children {
    padding-left: 12px;
    display: none;
}

.contest-sidebar-children.expanded {
    display: block;
}

.contest-sidebar-child-item {
    font-size: 12px;
    color: #333;
}

.contest-sidebar-group:last-child .contest-sidebar-group-item {
    border-bottom: none;
}

@media screen and (max-width: 64em) {
    #page-sidebar-layout {
        display: block;
    }

    #contest-sidebar {
        display: none;
    }
}

/* Mobile collapsible filter — hidden on desktop, shown on mobile */
#mobile-contest-filter {
    display: none;
}

@media screen and (max-width: 64em) {
    #mobile-contest-filter {
        display: block;
        margin: 6px 0 0;
        border: 1px solid #ccc;
        border-radius: 4px;
        background: #fff;
        font-size: 14px;
        font-family: Arial, Helvetica, sans-serif;
        color: #000;
    }

    #mobile-contest-filter-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 8px;
        background: none;
        border: none;
        font-size: 14px;
        font-family: Arial, Helvetica, sans-serif;
        font-weight: normal;
        color: #000;
        cursor: pointer;
        text-align: left;
    }

    #mobile-contest-filter-caret {
        font-size: 10px;
        transition: transform 0.2s;
        flex-shrink: 0;
    }

    #mobile-contest-filter-toggle[aria-expanded="true"] #mobile-contest-filter-caret {
        transform: rotate(180deg);
    }

    #mobile-contest-filter-body {
        display: none;
        border-top: 1px solid #ccc;
        padding: 8px 10px;
        max-height: 50vh;
        overflow-y: auto;
        font-size: 14px;
        font-family: Arial, Helvetica, sans-serif;
        color: #000;
    }

    #mobile-contest-filter-body.expanded {
        display: block;
    }

    #mobile-contest-sidebar-header {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 6px;
    }

    #mobile-contest-sidebar-progress {
        display: none;
        height: 4px;
        background: #e0e0e0;
        border-radius: 2px;
        margin-bottom: 8px;
        overflow: hidden;
    }

    #mobile-contest-sidebar-progress-bar {
        height: 100%;
        width: 0%;
        background: #0077be;
        transition: width 0.1s ease;
    }
}