/* The location finder. Moves to bundles-partner-network.
 *
 * Was eleven non-contiguous chunks of main.css. Chunks appear here in
 * ascending source order, which is all that is needed to preserve the
 * intra-file cascade the original comments depend on (2665 sets a padding
 * that 3376 undoes, and so on).
 *
 * Split out of assets/css/main.css. Every rule below is verbatim from
 * that file and appears in its original relative order.
 */
/* ─── Location Finder ────────────────────────────────────────────────────── */
.location-finder h2 { margin-bottom: 6px; }
.location-finder > p { margin-bottom: 24px; }

.location-finder__controls {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

/* Wrapper exists so the type-ahead list can anchor to the field */
.lf-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.lf-search {
  width: 100%;
  font: 500 16px var(--font-sans);
  color: var(--brown-dark);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 13px 22px;
  outline: none;
}
.lf-search:focus { border-color: #cfc2ab; }

/* ── Search type-ahead ──
 * Above Leaflet's panes (z-index 400–1000), which share this stacking
 * context — inside the mobile overlay the list drops over the map strip. */
.lf-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: var(--z-above-map);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-overlay);
  padding: 6px;
}
.lf-suggest[hidden] { display: none; }
.lf-suggest__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font: 600 14px var(--font-sans);
  color: var(--brown-dark);
  background: none;
  border: 0;
  border-radius: 9px;
  padding: 10px 12px;
  cursor: pointer;
}
.lf-suggest__item:hover,
.lf-suggest__item.is-hl { background: var(--cream); }
.lf-suggest__kind {
  flex: 0 0 auto;
  font: 700 10px var(--font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brown-muted);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
}
.lf-suggest__item:hover .lf-suggest__kind,
.lf-suggest__item.is-hl .lf-suggest__kind { background: var(--white); }

/* ── Filter rail ──
 * Every filter is a one-tap toggle pill. "Provides" labels the service
 * chips; the divider separates services from access/language. On desktop
 * the rail is a flex item of the controls bar, laying out inline after the
 * search field (and wrapping below it when space runs out); inside the
 * mobile overlay it becomes the popdown panel under the header.
 * aria-pressed is the styling hook so the visual state can never drift from
 * the accessible one; .active is kept as a belt-and-braces JS mirror. */
.lf-rail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
/* Search, rail and the mobile Filters button all give way to #lf-back while a
   location is open — none of them narrows a single result, and the row would
   otherwise reshuffle as the search field stretched to fill the space its
   siblings left. One control in, three out, so the row keeps its shape. */
body.lf-detail-open .lf-rail,
body.lf-detail-open .lf-search-wrap,
body.lf-detail-open .lf-filter-btn { display: none; }

/* Mobile-popdown-only closing action — desktop's rail is inline, not a
   panel, so it never needs a dominant "done" affordance. */
.lf-apply-filters { display: none; }

/* Mobile only — opens the popdown. Badge carries the active-filter count. */
.lf-filter-btn { display: none; }
.lf-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--red);
  color: var(--white);
  font: 700 11px/1 var(--font-sans);
  box-shadow: 0 0 0 2px var(--white);
}
/* display:inline-flex above would defeat the UA's [hidden] rule */
.lf-badge[hidden] { display: none; }

.lf-rail__group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lf-rail__label {
  font: 700 11px var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brown-muted);
  margin-right: 3px;
}
.lf-rail__vr {
  width: 1px;
  height: 26px;
  background: var(--border);
  margin: 0 6px;
  flex: 0 0 auto;
}

