/* --------------------------------------------------------------------------
   Location selector (inc/locator.php · assets/js/locator.js)
   --------------------------------------------------------------------------
   Figma "Location selector · v2" (ClogBusters_2026, node 1614:10293).
   - .locator        top-bar chip + dropdown (desktop) / bottom sheet (≤991px)
   - .loc-confirm    "Now showing …" bar under the navy bar
   - .loc-modal      first-visit modal (3-up cards; rows on ≤767px)
   States live on .locator: .is-set (branch chosen), .is-open. */

/* ==========================================================================
   Chip
   ========================================================================== */

.locator { position: relative; }

.locator__chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 217px;
    height: 40px;
    padding: 8px 12px 7px 14px;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background-color: var(--color-navy);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.locator.is-set .locator__chip {
    min-width: 0;
    border-color: var(--color-lime);
    font-weight: 600;
}

.locator.is-open .locator__chip { background-color: var(--color-navy-raised); }

.locator__chip:focus-visible {
    outline: 2px solid var(--color-navy);
    outline-offset: 2px;
}

.locator__chip-pin { flex: none; width: 18px; height: 18px; color: var(--color-lime); fill: var(--color-lime); stroke: var(--color-navy); }
.locator__chip-label { flex: 1 1 auto; text-align: left; }
.locator__chip-caret { flex: none; width: 16px; height: 16px; color: var(--color-lime); transition: transform 0.2s ease; }
.locator.is-open .locator__chip-caret { transform: rotate(180deg); }

/* ==========================================================================
   Panel — desktop dropdown
   ========================================================================== */

.locator__scrim { display: none; }

.locator__panel {
    position: absolute;
    /* Flush with the bottom of the lime bar (the chip is centred in it). */
    top: calc(100% + (var(--topbar-h) - 40px) / 2);
    left: -8px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    width: 440px;
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
    background-color: var(--color-white);
    box-shadow: var(--shadow-lift);
    font-family: var(--font-body);
    color: var(--color-navy);
}

.locator__panel[hidden],
.locator__scrim[hidden] { display: none; }

.locator__handle { display: none; }

.locator__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: none;
    height: 92px;
    padding: 16px 20px;
    background-color: var(--color-navy-raised);
}

.locator__head-copy { flex: 1 1 auto; min-width: 0; }

.locator__title {
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-white);
}

.locator__sub {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-lavender);
}

.locator__geo {
    display: inline-flex;
    align-items: center;
    flex: none;
    border: 0;
    font-family: var(--font-body);
    cursor: pointer;
}

.locator__geo--pill {
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background-color: var(--color-navy-border);
    color: var(--color-lime);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.locator__geo--row { display: none; }

.locator__geo.is-busy { opacity: 0.6; cursor: progress; }

.locator__close {
    display: none;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-white);
    cursor: pointer;
}

.locator__tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: none;
    padding: 12px 12px 4px;
}

.locator__search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--color-hairline);
    border-radius: var(--radius-sm);
    background-color: var(--color-surface);
    cursor: text;
}

.locator__search:focus-within { border-color: var(--color-navy); }

.locator__search-icon { flex: none; width: 18px; height: 18px; color: var(--color-slate); }

.locator__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-navy);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.4;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.locator__input::placeholder { color: var(--color-placeholder); opacity: 1; }
.locator__input::-webkit-search-cancel-button { cursor: pointer; }

/* Rows ---------------------------------------------------------------- */
.site-header .locator__list,
.locator__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    /* Panel chrome (head + search + foot) is ~290px below the top bar. */
    max-height: calc(100vh - 290px);
    margin: 0;
    padding: 4px 12px 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    outline: none;
}

.locator__group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 8px 6px;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
}

.locator__state {
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-slate);
}

.locator__count { font-weight: 500; color: var(--color-slate-muted); }

