/* ============================================================
   State Dashboards - site-specific overlays
   Loaded after css/styles.css; small footprint, only the bits
   that the parent (Hawaii) stylesheet doesn't already cover.
   ============================================================ */

/* Inline state selector: the state name in the H1 is the dropdown trigger.
   No chip chrome — reads as part of the title with a small caret. */
.state-selector-wrap {
    position: relative;
    display: inline-block;
}
.header-state-trigger {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--hawaii-blue, #0D7C8F);
    cursor: pointer;
    display: inline-flex;
    align-items: baseline;
    gap: 0.25em;
    line-height: inherit;
}
.header-state-trigger:hover,
.header-state-trigger:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    outline: none;
}
.header-state-trigger .state-selector-label {
    color: inherit;
}
.header-state-trigger .state-selector-caret {
    width: 0.6em;
    height: 0.6em;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.header-state-trigger[aria-expanded="true"] .state-selector-caret {
    transform: rotate(180deg);
}
.state-selector-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--border, #d4d4d4);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    min-width: 18rem;
    max-height: 70vh;
    overflow-y: auto;
    font-size: 0.95rem;
    font-weight: 400;
}
.state-selector-item {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.95rem;
    cursor: pointer;
}
.state-selector-item:hover {
    background: #f3f6f7;
}
.state-selector-item.active {
    color: var(--hawaii-blue, #0D7C8F);
    font-weight: 600;
}
.state-selector-code {
    color: var(--text-muted, #777);
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 1.6rem;
    font-variant-numeric: tabular-nums;
}
.state-selector-item.active .state-selector-code {
    color: var(--hawaii-blue, #0D7C8F);
}
.state-selector-name {
    flex: 1;
}

@media (max-width: 700px) {
    .state-selector-dropdown {
        min-width: min(20rem, calc(100vw - 2rem));
    }
}