.lf-chip {
  font: 600 14px var(--font-sans);
  color: var(--brown-dark);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.lf-chip:hover { border-color: #cfc2ab; }
.lf-chip.active,
.lf-chip[aria-pressed="true"] {
  color: var(--cream);
  background: var(--brown-dark);
  border-color: var(--brown-dark);
}

.location-finder__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.lf-list { display: flex; flex-direction: column; gap: 12px; }

.lf-card {
  cursor: pointer;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lf-card__row {
  display: flex;
  align-items: baseline;
  /* The gap is the guarantee: a wrapping name shrinks until it hits this and
     no further, so the pin always keeps clear air to its left however long
     the name runs. */
  gap: 16px;
}
.lf-card__name {
  font: 700 17px var(--font-serif);
  color: var(--brown-dark);
  flex: 1;
  /* A flex item won't shrink past its longest unbreakable word without this,
     which would push the city pin out of the row on a name like
     "Bundles of Hope Diaper Bank — The Changing Station". */
  min-width: 0;
}
/* Plain icon + label rather than a pill — one less block of solid color
   competing with the tag row below it (city was the only thing that never
   needed to read as "tappable" or "matches a filter", so it's the one that
   gives up the pill treatment). */
.lf-card__city {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 700 12px var(--font-sans);
  color: var(--teal-mid);
  white-space: nowrap;
}
.lf-card__city-icon {
  display: flex;
  flex: 0 0 auto;
}
.lf-card__city-icon svg {
  display: block;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lf-card__tags  { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* The Changing Station — our own hub — is pinned to the top of the results.
   Set off with the site's info-card convention (.info-card, the Get Diapers
   hero callout): white card, thin border, teal left stripe — same language
   used everywhere else the theme calls out this location. */
/* Width only — color comes from .edge-teal (see assets/js/location-finder.js) */
.lf-card--hub {
  border-left-width: 6px;
}
.lf-card__address { font: 400 13px var(--font-sans); color: var(--brown-muted); }
.lf-card__contact { font: 400 13px var(--font-sans); color: var(--brown-med); }
.lf-card__contact a { color: var(--teal); }

.lf-tag {
  font: 600 12px var(--font-sans);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}
/* Quiet/neutral rather than color-coded: every pastel family here is
   already claimed by an access state (teal = walk-in, yellow = appointment,
   green = referral) or by Period supplies (coral, a genuine differentiator —
   not every location has it). Diapers is closer to a baseline fact than a
   decision point, so it — like language — doesn't compete for a color. */
/* Matches the detail pane's language badge — quiet/neutral rather than
   color-coded, since it's a nice-to-know rather than a decision point. */
.lf-tag--service,
.lf-tag--lang {
  color: var(--brown-med);
  background: var(--cream);
  border: 1px solid var(--border);
}
.lf-tag--period {
  color: var(--red-dark);
  background: var(--pastel-coral-bg);
}
.lf-tag--access            { color: var(--teal); background: var(--pastel-teal-bg); }
.lf-tag--access-appointment { color: var(--yellow-dark); background: var(--pastel-yellow-bg); }
.lf-tag--access-referral    { color: var(--brown-dark); background: var(--pastel-green-bg); }

/* Shape/color: .notice + .tint-yellow (see inc/shortcodes.php) */
.lf-empty {
  font: 500 15px/1.5 var(--font-sans);
  color: var(--brown-med);
}

.lf-map-wrap {
  position: sticky;
  top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  height: 640px;
}
#lf-map { width: 100%; height: 100%; }

.lf-list-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 6px;
}

.lf-card__hours {
  font: 400 14px/1.5 var(--font-sans);
  color: var(--brown-med);
}

/* ─── Location Finder — mobile-only chrome ────────────────────────────────────
 * These two exist for the ≤860px overlay and stay hidden on desktop. All
 * filter controls live in .lf-rail above, which serves both breakpoints. */
.lf-close-btn      { display: none; }
.lf-mobile-trigger { display: none; }

/* Brand mark — only visible once the page's own header is out of view: the
   mobile overlay or desktop full screen. Same element serves both. Square
   source art, matched to the row's other 44px circular controls. */
.lf-badge-logo {
  display: none;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.lf-app-open .lf-badge-logo,
.lf-max-open .lf-badge-logo { display: block; }

/* Launch card — deliberately large, since on mobile it stands in for the whole
   finder. The map thumbnail is inline SVG so no tiles load until it is opened. */
.lf-mobile-trigger {
  align-items: center;
  width: 100%;
  gap: 16px;
  background: var(--red);
  border: 2px solid var(--red);
  border-radius: var(--radius-card);
  padding: 18px;
  color: var(--white);
  cursor: pointer;
  text-align: left;
  transition: filter .15s, box-shadow .15s;
}
.lf-mobile-trigger:hover {
  filter: brightness(.93);   /* --red and --red-dark are near-identical, so shade it */
  box-shadow: var(--shadow-card);
}
/* Teal outline would disappear against the red fill */
.lf-mobile-trigger:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

.lf-mobile-trigger__thumb {
  display: block;
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;   /* clips the streets to the rounded corners */
}
.lf-mobile-trigger__thumb svg { display: block; width: 100%; height: 100%; }
.lf-mobile-trigger__thumb .m-bg   { fill: var(--pastel-teal-bg); }
.lf-mobile-trigger__thumb .m-road { fill: none; stroke: var(--white); stroke-linecap: round; }
.lf-mobile-trigger__thumb .m-park { fill: var(--pastel-green-mid); }
.lf-mobile-trigger__thumb .m-pin  { fill: var(--red); }
.lf-mobile-trigger__thumb .m-dot  { fill: var(--white); }

.lf-mobile-trigger__text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.lf-mobile-trigger__label { font: 700 18px/1.3 var(--font-sans); color: var(--white); }
.lf-mobile-trigger__meta  { font: 500 13px var(--font-sans); color: rgba(255,255,255,.82); }
.lf-mobile-trigger__arrow { font-size: 22px; flex: 0 0 auto; color: var(--white); }
@media (max-width: 860px) {
  /* ── Mobile: finder collapses to the launch affordance ──────────────────
   * Everything here is driven by the viewport width plus two body classes,
   * so crossing the breakpoint (resize, rotate) cannot leave the UI in a
   * stale state — there is no JS-held mode to fall out of sync.
   * ──────────────────────────────────────────────────────────────────── */
  .lf-mobile-trigger { display: flex; }
  /* Panel stays visible until JS confirms it can be reopened */
  .lf-js-ready .lf-panel { display: none; }
  /* Heading + lead paragraph belong to the finder, not the page */
  /* The launch button already carries this wording, so showing the heading
     here would just duplicate it. */
  .lf-js-ready .location-finder-card > h2,
  .lf-js-ready .location-finder-card > p { display: none; }

  /* ── App open: the panel covers the viewport ── */
  .lf-app-open .lf-mobile-trigger { display: none; }
  .lf-app-open .lf-panel {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: var(--z-raised);
    background: var(--cream);
    overflow: hidden;
  }
  .lf-app-open { overflow: hidden; }
  /* Section is only a wrapper now — drop its padding/margin so the map can
     reach the screen edges. .wp-block-group is needed to beat the equally
     specific !important padding rule later in this file. */
  .lf-app-open .location-finder-section.wp-block-group { padding: 0 !important; }
  .lf-app-open .location-finder { margin: 0 !important; padding: 0 !important; }

  /* Close button — icon-only X, at the end of the row (top right, alongside
     search) rather than the leading position it used to sit in.
     margin-left:auto rather than relying on .lf-search-wrap's flex:1 to push
     it there: opening a location hides the search field and the rail, and
     without this the X collapsed back against the brand mark exactly when the
     row was emptiest. It now hugs the right edge whatever else is in the row. */
  .lf-app-open .lf-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-left: auto;
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    /* Appearance comes from the shared "dismiss the app" treatment further
       down, which the desktop fullscreen X uses too. */
  }

  /* Controls: close + search + Filters on one row. position:relative anchors
     the filter popdown to the header's bottom edge. */
  .lf-app-open .location-finder__controls {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    /* The strip is absolutely positioned across the bottom, so it sits *over*
       the padding rather than after it. Bottom padding carries its height on
       top of the normal 10px, otherwise the controls have 10px of clear air
       above them and 4px below. */
    padding: 10px var(--mob-h) calc(10px + var(--lf-rule-h));
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    margin-bottom: 0;
    background: var(--cream);
    position: relative;
  }
  /* The brand strip as the chrome/content boundary. The bar stays cream, but
     the band makes it a distinct region rather than more of the same surface —
     which is the whole reason the X reads as "close this location": nothing
     told you where the app's frame ended and the results began.
     ::after rather than a border so it can carry the gradient, and the filter
     popdown (absolute, top:100%) still opens below it. */
  .lf-app-open .location-finder__controls {
    border-bottom: none;
  }
  .lf-app-open .location-finder__controls::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--lf-rule-h);
    background: linear-gradient(to right, var(--spectrum-stops));
  }
  .lf-app-open .lf-search-wrap { min-width: 0; }
  .lf-app-open .lf-search {
    min-height: 44px;
    padding: 11px 18px;
    font-size: 15px;
  }

  /* Filters button — icon-only funnel matching the close button's chrome */
  .lf-app-open .lf-filter-btn {
    position: relative;   /* anchors the corner badge */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--teal);
    cursor: pointer;
  }
  .lf-app-open .lf-filter-btn svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .lf-app-open .lf-filter-btn[aria-expanded="true"] {
    color: var(--cream);
    background: var(--brown-dark);
    border-color: var(--brown-dark);
  }

  /* Filter rail as a popdown panel under the header, over the map strip
     (z-index above Leaflet's panes, which share this stacking context).
     JS closes it before a detail pane opens so it can't sit on top of the
     pane; the button stays available to reopen it. */
  .lf-app-open .lf-rail { display: none; }
  .lf-app-open.lf-filter-open .lf-rail {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: var(--z-above-map);
    margin: 0;
    padding: 14px var(--mob-h) 18px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-overlay);
    flex-wrap: wrap;
    gap: 8px;
  }
  /* Stacked layout inside the popdown: label line, service chips, a
     full-width rule where the desktop divider was, then the toggles */
  .lf-app-open .lf-rail__group { display: contents; }
  .lf-app-open .lf-rail__label { width: 100%; margin: 0 0 2px; }
  .lf-app-open .lf-rail__vr {
    width: 100%;
    height: 1px;
    margin: 8px 0;
  }
  /* The search-to-rail divider only means something on the inline desktop row */
  .lf-app-open .lf-rail__vr--lead { display: none; }

  /* Closing action, set apart from the chips above by extra top margin and
     its own solid-fill/white-text treatment — same look as the Directions
     button elsewhere in the finder — so it reads as the one dominant,
     final tap in the panel rather than another chip in the row. A filled
     pill against the white popdown separates itself with no divider line
     needed (a hairline in --border would barely show against the fill). */
  .lf-app-open .lf-apply-filters {
    display: block;
    flex-basis: 100%;
    width: 100%;
    margin-top: 18px;
    min-height: 48px;
    padding: 12px 18px;
    background: var(--teal);
    border: 2px solid var(--teal);
    border-radius: var(--radius-pill);
    color: var(--white);
    font: 700 15px var(--font-sans);
    text-align: center;
    cursor: pointer;
    transition: background .15s, border-color .15s;
  }
  .lf-app-open .lf-apply-filters:hover,
  .lf-app-open .lf-apply-filters:focus-visible {
    background: var(--teal-deep);
    border-color: var(--teal-deep);
  }

  /* Two panels: map on top, scrollable list below.
   * align-items MUST be reset: the desktop grid rule sets align-items: start,
   * which in a column flex container governs the horizontal axis and collapses
   * the (empty) map div to width 0 — Leaflet then renders nothing. */
  .lf-app-open .location-finder__body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
    overflow: hidden;
    gap: 0;
    min-height: 0;
  }
  .lf-app-open .lf-map-wrap {
    order: -1;
    flex: 0 0 33dvh;   /* at most a third of the viewport — list gets the rest */
    height: 33dvh;
    position: static;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
  }
  .lf-app-open .lf-list-col {
    flex: 1;
    overflow-y: auto;
    max-height: none;
    padding: 12px var(--mob-h);
    scrollbar-width: none;
  }
  .lf-app-open .lf-list-col::-webkit-scrollbar { display: none; }
  /* .location-finder is NOT in that list on purpose: it's nested inside
     .location-finder-section (which already carries the var(--mob-h) gutter)
     and .location-finder-card (deliberately zeroed on mobile), so giving it
     its own copy double-padded the launch button — its left/right edges
     sat 20px further in than every sibling section's content. */
  .location-finder { padding-left: 0 !important; padding-right: 0 !important; }
}


