/* Forever Vets Locations Map
 * Everything is scoped under .fvlm and written to out-rank the theme's globals
 * (.fl-page-content ol/ul padding, inline `p, li { letter-spacing }`, Bootstrap p/h/a/button rules).
 *
 * Type scale: 11.5 eyebrow · 13 meta · 14.5 body · 28 card title · 38 page title
 * Spacing:    4 · 8 · 12 · 16 · 20
 */
.fvlm {
    --fvlm-navy: #183991;
    --fvlm-coral: #fb5957;
    --fvlm-coral-dark: #aa3f3b;
    --fvlm-ink: #282828;
    --fvlm-muted: #5d6475;
    --fvlm-icon: #8a93a8;
    --fvlm-line: #e3e6ee;
    --fvlm-field: #cfd4e0;
    --fvlm-soft: #f4f6fb;
    --fvlm-green: #1d7f4e;
    --fvlm-soon: #7f889c;

    /* Sidebar (controls on top, scrolling list below) + map filling the rest. */
    display: grid;
    grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "controls map" "list map";
    height: var(--fvlm-h, 640px);
    background: #fff;
    border: 1px solid var(--fvlm-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(24, 57, 145, .08);
    font-family: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14.5px;
    line-height: 1.45;
    letter-spacing: normal;
    color: var(--fvlm-ink);
    text-align: left;
}
.fvlm *, .fvlm *::before, .fvlm *::after { box-sizing: border-box; }
.fvlm p, .fvlm li { margin: 0; letter-spacing: normal; }
.fvlm ol, .fvlm ul { margin: 0; padding: 0; list-style: none; }
.fvlm button { font: inherit; letter-spacing: normal; text-transform: none; box-shadow: none; text-shadow: none; }
.fvlm__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fvlm .fvlm-ico { flex: none; width: 16px; height: 16px; color: var(--fvlm-icon); }

/* Full page: edge to edge, fills the screen under the site header (JS sets --fvlm-h). */
.fvlm--full {
    height: var(--fvlm-h, calc(100vh - 160px));
    min-height: 560px;
    border: 0;
    border-top: 1px solid var(--fvlm-line);
    border-radius: 0;
    box-shadow: none;
}

/* ── Controls ──────────────────────────────────────────── */
.fvlm .fvlm__controls {
    grid-area: controls; padding: 20px;
    background: #fff; border-right: 1px solid var(--fvlm-line); border-bottom: 1px solid var(--fvlm-line);
}
.fvlm .fvlm__title {
    margin: 0; padding: 0; font-family: "Bebas Neue", "Lato", sans-serif; font-weight: 400;
    font-size: 38px; line-height: 1; letter-spacing: .01em; color: var(--fvlm-navy); text-transform: none;
}
.fvlm .fvlm__sub { margin: 4px 0 16px; font-size: 14.5px; color: var(--fvlm-muted); }

.fvlm .fvlm__near { display: flex; gap: 8px; margin: 0 0 12px; }
.fvlm .fvlm__input {
    display: block; flex: 1; width: auto; min-width: 0; height: 44px; margin: 0; padding: 0 14px;
    font: inherit; font-size: 16px; line-height: normal; color: var(--fvlm-ink);
    background: #fff; border: 1px solid var(--fvlm-field); border-radius: 10px; box-shadow: none;
}
.fvlm .fvlm__input::placeholder { color: #8b92a3; }
.fvlm .fvlm__input:focus { outline: none; border-color: var(--fvlm-navy); box-shadow: 0 0 0 3px rgba(24, 57, 145, .15); }
.fvlm .fvlm__locate {
    flex: none; width: 44px; height: 44px; padding: 0; margin: 0;
    display: grid; place-items: center; cursor: pointer;
    color: var(--fvlm-navy); background: #fff; border: 1px solid var(--fvlm-field); border-radius: 10px;
}
.fvlm .fvlm__locate:hover { border-color: var(--fvlm-navy); background: var(--fvlm-soft); }

.fvlm .fvlm__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fvlm .fvlm-chip {
    display: inline-flex; align-items: center; gap: 5px; height: 30px; margin: 0; padding: 0 10px;
    font-size: 13px; font-weight: 700; line-height: 1; color: var(--fvlm-navy); cursor: pointer;
    background: #fff; border: 1px solid var(--fvlm-field); border-radius: 999px;
}
.fvlm .fvlm-chip span { font-weight: 400; color: var(--fvlm-muted); }
.fvlm .fvlm-chip:hover { border-color: var(--fvlm-navy); }
.fvlm .fvlm-chip.is-active { color: #fff; background: var(--fvlm-navy); border-color: var(--fvlm-navy); }
.fvlm .fvlm-chip.is-active span { color: rgba(255, 255, 255, .75); }

.fvlm .fvlm__status { margin: 12px 0 0; font-size: 13px; line-height: 1.4; color: var(--fvlm-muted); }
.fvlm .fvlm__status:empty { display: none; }
.fvlm .fvlm__status strong { color: var(--fvlm-ink); }
.fvlm .fvlm__hint { color: var(--fvlm-icon); }
.fvlm .fvlm__clear {
    margin: 0 0 0 6px; padding: 0; background: none; border: 0; border-radius: 0; cursor: pointer;
    font-size: 13px; color: var(--fvlm-coral-dark); font-weight: 700; text-decoration: underline;
}

/* ── List ──────────────────────────────────────────────── */
.fvlm .fvlm__list {
    grid-area: list; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: 16px; list-style: none;
    background: var(--fvlm-soft); border-right: 1px solid var(--fvlm-line);
}
.fvlm .fvlm-card {
    margin: 0 0 12px; padding: 16px 18px 18px; list-style: none;
    background: #fff; border: 1px solid var(--fvlm-line); border-left: 4px solid var(--fvlm-navy);
    border-radius: 12px; transition: border-color .15s, box-shadow .15s; cursor: pointer;
}
.fvlm .fvlm-card:last-child { margin-bottom: 0; }
.fvlm .fvlm-card--resort { border-left-color: var(--fvlm-coral); }
.fvlm .fvlm-card--soon { border-left-color: var(--fvlm-soon); }
.fvlm .fvlm-card:hover { box-shadow: 0 4px 14px rgba(24, 57, 145, .10); }
.fvlm .fvlm-card.is-active { border-color: var(--fvlm-navy); box-shadow: 0 0 0 2px rgba(24, 57, 145, .18); }
.fvlm .fvlm-card--resort.is-active { border-color: var(--fvlm-coral); box-shadow: 0 0 0 2px rgba(251, 89, 87, .2); }
.fvlm .fvlm-card[hidden] { display: none; }

.fvlm .fvlm-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 20px; margin-bottom: 4px; }
.fvlm .fvlm-card__badge { font-size: 11.5px; font-weight: 700; line-height: 1; letter-spacing: .07em; text-transform: uppercase; color: var(--fvlm-navy); }
.fvlm .fvlm-card--resort .fvlm-card__badge { color: var(--fvlm-coral-dark); }
.fvlm .fvlm-card--soon .fvlm-card__badge { padding: 4px 8px; color: #4a5266; background: #eceff5; border-radius: 999px; }
.fvlm .fvlm-card__dist {
    padding: 4px 8px; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap;
    color: var(--fvlm-navy); background: var(--fvlm-soft); border-radius: 999px;
}
.fvlm .fvlm-card__dist.is-nearest { color: #fff; background: var(--fvlm-navy); }
.fvlm .fvlm-card__dist[hidden] { display: none; }

.fvlm .fvlm-card__name { margin: 0 0 12px; padding: 0; font-size: inherit; line-height: 1; }
.fvlm .fvlm-card__focus {
    margin: 0; padding: 0; background: none; border: 0; border-radius: 0; cursor: pointer; text-align: left;
    font-family: "Bebas Neue", "Lato", sans-serif; font-size: 28px; font-weight: 400; line-height: 1;
    letter-spacing: .01em; color: var(--fvlm-navy);
}
.fvlm .fvlm-card__focus:hover { color: var(--fvlm-coral-dark); }
.fvlm .fvlm-card__focus:focus-visible { outline: 2px solid var(--fvlm-navy); outline-offset: 3px; border-radius: 4px; }

.fvlm .fvlm-card__rows { display: grid; gap: 8px; }
.fvlm .fvlm-card__row { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.45; color: var(--fvlm-ink); }
.fvlm .fvlm-card__row .fvlm-ico { margin-top: 2px; }
.fvlm .fvlm-card__row[hidden] { display: none; }
.fvlm .fvlm-card__phone { font-weight: 700; color: var(--fvlm-navy); text-decoration: none; }
.fvlm .fvlm-card__phone:hover { color: var(--fvlm-coral-dark); text-decoration: underline; }
.fvlm .fvlm-card__hours strong { font-weight: 700; }
.fvlm .fvlm-card__soon-note { color: var(--fvlm-muted); font-style: italic; }
.fvlm .fvlm-open { font-weight: 700; color: var(--fvlm-green); }
.fvlm .fvlm-open--closed { color: var(--fvlm-coral-dark); }

.fvlm .fvlm-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.fvlm a.fvlm-btn, .fvlm button.fvlm-btn {
    display: inline-flex; align-items: center; justify-content: center; height: 38px; margin: 0; padding: 0 16px;
    font-size: 14px; font-weight: 700; line-height: 1; letter-spacing: normal; white-space: nowrap; text-decoration: none; cursor: pointer;
    color: var(--fvlm-navy); background: #fff; border: 1.5px solid var(--fvlm-navy); border-radius: 999px;
    transition: background .15s, color .15s, border-color .15s;
}
.fvlm .fvlm-card__actions .fvlm-btn { flex: 1 1 0; min-width: 120px; }
.fvlm a.fvlm-btn:hover, .fvlm button.fvlm-btn:hover { color: #fff; background: var(--fvlm-navy); text-decoration: none; }
.fvlm a.fvlm-btn--primary, .fvlm button.fvlm-btn--primary { color: #fff; background: var(--fvlm-coral); border-color: var(--fvlm-coral); }
.fvlm a.fvlm-btn--primary:hover, .fvlm button.fvlm-btn--primary:hover { background: var(--fvlm-coral-dark); border-color: var(--fvlm-coral-dark); }
.fvlm .fvlm__near .fvlm-btn { flex: none; height: 44px; border-radius: 10px; padding: 0 18px; }

/* ── Map ───────────────────────────────────────────────── */
.fvlm .fvlm__mapwrap { grid-area: map; position: relative; min-height: 0; background: #e9eef5; }
.fvlm .fvlm__map { width: 100%; height: 100%; }
/* Placeholder while Google Maps loads: a soft map-coloured surface instead of an empty box. */
.fvlm .fvlm__map:not(.is-ready):not(.is-unavailable) {
    background: #e8edf2 radial-gradient(circle at 60% 40%, #f3f6f9 0, #e8edf2 60%);
    animation: fvlm-map-pulse 1.4s ease-in-out infinite alternate;
}
@keyframes fvlm-map-pulse { from { opacity: 1; } to { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .fvlm .fvlm__map:not(.is-ready) { animation: none; } }
.fvlm .fvlm__map.is-unavailable { display: grid; place-items: center; padding: 24px; text-align: center; color: var(--fvlm-muted); }
.fvlm .fvlm__legend {
    position: absolute; left: 12px; bottom: 28px; display: flex; flex-wrap: wrap; gap: 4px 16px;
    margin: 0; padding: 8px 12px; list-style: none; font-size: 13px; line-height: 1.4; color: var(--fvlm-ink);
    background: rgba(255, 255, 255, .96); border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    pointer-events: none;
}
.fvlm .fvlm__legend li { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; }
.fvlm .fvlm-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.fvlm .fvlm-dot--hospital { background: var(--fvlm-navy); }
.fvlm .fvlm-dot--resort { background: var(--fvlm-coral); }
.fvlm .fvlm-dot--soon { background: var(--fvlm-soon); }
.fvlm .fvlm-dot--you { background: #2f80ed; }
.fvlm .fvlm__legend li[hidden] { display: none; }

/* Location pins (always the icon pin, at every zoom) */
.fvlm-pin { width: 32px; height: 42px; cursor: pointer; transform-origin: 50% 100%; transition: transform .15s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.fvlm-pin svg { display: block; }
.fvlm-pin:hover { transform: scale(1.1); }
.fvlm-pin.is-active { transform: scale(1.28); }

/* "You are here" + the distance line's label */
.fvlm-you {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #2f80ed;
    border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47, 128, 237, .22), 0 2px 6px rgba(0, 0, 0, .35);
    transform: translateY(50%);
}
.fvlm-you svg { display: block; }
.fvlm-line-label {
    transform: translateY(50%);
    padding: 6px 10px; font: 700 13px/1 "Lato", system-ui, sans-serif; color: #fff; white-space: nowrap;
    background: #183991; border: 2px solid #fff; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.fvlm-info { font-family: "Lato", system-ui, sans-serif; line-height: 1.45; padding: 0 2px 2px; }
.fvlm-info__type { font-family: "Lato", system-ui, sans-serif; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #5d6475; line-height: 1.3; }
.fvlm-info__name { font-family: "Bebas Neue", "Lato", sans-serif; font-size: 22px; line-height: 1.05; color: #183991; margin: 2px 0 0; }
.fvlm-info__addr { font-size: 13px; color: #444; }
.fvlm-info__link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: #fb5957 !important; text-decoration: none !important; }

/* ── Stacked layout (tablet / phone): controls → map → full list ── */
@media (max-width: 860px) {
    .fvlm, .fvlm--full { display: flex; flex-direction: column; height: auto; min-height: 0; overflow: visible; }
    .fvlm .fvlm__controls { order: 1; padding: 16px; border-right: 0; }
    .fvlm .fvlm__title { font-size: 34px; }
    .fvlm .fvlm__sub { margin-bottom: 12px; }
    .fvlm .fvlm__mapwrap { order: 2; height: 340px; }
    .fvlm--full .fvlm__mapwrap { height: min(52vh, 440px); }
    .fvlm .fvlm__list { order: 3; overflow: visible; padding: 12px; border-right: 0; }
    .fvlm .fvlm__chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
    .fvlm .fvlm__chips::-webkit-scrollbar { display: none; }
    .fvlm .fvlm-chip { flex: none; }
    .fvlm .fvlm__legend { left: 8px; bottom: 24px; gap: 2px 12px; padding: 6px 10px; font-size: 12px; }
}
@media (max-width: 420px) {
    .fvlm .fvlm__near .fvlm-btn { padding: 0 14px; }
    .fvlm .fvlm-card { padding: 14px 16px 16px; }
}