.locator__option {
    display: flex;
    align-items: center;
    gap: 12px;
    /* 11px right (comp 12): the real branch numbers set ~3px wider in Anton
       than the comp's, which would clip the longest row line. */
    padding: 10px 11px 10px 12px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.locator__option[hidden],
.locator__group[hidden],
.locator__empty[hidden] { display: none; }

.locator__option:hover,
.locator__option.is-active { background-color: var(--color-surface-alt); }

.locator__option.is-active { outline: 2px solid var(--color-navy); outline-offset: -2px; }

.locator__option[aria-selected="true"],
.locator__option.is-current,
.locator__option.is-suggested {
    border-color: var(--color-lime);
    background-color: var(--color-lime-pale);
}

.locator__pin { flex: none; width: 18px; height: 18px; color: var(--color-navy); }
.locator__option[aria-selected="true"] .locator__pin,
.locator__option.is-current .locator__pin,
.locator__option.is-suggested .locator__pin { color: var(--color-lime-dark); }

.locator__copy {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}

.locator__name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-navy);
    white-space: nowrap;
}

.locator__meta {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-slate);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.locator__meta--short { display: none; }

.locator__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

.locator__phone {
    flex: none;
    font-family: var(--font-display);
    font-size: 15px;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--color-navy);
    white-space: nowrap;
}

.locator__check { flex: none; width: 16px; height: 16px; color: var(--color-lime-dark); visibility: hidden; }
.locator__option[aria-selected="true"] .locator__check { visibility: visible; }

.locator__empty {
    padding: 16px 8px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-slate);
}

/* Footer -------------------------------------------------------------- */
.locator__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: none;
    padding: 14px 20px;
    background-color: var(--color-surface-alt);
}

.locator__foot-note { font-size: 13px; line-height: 1.4; color: var(--color-slate); white-space: nowrap; }

.site-header .locator__areas,
.locator__areas {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    color: var(--color-navy);
}

.locator__areas:hover { color: var(--color-lime-dark); text-decoration: none; }
.locator__areas .icon { width: 16px; height: 16px; }

/* "Show all locations" (clears the pick). Takes the foot note's place once a branch is set. */
.locator__reset {
    min-height: 24px;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    color: var(--color-slate);
    background: none;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.locator__reset:hover,
.locator__reset:focus-visible { color: var(--color-navy); }
.locator__reset[hidden],
.locator.is-set .locator__foot-note { display: none; }

/* Badge (modal "Closest to you") --------------------------------------- */
.loc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    background-color: var(--color-lime);
    color: var(--color-ink);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.loc-badge[hidden] { display: none; }

.locator__copy .loc-badge { align-self: flex-start; }

.loc-badge--row {
    gap: 4px;
    margin-bottom: 1px;
    padding: 2px 8px 2px 7px;
    font-size: 10px;
}

/* ==========================================================================
   Confirmation bar
   ========================================================================== */

.loc-confirm {
    border-top: 1px solid var(--color-navy-border);
    border-bottom: 1px solid var(--color-navy-border);
    background-color: var(--color-navy-raised);
    font-family: var(--font-body);
    animation: loc-confirm-in 0.25s ease-out;
}

.loc-confirm[hidden] { display: none; }

@keyframes loc-confirm-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

.loc-confirm__rail {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.loc-confirm__badge {
    display: inline-flex;
    flex: none;
    padding: 3px;
    border-radius: 999px;
    background-color: var(--color-lime);
    color: var(--color-ink);
}

.loc-confirm__badge .icon { width: 12px; height: 12px; stroke-width: 3; }

.loc-confirm__copy {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.loc-confirm__title { font-weight: 600; color: var(--color-white); }
.loc-confirm__note { color: var(--color-lavender); }
.loc-confirm__note--short { display: none; }

.loc-confirm__actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: none;
}

.loc-confirm__action,
.loc-confirm__dismiss {
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--font-body);
    cursor: pointer;
}

.loc-confirm__action {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-lime);
}

.loc-confirm__action:hover { color: var(--color-white); }

.loc-confirm__dismiss { display: inline-flex; color: var(--color-lavender); }
.loc-confirm__dismiss:hover { color: var(--color-white); }
.loc-confirm__dismiss .icon { width: 16px; height: 16px; }

/* ==========================================================================
   First-visit modal
   ========================================================================== */

.loc-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: var(--font-body);
    color: var(--color-navy);
}

.loc-modal[hidden] { display: none; }