/* ── Location finder section ──────────────────────────────────────────────
 * The row is white and the finder sits on it as a self-contained cream card.
 * The heading and lead paragraph stay outside the card, on the white row.
 * ─────────────────────────────────────────────────────────────────────────── */
/* .location-finder-section is .section + .section--white (shape/color) */
/* The card holds the heading, the lead paragraph and the finder itself, so all
   three read as one unit. They stay separate blocks in the editor. */
.location-finder-card.wp-block-group {
  position: relative;   /* anchors the absolutely positioned full screen toggle */
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px 32px 28px;
}
/* Keep the heading clear of the toggle sharing its row */
.location-finder-card > h2 { margin-bottom: 6px; padding-right: 190px; }


.location-finder-card > p  { margin-bottom: 22px; }

/* ── Full screen toggle (desktop) ─────────────────────────────────────────
 * Lives in the controls row in the DOM, but is lifted onto the heading row by
 * absolute positioning against the card. Maximized there is no heading, so it
 * drops back to static and takes its place at the end of the controls row.
 * ─────────────────────────────────────────────────────────────────────────── */
.lf-maximize {
  position: absolute;
  top: 24px;
  right: 32px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 18px;
  font: 700 14px var(--font-sans);
  cursor: pointer;
  transition: background .15s, color .15s;
  /* Appearance from the shared dismiss/chrome treatment below — this button
     is the same control in both its states, and both are app chrome rather
     than something acting on the results. */
}
.lf-maximize svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lf-maximize__state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.lf-maximize__state--collapse { display: none; }
.lf-max-open .lf-maximize__state--expand { display: none; }
.lf-max-open .lf-maximize__state--collapse { display: inline-flex; }
/* Back into the controls row once the heading is gone, and — icon-only now —
   the same X as the mobile close button rather than a text pill. */
