/* Top navigation (replaces the old sb-sidenav side menu). Bootstrap's own
   .navbar/.sticky-top/.bg-primary handle layout and brand color; these add
   the pill hover/active state, the admin-only divider, and the account
   avatar treatment so it reads as a finished, official-site header rather
   than a bare Bootstrap navbar. */
.main-topnav {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-topnav .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
    font-size: 0.98rem;
    padding: 0.5rem 1rem;
    margin: 0 0.15rem;
    border-radius: var(--bs-border-radius-pill, 50rem);
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.main-topnav .navbar-nav .nav-link:hover,
.main-topnav .navbar-nav .nav-link:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
}

.main-topnav .navbar-nav .nav-link.active {
    color: #fff;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.16);
}

.main-topnav .nav-item-admin {
    margin-left: 0.5rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Account menu, top right: a plain icon reads like a stray button next to
   the pill nav links, so give it the same rounded, "tap target" treatment. */
.main-topnav #navbarDropdown {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.85);
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.main-topnav #navbarDropdown:hover,
.main-topnav #navbarDropdown:focus,
.main-topnav #navbarDropdown[aria-expanded="true"] {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.14);
}

.main-topnav .dropdown-menu {
    margin-top: 0.5rem !important;
}

@media (max-width: 991.98px) {
    .main-topnav .navbar-nav .nav-link {
        margin: 0.15rem 0;
    }

    .main-topnav .nav-item-admin {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }

    .main-topnav #navbarDropdown {
        border-radius: var(--bs-border-radius-pill, 50rem);
        width: auto;
        justify-content: flex-start;
        padding: 0.5rem 1rem;
    }

        .main-topnav #navbarDropdown::after {
            margin-left: 0.4rem;
        }
}

.bg-ISAC {
    background-image: url('../images/login-bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
}

.field-validation-error {
    font-weight: bold;
}

[data-notify="dismiss"] {
    border: none;
    background: transparent;
    color: #393939;
    font-size: 20px;
    padding: 0;
}

[data-notify="dismiss"]:hover {
    color: #000;
}

/* Election "Positions & results" page: the 99-county picker scrolls on its own
   so the office cards stay in view. */
.county-list {
    max-height: 70vh;
    overflow-y: auto;
}

.county-list .list-group-item.active .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.85) !important;
}

/* Results embed (iframe on other sites): no page chrome, transparent so it blends in. */
.embed-body {
    background: transparent;
}

/* Review & apply: the per-county checkbox (or lock icon) sits in its own padded cell at
   the left of each accordion header, centered on the row. */
.review-county-select {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    min-width: 2.75rem;
}

.review-county-select .form-check-input {
    width: 1.15em;
    height: 1.15em;
}

/* The theme (styles.css) is Bootstrap 5.2.3, which doesn't have 5.3's "subtle" background
   and "emphasis" text utilities used by the badges/notes in the election pages - without
   these, those badges render as white text on no background. Values are Bootstrap 5.3's. */
.bg-primary-subtle { background-color: #cfe2ff !important; }
.bg-secondary-subtle { background-color: #e2e3e5 !important; }
.bg-success-subtle { background-color: #d1e7dd !important; }
.bg-info-subtle { background-color: #cff4fc !important; }
.bg-warning-subtle { background-color: #fff3cd !important; }
.bg-danger-subtle { background-color: #f8d7da !important; }

.text-primary-emphasis { color: #052c65 !important; }
.text-secondary-emphasis { color: #2b2f32 !important; }
.text-success-emphasis { color: #0a3622 !important; }
.text-info-emphasis { color: #055160 !important; }
.text-warning-emphasis { color: #664d03 !important; }
.text-danger-emphasis { color: #58151c !important; }