.loc-modal__scrim {
    position: absolute;
    inset: 0;
    background-color: var(--color-scrim);
}

.loc-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 760px;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    border-radius: 16px;
    background-color: var(--color-white);
    box-shadow: var(--shadow-modal);
}

.loc-modal__handle { display: none; }

.loc-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex: none;
    padding: 28px 20px 28px 32px;
    background-color: var(--color-lime);
}

.loc-modal__copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.loc-modal__kicker {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-navy);
}

.loc-modal__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--color-navy);
}

.loc-modal__lead {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-navy);
}

.loc-modal__lead--short { display: none; }

.loc-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background-color: var(--color-navy-raised);
    color: var(--color-white);
    cursor: pointer;
}

.loc-modal__tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
    padding: 24px 32px 8px;
}

.loc-modal__geo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: none;
    padding: 12px 20px 12px 18px;
    border: 0;
    border-radius: var(--radius-sm);
    background-color: var(--color-lime);
    color: var(--color-navy);
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.loc-modal__geo:hover { background-color: var(--color-navy); color: var(--color-lime); }
.loc-modal__geo.is-busy { opacity: 0.6; cursor: progress; }

.loc-modal__or { font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--color-slate-muted); }

.loc-modal__search { flex: 1 1 auto; }

.loc-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.loc-modal__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 12px 32px 24px;
    list-style: none;
}

.loc-modal__empty {
    grid-column: span 2;
    align-self: center;
    padding: 16px 18px;
}

.loc-card-wrap { display: flex; }
.loc-card-wrap[hidden] { display: none; }

.loc-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--color-hairline);
    border-radius: var(--radius);
    background-color: var(--color-white);
    color: var(--color-navy);
    font-family: var(--font-body);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

button.loc-card:hover { border-color: var(--color-lime); }

button.loc-card:focus-visible { outline: 2px solid var(--color-navy); outline-offset: 2px; }

.loc-card.is-current,
.loc-card.is-suggested {
    padding: 15px 17px;
    border: 2px solid var(--color-lime);
    background-color: var(--color-lime-pale);
}

.loc-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 22px;
}

.loc-card__state {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-slate);
}

.loc-card.is-current .loc-card__state,
.loc-card.is-suggested .loc-card__state { color: var(--color-lime-dark); }

.loc-card__name {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.005em;
}

.loc-card__addr {
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-slate);
}

.loc-card__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0.02em;
}

.loc-card__phone .icon { width: 14px; height: 14px; }

.loc-card--helper {
    justify-content: center;
    gap: 8px;
    border: 0;
    background-color: var(--color-surface-alt);
    cursor: default;
}

.loc-card__helper-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.loc-card__helper-body { font-size: 13px; line-height: 1.45; color: var(--color-slate); }

.loc-modal__list { display: none; }

.loc-modal__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: none;
    padding: 16px 32px;
    background-color: var(--color-surface-alt);
}

.loc-modal__skip {
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-slate);
    cursor: pointer;
}

.loc-modal__skip:hover { color: var(--color-navy); text-decoration: underline; }
.loc-modal__skip-short { display: none; }

/* Page scroll lock while the sheet / modal is up. */
html.has-loc-overlay,
html.has-loc-overlay body { overflow: hidden; }

/* ==========================================================================
   ≤991px — chip shrinks, panel becomes a bottom sheet
   ========================================================================== */