.lf-max-open .lf-maximize {
  position: static;
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  /* Hugs the right edge however full the row is — with a location open the
     search field and rail are hidden and it would otherwise slide left. */
  margin-left: auto;
}

/* ── "Dismiss the app" icon ───────────────────────────────────────────────
 * The X that leaves the finder: the mobile overlay's close button and the
 * desktop fullscreen toggle once it has collapsed to an icon. One rule for
 * both, because they are the same control wearing the same meaning — the
 * previous pair drifted the moment one of them changed, and the comment above
 * still claimed they matched.
 *
 * No pill: sitting beside Search and Filters, a third identical white pill
 * read as another control acting on the results rather than the way out.
 * Filters keeps its pill because it does act on the results; this doesn't.
 * The 44px box stays for the tap target even though nothing draws it.
 * ─────────────────────────────────────────────────────────────────────────── */
.lf-app-open .lf-close-btn,
.lf-maximize {
  background: none;
  border: none;
  border-radius: var(--radius-pill);
  color: var(--brown-muted);
}
.lf-app-open .lf-close-btn:hover,
.lf-maximize:hover {
  /* No border to press, so hover puts a shape back. */
  background: rgba(0, 0, 0, .045);
  border-color: transparent;
  color: var(--brown-dark);
}
.lf-app-open .lf-close-btn:focus-visible,
.lf-maximize:focus-visible {
  color: var(--brown-dark);
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}
/* Only where the icon stands alone: without a border around it the mark has
   to carry the tap target. "Full screen" keeps a 17px icon, in proportion to
   the 14px label beside it. */
