/* Store locator (page-locations.php) */

.iw-locator {
    --iw-loc-border: #dedede;
    --iw-loc-muted: #5c5c5c;
    --iw-loc-ink: #1f1f1f;
    --iw-loc-tint: #fdf3f2;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2.5rem 16px 3rem;
}

.iw-locator-head {
    margin-bottom: 1.75rem;
    text-align: center;
}

.iw-locator-head h1 {
    margin-bottom: .5rem;
    color: var(--rogers);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 900;
}

.iw-locator-head p {
    margin: 0;
    font-size: 1.15rem;
}

/* Icons come from the inline SVG sprite in page-locations.php */
.iw-loc-icon {
    flex: none;
    width: 1.05em;
    height: 1.05em;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    vertical-align: -.15em;
}

.iw-locator-panel {
    overflow: hidden;
    border: 1px solid var(--iw-loc-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

/* ---------- Toolbar ---------- */

.iw-locator-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--iw-loc-border);
    background: #f7f7f7;
}

.iw-loc-search {
    position: relative;
    flex: 1 1 260px;
    max-width: 440px;
}

.iw-locator-toolbar .form-control,
.iw-locator-toolbar .form-select,
.iw-locator-toolbar .btn {
    height: 44px;
}

.iw-loc-search .form-control {
    padding-right: 2.6rem;
    padding-left: 2.5rem;
}

.iw-loc-search-icon {
    position: absolute;
    top: 50%;
    left: .9rem;
    color: var(--iw-loc-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.iw-loc-clear {
    position: absolute;
    top: 50%;
    right: 4px;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    transform: translateY(-50%);
}

.iw-locator-toolbar .form-select {
    flex: 0 0 auto;
    width: auto;
}

/* Outline button on white; hover is a light tint so the dark fill only ever means "on" (.active) */
.iw-loc-locate {
    --bs-btn-bg: #fff;
    --bs-btn-hover-bg: #efefef;
    --bs-btn-hover-color: var(--bs-btn-color);
    margin-left: auto;
    white-space: nowrap;
}

/* ---------- Buttons vs. the site-wide Elementor kit ----------
   The kit (.elementor-kit-N button) paints every <button> on the site solid red, extra bold and
   square, and turns it white with a red border on hover and focus. The #id keeps the locator's
   own buttons ahead of those rules in every state. */

#iw-locator .iw-loc-name button,
#iw-locator .iw-loc-clear {
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--iw-loc-ink);
}

#iw-locator .iw-loc-name button {
    padding: 0;
    font: inherit;
    font-weight: bold;
    text-align: left;
}

#iw-locator .iw-loc-name button:hover,
#iw-locator .iw-loc-card.is-selected .iw-loc-name button {
    color: var(--rogers);
}

#iw-locator .iw-loc-clear {
    color: var(--iw-loc-muted);
    font-weight: normal;
}

#iw-locator .iw-loc-clear:hover {
    color: var(--iw-loc-ink);
}

/* Bootstrap's own .btn states, restated from its variables */
#iw-locator button.btn {
    border: var(--bs-btn-border-width) solid var(--bs-btn-border-color);
    border-radius: var(--bs-btn-border-radius);
    background-color: var(--bs-btn-bg);
    color: var(--bs-btn-color);
    font-weight: var(--bs-btn-font-weight);
}

#iw-locator button.btn:hover,
#iw-locator button.btn:focus-visible {
    border-color: var(--bs-btn-hover-border-color);
    background-color: var(--bs-btn-hover-bg);
    color: var(--bs-btn-hover-color);
}

#iw-locator button.btn:active,
#iw-locator button.btn.active {
    border-color: var(--bs-btn-active-border-color);
    background-color: var(--bs-btn-active-bg);
    color: var(--bs-btn-active-color);
}

/* ---------- List + map ---------- */

.iw-locator-body {
    display: grid;
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
    height: clamp(520px, 75vh, 760px);
}

.iw-locator-results {
    position: relative; /* cards measure their offset from here when the list scrolls to one */
    overflow-y: auto;
    border-right: 1px solid var(--iw-loc-border);
    overscroll-behavior: contain;
}

.iw-locator-map {
    min-height: 0;
    background: #e8eaed;
}

#iw-locator-map {
    height: 100%;
}

.iw-loc-summary {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--iw-loc-border);
    background: #fff;
}

.iw-loc-status {
    margin: 0;
    padding: 10px 16px;
    font-size: .95rem;
    font-weight: bold;
}

.iw-loc-message {
    padding: 12px 16px;
    border-top: 1px solid var(--iw-loc-border);
    background: var(--iw-loc-tint);
    font-size: .95rem;
}