@media (max-width: 991.98px) {
    .locator__chip {
        gap: 8px;
        min-width: 0;
        height: auto;
        padding: 7px 10px 7px 12px;
        font-size: 13px;
        line-height: 1.4;
    }
    .locator__chip-pin { width: 16px; height: 16px; }
    .locator__chip-caret { width: 14px; height: 14px; }

    .locator__scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1099;
        background-color: var(--color-scrim);
    }

    .locator__panel {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-height: calc(100vh - 96px);
        max-height: calc(100dvh - 96px);
        border-radius: 16px 16px 0 0;
        box-shadow: var(--shadow-sheet);
        animation: loc-sheet-in 0.25s ease-out;
    }

    .locator__handle {
        display: flex;
        justify-content: center;
        flex: none;
        padding: 10px 0 2px;
        background-color: var(--color-navy-raised);
    }
    .locator__handle::before {
        content: "";
        width: 44px;
        height: 5px;
        border-radius: 999px;
        background-color: var(--color-navy-border);
    }

    .locator__head {
        align-items: flex-start;
        height: auto;
        padding: 10px 16px 16px 20px;
    }
    .locator__title { font-size: 18px; }
    .locator__geo--pill { display: none; }
    .locator__close { display: inline-flex; margin: -10px 0 -10px 0; }

    .locator__tools { padding: 14px 16px 4px; }
    .locator__input { font-size: 16px; }   /* ≥16px stops iOS zoom-on-focus */

    .locator__geo--row {
        display: flex;
        gap: 10px;
        width: 100%;
        padding: 12px 14px;
        border-radius: var(--radius-sm);
        background-color: var(--color-surface-alt);
        color: var(--color-navy);
        font-size: 14px;
        font-weight: 600;
        line-height: 1.4;
    }
    .locator__geo--row .icon { color: var(--color-lime-dark); }

    .site-header .locator__list,
    .locator__list {
        flex: 1 1 auto;
        max-height: none;
        min-height: 0;
        padding: 4px 16px 8px;
    }
    .locator__option { min-height: 56px; padding: 12px; }
    .locator__meta--long { display: none; }
    .locator__meta--short { display: block; }

    .locator__foot { padding: 16px 20px 24px; }
    .locator__foot-note { display: none; }
    .locator__panel .locator__areas { justify-content: space-between; width: 100%; }
    .locator.is-set .locator__panel .locator__areas { width: auto; }

    .loc-confirm__rail { min-height: 0; gap: 8px; padding: 10px 16px; }
    .loc-confirm__badge .icon { width: 11px; height: 11px; }
    .loc-confirm__copy { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; overflow: hidden; }
    .loc-confirm__title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
    .loc-confirm__note--long { display: none; }
    .loc-confirm__note--short { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
    .loc-confirm__action { font-size: 12px; }
    .loc-confirm__action--change,
    .loc-confirm__dismiss { display: none; }
}

@keyframes loc-sheet-in {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

/* ==========================================================================
   ≤767px — modal becomes a full-height sheet reusing the rows
   ========================================================================== */

@media (max-width: 767.98px) {
    .loc-modal { align-items: flex-end; padding: 45px 0 0; }

    .loc-modal__dialog {
        width: 100%;
        height: 100%;
        border-radius: 16px 16px 0 0;
        box-shadow: var(--shadow-sheet);
        animation: loc-sheet-in 0.25s ease-out;
    }

    .loc-modal__handle { display: flex; background-color: var(--color-navy); }

    .loc-modal__head {
        padding: 8px 16px 16px 20px;
        background-color: var(--color-navy);
    }
    .loc-modal__copy { gap: 6px; }
    .loc-modal__kicker { font-size: 11px; color: var(--color-lime); }
    .loc-modal__title { font-size: 26px; color: var(--color-white); }
    .loc-modal__lead--long { display: none; }
    .loc-modal__lead--short { display: block; font-size: 13px; line-height: 1.4; color: var(--color-lavender); }
    .loc-modal__close {
        width: 44px;
        height: 44px;
        margin-top: -6px;
        background: transparent;
    }
    .loc-modal__close .icon { width: 20px; height: 20px; }

    .loc-modal__tools {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 14px 16px 4px;
    }
    .loc-modal__geo { padding: 14px; }
    .loc-modal__geo .icon { width: 18px; height: 18px; }
    .loc-modal__or { display: none; }

    .loc-modal__grid { display: none; }
    .loc-modal__list { display: block; }
    .loc-modal .locator__list { max-height: none; overflow: visible; padding: 4px 16px 8px; }
    .loc-modal .locator__option { min-height: 56px; padding: 12px; }
    .loc-modal .locator__meta--long { display: none; }
    .loc-modal .locator__meta--short { display: block; }

    .loc-modal__foot { padding: 16px 20px 24px; }
    .loc-modal__skip-long { display: none; }
    .loc-modal__skip-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
    .loc-confirm,
    .locator__panel,
    .loc-modal__dialog { animation: none; }
}