.lf-app-open .lf-close-btn svg,
.lf-max-open .lf-maximize svg {
  display: block;
  width: 22px;
  height: 22px;
  /* Stated, not inherited: .lf-maximize svg supplies these for the desktop
     button, but the mobile close button has no base rule of its own — without
     them its X renders as a filled path with no stroke, which for two crossing
     lines is nothing at all. */
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Maximized: the card fills the viewport ───────────────────────────────
 * Same two-column body, just given the whole screen. The grid row is
 * stretched by the flex chain so both columns run full height, which means
 * overriding the desktop map's fixed 640px and the list's max-height.
 * ─────────────────────────────────────────────────────────────────────────── */
.lf-max-open { overflow: hidden; }
.lf-max-open .location-finder-section.wp-block-group { padding: 0 !important; }

/* The heading and lead paragraph are page framing — useful above the card,
   just noise once the finder owns the whole screen. */
.lf-max-open .location-finder-card > h2,
.lf-max-open .location-finder-card > p { display: none; }

.lf-max-open .location-finder-card.wp-block-group {
  --lf-max-pad-h: 28px;
  position: fixed;
  inset: 0;
  z-index: var(--z-raised);
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 22px var(--lf-max-pad-h) 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lf-max-open .location-finder {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin: 0;
}
.lf-max-open .lf-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
/* Same chrome rule as the mobile overlay: in fullscreen the controls row is
   the app's frame rather than part of the page, so it gets the same boundary.
   Bled out to the card's edges — a strip that stopped at the content padding
   would read as an underline on the controls instead of an edge. */
.lf-max-open .location-finder__controls {
  position: relative;
  padding-bottom: calc(10px + var(--lf-rule-h));
}
.lf-max-open .location-finder__controls::after {
  content: '';
  position: absolute;
  left: calc(-1 * var(--lf-max-pad-h));
  right: calc(-1 * var(--lf-max-pad-h));
  bottom: 0;
  height: var(--lf-rule-h);
  background: linear-gradient(to right, var(--spectrum-stops));
}

.lf-max-open .location-finder__body {
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.lf-max-open .lf-list-col {
  max-height: none;
  min-height: 0;
}
.lf-max-open .lf-map-wrap {
  position: static;
  height: auto;
  min-height: 0;
}
@media (max-width: 860px) {

  .lf-maximize { display: none; }
  .location-finder,
  .location-finder-card.wp-block-group {
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
  }
}



/* ── Location detail pane ─────────────────────────────────────────────────
 * Selecting a card replaces the list inside .lf-list-col instead of opening a
 * modal, so the map stays on screen and can zoom to the chosen location.
 * Works at both breakpoints because both layouts already pair a list region
 * with the map — desktop side by side, mobile stacked.
 * ─────────────────────────────────────────────────────────────────────────── */
.lf-detail { display: none; }
.lf-detail.is-active { display: block; }
.lf-list.is-hidden,
.lf-empty.is-hidden { display: none; }

.lf-detail__card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px 20px;
}
/* Styled as a pill rather than a bare text link so it reads as tappable and
   clears the 44px minimum touch target — as plain text it was only 17px tall.
   Sits directly on the finder's cream background (a sibling of the white
   .lf-detail__card, not a row inside it), so it's white at rest — the
   inverse of a pill living on a white card, which would use cream instead. */
/* One control, two placements. Everything visual is on .lf-back so both look
   identical; only which one is shown changes with the breakpoint. Neither
   appears until a location is open. */
.lf-back {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  margin: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font: 700 14px var(--font-sans);
  color: var(--teal);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.lf-back:hover {
  background: var(--cream);
  border-color: var(--pastel-teal-mid);
  color: var(--red);
}
.lf-back:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Desktop: in the toolbar, where the search field and rail were. The mobile
   strip that wraps the other copy stays out of the way here. */
.lf-back-strip { display: none; }
body.lf-detail-open .lf-back--bar { display: inline-flex; }

/* Phone: out of the toolbar — that's a 44px row shared with the brand mark,
   and a full-width control in it would crowd the one thing identifying the
   app — and into the column, under the map and over the detail pane.
   Declared after the desktop rule rather than up in the main 860px block: a
   media query adds no specificity, so up there it would simply have lost to
   whichever rule came later in the file. */
@media (max-width: 860px) {
  body.lf-detail-open .lf-back--bar { display: none; }
  /* Full width with the label centred: it's the only thing in its row and the
     one action for the whole view, so a pill hugging the left edge read as an
     afterthought next to the card below it. */
  body.lf-detail-open .lf-back--col {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  /* The sticky, full-bleed cream strip the pill sits on — a wrapper rather
     than a pseudo-element on the button itself. Sticky needs a z-index, that
     makes the button a stacking context, and inside one a negative-z child
     paints AFTER the root's own background and border: the backing covered
     the pill's white fill entirely and left just the text. Nothing about the
     pill had changed; it was being painted over.
     .lf-list-col is the scroller, so this has to be sticky — otherwise a long
     location carries the only way back off the top of the screen. */
  body.lf-detail-open .lf-back-strip {
    display: block;
    position: sticky;
    top: 0;
    z-index: 1;
    /* No bottom margin: the strip's own 12px padding already sits below the
       button, and adding a margin on top of it gave 12px above and 24px
       below. The padding is the whole spacing on both sides. */
    margin: 0 calc(var(--mob-h) * -1);
    padding: 12px var(--mob-h);
    background: var(--cream);
  }
  body.lf-detail-open .lf-list-col { padding-top: 0; }
}
/* Mirrors .lf-card__row exactly: name left, pin right, baseline-aligned, and
   deliberately no flex-wrap. Letting the row wrap dropped the pin to its own
   line under any long name — which is most of them, since these are church
   and clinic names — so the pane rearranged itself compared to the tile for
   the common case rather than the rare one. The name wraps internally
   instead; flex:1 (basis 0, not auto) is what lets it shrink far enough to
   do that rather than pushing the city out of the row. */
.lf-detail__head {
  display: flex;
  align-items: baseline;
  /* Wider than the tile's, in proportion to the larger name beside it — the
     two read as the same amount of breathing room at their own sizes. */
  gap: 22px;
  margin-bottom: 14px;
}
.lf-detail__name {
  font: 700 22px/1.25 var(--font-serif);
  color: var(--teal);
  margin: 0;
  flex: 1;
  min-width: 0;
}

/* Matches the pin locator on the list tiles (.lf-card__city) so a card and
   the pane it opens read as the same object. Slightly larger, since it sits
   under a heading here rather than beside a card title. Deliberately not
   styled like the Address row below it: this is "whereabouts", that is the
   mailing address, and the visual difference is what keeps the two from
   reading as the same fact twice. */
.lf-detail__city {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 700 13px var(--font-sans);
  color: var(--teal-mid);
  white-space: nowrap;
}
.lf-detail__city .lf-card__city-icon svg { width: 14px; height: 14px; }
/* Never squeezed: it's already nowrap, so shrinking would overflow it. */
.lf-detail__city { flex: 0 0 auto; }
.lf-detail__badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 10px;
}
.lf-detail__badge {
  font: 600 12px var(--font-sans);
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.lf-detail__badge--service {
  background: var(--pastel-teal-bg);
  color: var(--teal);
  border: 1px solid var(--pastel-teal-mid);
}
.lf-detail__badge--lang {
  background: var(--cream);
  color: var(--brown-med);
  border: 1px solid var(--border);
}
.lf-detail__row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 4px 12px;
  padding: 10px 0;
  font: 400 15px/1.5 var(--font-sans);
  color: var(--brown-dark);
}
.lf-detail__label {
  font-weight: 600;
  color: var(--brown-muted);
  font-size: 13px;
  padding-top: 2px;
}
.lf-detail__row a { color: var(--teal); }

/* ── Detail action buttons ────────────────────────────────────────────────
 * Call / website / directions as real tap targets rather than inline links.
 * auto-fit means they stack on a phone and sit two-up in the desktop
 * column without needing a breakpoint of their own.
 * ─────────────────────────────────────────────────────────────────────────── */
.lf-detail__actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
}
.lf-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border: 2px solid var(--pastel-teal-mid);
  border-radius: var(--radius-pill);
  background: var(--pastel-teal-bg);
  color: var(--teal);
  font: 700 15px var(--font-sans);
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.lf-action:hover {
  background: var(--white);
  border-color: var(--teal);
  color: var(--teal);
}
.lf-action:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.lf-action--primary {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.lf-action--primary:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: var(--white);
}
.lf-action__icon { display: flex; flex: 0 0 auto; }
.lf-action__icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The visible label is the one word (Directions/Website/Call) at every
   width; the fuller text (phone number, domain, location name) only ever
   reaches screen readers, via aria-label on the link itself. */
.lf-action__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Call is a tap-to-dial action on mobile only — the Phone row above already
   shows the number as data at every width, so desktop doesn't need it as a
   button too. */
.lf-action--phone-mobile { display: none; }

/* ── Mobile: Directions / Call split into equal halves ──
 * flex (not a fixed column count) so a single action (no phone) still gets
 * the full row rather than leaving dead space. Icon and label stay
 * side-by-side, same as desktop — "Call" is short enough to fit either way. */
@media (max-width: 860px) {
  .lf-detail__actions { display: flex; }
  .lf-action {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 12px;
  }
  .lf-action--phone-mobile { display: inline-flex; }
}

/* ── Map pins ─────────────────────────────────────────────────────────────
 * Brand-coloured divIcon pins so the selected one can be distinguished in
 * CSS alone. The scale sits on the inner .lf-pin because Leaflet owns the
 * outer element's transform for positioning.
 * ─────────────────────────────────────────────────────────────────────────── */
/* ── "Show my location" control ──────────────────────────────────────────────
 * Sits in .leaflet-bar under the zoom buttons and inherits their box, border
 * and 30px sizing, so only the icon and the states are described here.
 *
 * The user's own position is BLUE, not brand teal, and deliberately so: teal
 * is what every distribution location is drawn in, and "you" has to be
 * instantly separable from "a place you could go". This is the one element in
 * the finder that is not on-brand on purpose.
 * ─────────────────────────────────────────────────────────────────────────── */
.lf-locate__btn {
  display: flex !important;   /* .leaflet-bar a sets `display: block` */
  align-items: center;
  justify-content: center;
}
.lf-locate__btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--brown-dark);
  stroke-width: 2;
  stroke-linecap: round;
}
.lf-locate__btn:hover svg,
.lf-locate__btn:focus-visible svg { stroke: var(--teal); }
.lf-locate__ring { stroke-width: 1.6; }