.iw-loc-message p {
    margin: 0;
}

.iw-loc-message .btn {
    margin-top: 8px;
}

.iw-loc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ---------- Location card ---------- */

.iw-loc-card {
    padding: 16px 16px 16px 12px;
    border-bottom: 1px solid var(--iw-loc-border);
    border-left: 4px solid transparent;
    cursor: pointer;
    transition: background-color .15s;
}

.iw-loc-card:hover {
    background: #fafafa;
}

.iw-loc-card.is-selected {
    border-left-color: var(--rogers);
    background: var(--iw-loc-tint);
}

.iw-loc-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.iw-loc-name {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
}

.iw-loc-distance {
    flex: none;
    color: var(--iw-loc-muted);
    font-size: .85rem;
    font-weight: bold;
    white-space: nowrap;
}

.iw-loc-cats {
    margin-top: 4px;
}

.iw-loc-cat {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--iw-loc-ink);
    color: #fff;
    font-size: .72rem;
    font-weight: bold;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.iw-loc-line,
.iw-loc-hours summary {
    display: flex;
    gap: 8px;
    margin: 6px 0 0;
    font-size: .95rem;
    font-style: normal;
    line-height: 1.4;
}

.iw-loc-line > :first-child,
.iw-loc-hours summary > :first-child {
    flex: none;
    margin-top: .2em;
    color: var(--iw-loc-muted);
}

.iw-loc-line a {
    color: inherit;
    overflow-wrap: anywhere;
}

.iw-loc-line a:hover {
    color: var(--rogers);
}

.iw-loc-hours summary {
    list-style: none;
    cursor: pointer;
}

.iw-loc-hours summary::-webkit-details-marker {
    display: none;
}

.iw-loc-hours summary::after {
    content: "";
    flex: none;
    align-self: center;
    width: 7px;
    height: 7px;
    margin: -3px 0 0 2px;
    border: solid var(--iw-loc-muted);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: transform .15s;
}

.iw-loc-hours[open] summary::after {
    margin-top: 3px;
    transform: rotate(-135deg);
}

.iw-loc-open,
.iw-loc-closed,
.iw-loc-holiday {
    font-weight: bold;
}

.iw-loc-open {
    color: #1a7f37;
}

.iw-loc-closed,
.iw-loc-holiday {
    color: var(--rogers);
}

.iw-loc-week table {
    width: 100%;
    max-width: 300px;
    margin: 8px 0 2px 28px;
    font-size: .9rem;
}

.iw-loc-week th,
.iw-loc-week td {
    padding: 2px 0;
    font-weight: normal;
    vertical-align: top;
}

.iw-loc-week td {
    text-align: right;
}

.iw-loc-week .is-today th,
.iw-loc-week .is-today td {
    font-weight: bold;
}

.iw-loc-week .is-holiday td {
    color: var(--rogers);
    font-weight: bold;
}

.iw-loc-week small {
    display: block;
    font-style: italic;
    font-weight: normal;
}

.iw-loc-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ---------- Map popup ---------- */

/* The previous locator's rules in style.css pulled the popup's header row out of flow and padded
   the body. Browsers and the CDN can still hold that copy, so pin both back to Google's defaults. */
.iw-locator .gm-style-iw-chr {
    position: static;
    float: none;
}

.iw-locator .gm-style-iw-d {
    padding: 0;
}

.iw-loc-info-title {
    font-family: "Ted Next", sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
}

.iw-loc-info {
    max-width: 260px;
    padding-bottom: 4px;
    font-family: "Ted Next", sans-serif;
    font-size: .95rem;
}

.iw-loc-info p {
    margin: 0 0 6px;
}

.iw-loc-info p:last-child {
    margin: 10px 0 0;
}

.iw-loc-info a:not(.btn) {
    color: inherit;
}

/* ---------- Small screens: map on top, list below as part of the page ---------- */

@media (max-width: 991.98px) {
    .iw-locator {
        padding-top: 1.5rem;
    }

    .iw-locator-body {
        display: flex;
        flex-direction: column;
        height: auto;
    }

    .iw-locator-map {
        order: -1;
        height: 55vh;
        min-height: 300px;
        max-height: 460px;
        border-bottom: 1px solid var(--iw-loc-border);
    }

    .iw-locator-results {
        overflow: visible;
        border-right: 0;
    }

    .iw-loc-summary {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .iw-loc-search {
        flex-basis: 100%;
        max-width: none;
    }

    .iw-locator-toolbar .form-select {
        flex: 1 1 0;
    }

    .iw-loc-locate {
        flex: 1 1 100%;
    }
}