/* Busy: the crosshair spins while the browser is resolving a fix, which can
   take several seconds on a cold GPS. Without it the button looks inert and
   people press it again, which does nothing — requestLocation() is guarded. */
.lf-locate.is-busy .lf-locate__btn svg {
  animation: lf-locate-spin .9s linear infinite;
  stroke: var(--teal);
}
@keyframes lf-locate-spin { to { transform: rotate(360deg); } }

/* ── The "you are here" dot ─────────────────────────────────────────────── */
.lf-user-pin { background: none; border: 0; }
.lf-user-pin span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1d6fd4;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}
/* One slow pulse ring, on a pseudo-element so the dot itself stays crisp.
   foundation.css already neutralises this under prefers-reduced-motion. */
.lf-user-pin span::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #1d6fd4;
  animation: lf-user-pulse 2.2s ease-out infinite;
}
@keyframes lf-user-pulse {
  0%   { transform: scale(1);   opacity: .55; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ── Status line ────────────────────────────────────────────────────────────
 * Present and announced at all times, but only takes space when there is
 * something a sighted user needs to act on — which is errors. A success
 * message would be narrating the dot they can already see.
 * ─────────────────────────────────────────────────────────────────────────── */
.lf-locate-status {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 1000;              /* over the tile pane, under Leaflet's controls */
  max-width: min(340px, calc(100% - 24px));
  padding: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  font: 400 13px/1.45 var(--font-sans);
  color: var(--white);
  background: var(--brown-dark);
  border-radius: var(--radius-card-sm);
  text-align: center;
  transition: opacity .18s ease;
}
.lf-locate-status.is-visible {
  height: auto;
  padding: 9px 14px;
  opacity: 1;
}
.lf-locate-status.is-error { background: var(--red); }

.leaflet-div-icon.lf-marker {
  background: none;
  border: 0;
}
.lf-pin {
  display: block;
  width: 24px;
  height: 36px;
  transform-origin: 50% 100%;   /* grow from the tip, which is the anchor */
  transition: transform .15s ease;
}
.lf-pin svg { display: block; width: 100%; height: 100%; }
.lf-pin__body {
  fill: var(--teal);
  transition: fill .15s ease;
}
.lf-pin__dot { fill: var(--white); }

/* Hover nudge, since a pin no longer opens a popup and needs some other cue
   that it is clickable. Excludes the selected pin so its 1.45 scale wins. */
.lf-marker:not(.is-selected):hover .lf-pin { transform: scale(1.18); }

/* Selected pin: brand red, larger, and lifted above its neighbours.
   Leaflet assigns each marker an inline z-index by latitude, so !important
   is required to pull the selected one to the front. */
.lf-marker.is-selected { z-index: 1000 !important; }
.lf-marker.is-selected .lf-pin {
  transform: scale(1.45);
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.35));
}
.lf-marker.is-selected .lf-pin__body { fill: var(--red); }

/* Clickable card affordance */
.lf-card:hover { border-color: var(--pastel-teal-mid); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.lf-card:focus { outline: 2px solid var(--teal); outline-offset: 2px; }

@media (max-width: 540px) {
  .lf-detail__card { padding: 20px 18px 18px; }
  .lf-detail__name { font-size: 20px; }
}

/* ─── "Open today" / "Open now" badge on a finder card ────────────────────── *
 * Only rendered when the location's structured slots can actually answer the
 * question (assets/js/location-finder.js) — absence of a badge means "we don't
 * know", never "closed", so it's deliberately quiet rather than a red/green
 * status light that would imply the opposite. */
.lf-card__open {
  /* align-self, not display:inline-block: .lf-card is a flex column, so a
     stretch-aligned child fills the full width however it's displayed — which
     turned a small status pill into a banner across the whole card. */
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--pastel-green-bg);
  color: var(--teal-mid);
  font: 600 12px var(--font-sans);
}
/* "Open now" is the stronger claim but not more urgent news — it's a status,
   not an alert. A filled dot carries the distinction; a solid dark fill read
   as a warning banner and pulled attention off the location's own name. */
.lf-card__open--now::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

/* ─── Temporary closure banner (finder card + detail panel) ────────────────
 * .notice + .tint-coral (see the Structural Utilities section) give the
 * shape and color; overridden here only to scale that down to the finder's
 * own compact sizing instead of .notice's larger block-pattern padding. */
.lf-card__closure.notice {
  margin-top: 6px;
  padding: 6px 10px;
  font: 600 12px/1.4 var(--font-sans);
  color: var(--red-dark);
}
.lf-detail__closure.notice {
  display: inline-block;
  padding: 4px 10px;
  font: 600 13px var(--font-sans);
  color: var(--red-dark);
}
/* A closure that hasn't started pairs with .tint-yellow, not .tint-coral —
   the location may well be open right now, and coral reads as "don't come".
   Only the text colour changes: the two rules above set red for the coral
   pairing, and everywhere else on the site a yellow .notice simply carries
   the default body colour. Shape and spacing are inherited unchanged. */
.lf-card__closure--upcoming.notice,
.lf-detail__closure--upcoming.notice {
  color: var(--brown-dark);
}

/* ─── Access shown with the hours, not stranded in the tag row ─────────────
 * "Mon–Fri 8am–4:30pm" on its own reads as an invitation to walk in, so the
 * access chip sits with the hours it qualifies — on the card and in the
 * detail panel alike. Both wrap, because the hours string can be long and the
 * chip must never be pushed off the edge. */
.lf-card__avail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.lf-card__avail:empty { display: none; }
.lf-detail__avail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

/* ─── Complex schedules in the detail panel ───────────────────────────────── *
 * Grouped rows from bdbank_hour_slot_lines() (inc/location-hours.php). A
 * two-column grid rather than a wrapping sentence: with three or four windows
 * the one-line form makes a parent read the whole thing to find their own day.
 * Simple schedules still collapse to a single row, so this costs them nothing. */
.lf-schedule {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 14px;
  width: 100%;
}
.lf-schedule__when { font-weight: 600; white-space: nowrap; }
.lf-schedule__times { color: var(--brown-med); }
.lf-schedule__note {
  display: block;
  width: 100%;
  margin-top: 6px;
  font: 400 14px/1.5 var(--font-sans);
  color: var(--brown-muted);
}
/* The chip sits on its own line above the grid — inline it would push the
   first row's day out of alignment with the ones under it. */
.lf-detail__avail .lf-tag { flex: 0 0 auto; }
.lf-detail__avail:has(.lf-schedule) { align-items: flex-start; }
.lf-detail__avail:has(.lf-schedule) .lf-tag { margin-bottom: 4px; }

/* ─── Schedule on a finder card ───────────────────────────────────────────── *
 * Same grouped rows as the detail panel, tighter. A card is scanned rather
 * than read: three short aligned rows beat one sentence that wraps, even
 * though they take a similar amount of space. Locations with a single window
 * — most of them — still render as one row and look no different. */
.lf-card__schedule {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1px 12px;
  font: 400 14px/1.5 var(--font-sans);
  color: var(--brown-med);
}
.lf-card__schedule-when { font-weight: 600; white-space: nowrap; }
.lf-card__schedule-more,
.lf-card__hours-note {
  font: 400 13px/1.5 var(--font-sans);
  color: var(--brown-muted);
}
.lf-card__hours-note { margin-top: 2px; }


/* ─── Map pin hover preview ───────────────────────────────────────────────── *
 * Overrides Leaflet's default tooltip chrome entirely — its own styling is a
 * pale yellow browser-tooltip look that reads as a system artifact next to
 * everything else here. Bound on hover-capable pointers only
 * (assets/js/location-finder.js), so this never has to work as a tap target. */
.leaflet-tooltip.lf-tip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  /* Leaflet tooltips are absolutely positioned, so the box is shrink-to-fit —
     max-width alone never gives it a width to shrink *from*, and once
     white-space:normal allows wrapping it collapses to roughly its longest
     word. width:max-content sizes it to the longest line instead, with the
     max-width as the cap it was always meant to be. */
  width: max-content;
  min-width: 190px;
  max-width: 280px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card-sm);
  box-shadow: var(--shadow-overlay);
  color: var(--brown-dark);
  white-space: normal;   /* Leaflet forces nowrap; the schedule needs to wrap */
  font: 400 13px/1.45 var(--font-sans);
}
/* Leaflet draws the little arrow with border colors on a pseudo-element. */
.leaflet-tooltip.lf-tip.leaflet-tooltip-top:before { border-top-color: var(--border); }

.lf-tip__name {
  font: 700 14px/1.3 var(--font-serif);
  color: var(--brown-dark);
}
.lf-tip__open,
.lf-tip__access {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font: 600 11px var(--font-sans);
}
.lf-tip__open   { background: var(--pastel-green-bg); color: var(--teal-mid); }
.lf-tip__open--closed { background: var(--pastel-coral-bg); color: var(--red-dark); }
.lf-tip__access { background: var(--pastel-teal-bg);  color: var(--teal); }
.lf-tip__access--appointment { background: var(--pastel-yellow-bg); color: var(--yellow-dark); }
.lf-tip__access--referral    { background: var(--pastel-green-bg);  color: var(--brown-dark); }

.lf-tip__hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 10px;
  width: 100%;
}
.lf-tip__when  { font-weight: 600; white-space: nowrap; }
.lf-tip__times { color: var(--brown-med); }

.lf-tip__more,
.lf-tip__extra { color: var(--brown-muted); font-size: 12px; }

/* Migrated free-text hours can run to a full sentence; two lines is plenty
   for deciding whether to click. */
.lf-tip__flat {
  color: var(--brown-med);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
