/**
 * Store list (/stores/) — layout from store-list-template.html.
 * Scoped to body.ordering-store-locator; all classes use the `sl-` prefix so
 * Bootstrap (.card, .list…) and other ordering pages are unaffected.
 *
 * Colours:
 *   top bar  → custom hex, or theme colour, or page background when set to none
 *   Order CTA → --ordering-store-list-btn    || --ordering-theme
 * (vars set by ordering_theme_inline.php / ordering-config.js / store-locator.js)
 */
body.ordering-store-locator {
  --sl-brand: var(--ordering-store-list-btn, var(--ordering-theme, #ffc72c));
  --sl-brand-dark: var(--ordering-store-list-btn-dark, var(--ordering-theme-dark, #f5b800));
  --sl-brand-fg: var(--ordering-store-list-btn-fg, var(--ordering-topbar-fg, #131417));
  --sl-ink: #131417;
  --sl-ink-2: #3d4148;
  --sl-muted: #757a83;
  --sl-line: #e8e9eb;
  --sl-paper: #ffffff;
  --sl-wash: #f6f7f5;
  --sl-green: #178a4c;
  --sl-red: #d64533;
  --sl-logo-h: 64px;
  --sl-logo-max: 280px;
  --sl-bar-min: 84px;
  --sl-radius: 20px;
  --sl-shadow: 0 1px 2px rgba(19,20,23,.05), 0 12px 32px -12px rgba(19,20,23,.14);
  --sl-shadow-lift: 0 2px 4px rgba(19,20,23,.06), 0 20px 44px -16px rgba(19,20,23,.22);
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
  color: var(--sl-ink);
  background: var(--sl-wash);
  -webkit-font-smoothing: antialiased;
}
body.ordering-store-locator .sl-icon {
  width: 18px; height: 18px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
body.ordering-store-locator .sl-icon.sm { width: 15px; height: 15px; }

/* ── Top bar ─────────────────────────────────────────────────── */
body.ordering-store-locator .ordering-store-locator-topbar {
  position: sticky; top: 0; z-index: 40;
}
body.ordering-store-locator.ordering-store-list-plain-topbar .ordering-store-locator-topbar,
body.ordering-store-locator.ordering-store-list-plain-topbar .ordering-store-locator-topbar .header-main {
  background: var(--sl-wash) !important;
  color: var(--ordering-store-list-topbar-fg, var(--sl-ink));
  box-shadow: none !important;
}
body.ordering-store-locator.ordering-store-list-custom-topbar .ordering-store-locator-topbar,
body.ordering-store-locator.ordering-store-list-custom-topbar .ordering-store-locator-topbar .header-main {
  background: var(--ordering-store-list-topbar) !important;
  color: var(--ordering-store-list-topbar-fg, #fff);
  box-shadow: 0 1px 0 rgba(0,0,0,.06) !important;
}
body.ordering-store-locator.ordering-store-list-bar-small {
  --sl-logo-h: 44px;
  --sl-logo-max: 220px;
  --sl-bar-min: 64px;
}
body.ordering-store-locator.ordering-store-list-bar-large {
  --sl-logo-h: 88px;
  --sl-logo-max: 360px;
  --sl-bar-min: 108px;
}
/* style.css locks .header-main at 67px below 992px. That clips a taller logo. */
body.ordering-store-locator .ordering-store-locator-topbar .header-main {
  height: auto !important;
  min-height: var(--sl-bar-min);
  overflow: visible;
}
body.ordering-store-locator .sl-topbar-in {
  display: flex; align-items: center; justify-content: center; padding: 10px 16px; min-height: var(--sl-bar-min);
}
body.ordering-store-locator .sl-brandmark {
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
body.ordering-store-locator .sl-brand-logo {
  height: var(--sl-logo-h); width: auto; max-width: min(var(--sl-logo-max), calc(100vw - 280px)); object-fit: contain; display: block;
}
body.ordering-store-locator .sl-top-links,
body.ordering-store-locator .sl-top-menu {
  position: absolute; right: 8px; top: 0; bottom: 0;
  display: flex; align-items: center; gap: 4px;
}
body.ordering-store-locator .sl-top-menu { display: none; }
body.ordering-store-locator .sl-top-link {
  background: none; border: 0; color: inherit; font: inherit; font-weight: 600;
  padding: 8px 10px; cursor: pointer; border-radius: 8px;
}
body.ordering-store-locator .sl-top-link:hover { background: rgba(0,0,0,.06); }
body.ordering-store-locator .sl-menu-btn {
  width: 44px; height: 44px; border: 0; background: transparent; padding: 0;
  display: grid; place-items: center; cursor: pointer;
}
body.ordering-store-locator .sl-menu-btn span,
body.ordering-store-locator .sl-menu-btn span::before,
body.ordering-store-locator .sl-menu-btn span::after {
  display: block; width: 22px; height: 2px; border-radius: 2px; position: relative;
  background: var(--ordering-store-list-menu-icon, var(--ordering-theme, #2563eb));
}
body.ordering-store-locator .sl-menu-btn span::before,
body.ordering-store-locator .sl-menu-btn span::after {
  content: ""; position: absolute; left: 0;
}
body.ordering-store-locator .sl-menu-btn span::before { top: -7px; }
body.ordering-store-locator .sl-menu-btn span::after { top: 7px; }
body.ordering-store-locator .sl-menu-panel {
  position: absolute; top: calc(100% - 6px); right: 0; min-width: 180px;
  background: #fff; color: var(--sl-ink); border-radius: 14px;
  box-shadow: var(--sl-shadow); padding: 6px; z-index: 50;
}
body.ordering-store-locator .sl-menu-panel .sl-top-link {
  display: block; width: 100%; text-align: left; color: var(--sl-ink);
}
@media (max-width: 991.98px) {
  body.ordering-store-locator .sl-brandmark { max-width: calc(100% - 72px); }
  body.ordering-store-locator .sl-brand-logo { max-width: 100%; }
  body.ordering-store-locator .sl-top-links { display: none; }
  body.ordering-store-locator .sl-top-menu { display: flex; }
}
body.ordering-store-locator .sl-brand-diamond {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  background: var(--sl-brand); color: var(--sl-brand-fg);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
body.ordering-store-locator .sl-brand-diamond svg { width: 19px; height: 19px; }
body.ordering-store-locator.sl-has-logo .sl-brand-diamond { display: none; }
body.ordering-store-locator:not(.sl-has-logo) .sl-brand-logo { display: none !important; }

/* ── Hero / search ───────────────────────────────────────────── */
body.ordering-store-locator .sl-main { padding: 0 0 8px; }
body.ordering-store-locator .sl-wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
body.ordering-store-locator .sl-hero { padding-top: 15px; }
body.ordering-store-locator .sl-title {
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  margin: 0 0 4px;
  color: var(--sl-ink);
}
body.ordering-store-locator .sl-search-row {
  display: flex; gap: 10px; margin-top: 0; width: 100%; max-width: 720px; min-width: 0;
}
body.ordering-store-locator .sl-search {
  flex: 1 1 0; min-width: 0; overflow: hidden; display: flex; align-items: center; gap: 10px; margin: 0;
  background: var(--sl-paper); border: 1.5px solid var(--sl-line); border-radius: 16px;
  padding: 0 16px; min-height: 56px; transition: .18s;
}
body.ordering-store-locator .sl-search:focus-within { border-color: var(--sl-ink); box-shadow: 0 0 0 4px rgba(19,20,23,.08); }
body.ordering-store-locator .sl-search .sl-icon { color: var(--sl-muted); }
body.ordering-store-locator .sl-search input {
  flex: 1 1 auto; width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 1rem; font-weight: 500; min-width: 0; color: var(--sl-ink);
}
body.ordering-store-locator .sl-search input::placeholder { color: #9aa0a8; font-weight: 400; }
body.ordering-store-locator .sl-search input::-webkit-search-cancel-button { display: none; }
body.ordering-store-locator .sl-search-clear { display: none; color: var(--sl-muted); padding: 4px; background: none; border: 0; }
body.ordering-store-locator .sl-search.has-text .sl-search-clear { display: block; }
body.ordering-store-locator .sl-btn-locate {
  display: inline-flex; align-items: center; gap: 8px; background: var(--sl-ink); color: #fff; border: 0;
  font-weight: 700; font-size: .9rem; border-radius: 16px; padding: 0 18px; min-height: 56px; white-space: nowrap; transition: .18s;
}
body.ordering-store-locator .sl-btn-locate:hover { background: #000; transform: translateY(-1px); }
body.ordering-store-locator .sl-btn-locate.is-loading .sl-icon { animation: sl-spin 1s linear infinite; }
@keyframes sl-spin { to { transform: rotate(360deg); } }
@media (max-width: 767.98px) {
  body.ordering-store-locator .sl-search-row { gap: 8px; }
  body.ordering-store-locator .sl-search { min-height: 48px; padding: 0 12px; gap: 8px; }
  body.ordering-store-locator .sl-search input { font-size: .92rem; }
  body.ordering-store-locator .sl-btn-locate {
    min-height: 48px; padding: 0 12px; font-size: .82rem; gap: 6px; flex-shrink: 0;
  }
}
body.ordering-store-locator .sl-order-types {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
body.ordering-store-locator .sl-order-types button {
  border: 1px solid var(--sl-line); background: #fff; color: var(--sl-ink);
  border-radius: 999px; padding: 12px 36px; min-width: 148px; cursor: pointer;
  font-family: Outfit, system-ui, sans-serif; font-size: .92rem; font-weight: 650; line-height: 1;
}
body.ordering-store-locator .sl-order-types button.is-active {
  background: var(--sl-ink); color: #fff; border-color: var(--sl-ink);
}
@media (max-width: 767.98px) {
  body.ordering-store-locator .sl-order-types { flex-wrap: nowrap; gap: 8px; }
  body.ordering-store-locator .sl-order-types button {
    flex: 1 1 0; min-width: 0; padding: 11px 6px; font-size: .84rem;
  }
}

/* Last-store banner */
body.ordering-store-locator .sl-last-store {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 18px;
  background: var(--sl-paper); border: 1px solid var(--sl-line); border-radius: 14px; padding: 12px 16px;
  box-shadow: var(--sl-shadow); font-size: .92rem;
}
body.ordering-store-locator .sl-last-store a { color: var(--sl-ink) !important; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ── Controls row ────────────────────────────────────────────── */
body.ordering-store-locator .sl-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
body.ordering-store-locator .sl-result-line { font-size: .9rem; color: var(--sl-muted); }
body.ordering-store-locator .sl-result-line strong { color: var(--sl-ink); }
body.ordering-store-locator .sl-near-note { display: none; font-size: .85rem; font-weight: 600; color: var(--sl-green); align-items: center; gap: 6px; }
body.ordering-store-locator .sl-near-note.show { display: inline-flex; }

/* ── Layout ──────────────────────────────────────────────────── */
body.ordering-store-locator > main.store-locator-main {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
body.ordering-store-locator .sl-layout {
  padding-top: 0;
  padding-bottom: 56px;
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: 1280px;
  grid-template-columns: minmax(0, 1fr);
}
body.ordering-store-locator .sl-layout > * { min-width: 0; max-width: 100%; }
@media (min-width: 1024px) {
  body.ordering-store-locator .sl-layout.has-map {
    grid-template-columns: 430px minmax(0, 1fr);
    align-items: start;
    padding-top: 15px;
  }
  body.ordering-store-locator .sl-layout.has-map .sl-hero { grid-column: 1; grid-row: 1; padding-top: 0; }
  body.ordering-store-locator .sl-layout.has-map .sl-controls { grid-column: 1; grid-row: 2; }
  body.ordering-store-locator .sl-layout.has-map .sl-list { grid-column: 1; grid-row: 3; }
  body.ordering-store-locator .sl-layout.has-map .sl-map-wrap {
    grid-column: 2;
    grid-row: 1 / span 3;
    position: sticky;
    top: calc(var(--sl-bar-min) + 12px);
    align-self: start;
  }
  body.ordering-store-locator .sl-layout.has-map .sl-search-row { max-width: none; }
  body.ordering-store-locator .sl-layout.has-map .sl-btn-locate {
    padding: 0 12px;
    gap: 6px;
    font-size: .82rem;
  }
  body.ordering-store-locator .sl-layout.has-map .sl-order-types { flex-wrap: nowrap; }
  body.ordering-store-locator .sl-layout.has-map .sl-order-types button {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 8px;
  }
  body.ordering-store-locator .sl-layout:not(.has-map) .sl-list { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
}

/* ── Real map (Leaflet + OpenStreetMap tiles) ── */
body.ordering-store-locator .sl-map-wrap {
  position: relative;
  z-index: 1;
  isolation: isolate;
  border-radius: 24px; overflow: hidden; border: 1px solid var(--sl-line); box-shadow: var(--sl-shadow); background: #e8eef2;
}
body.ordering-store-locator .sl-map-styles {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: flex; gap: 4px; padding: 4px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(19,20,23,.08);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(19,20,23,.16);
}
body.ordering-store-locator .sl-map-styles button {
  border: 0; background: transparent; color: #3a3d44;
  border-radius: 999px; padding: 7px 12px; cursor: pointer;
  font-family: Outfit, system-ui, sans-serif; font-size: 12px; font-weight: 650; line-height: 1;
}
body.ordering-store-locator .sl-map-styles button.is-active {
  background: #131417; color: #fff;
}
body.ordering-store-locator .sl-map,
body.ordering-store-locator .sl-map.leaflet-container {
  position: relative; height: 270px; width: 100%; max-width: 100%; z-index: 0;
}
@media (min-width: 1024px) { body.ordering-store-locator .sl-map { height: calc(100vh - 150px); min-height: 520px; } }
body.ordering-store-locator .sl-map .leaflet-control-attribution {
  font-size: 10px; background: rgba(255,255,255,.85);
}
body.ordering-store-locator .sl-leaflet-pin {
  background: transparent !important; border: 0 !important;
}
body.ordering-store-locator .sl-leaflet-pin span {
  display: block; width: 22px; height: 22px; margin: 0 auto;
  background: var(--sl-ink); border: 2px solid #fff;
  border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(19,20,23,.28);
}
body.ordering-store-locator .sl-leaflet-pin.is-active span {
  background: var(--ordering-store-list-btn, var(--ordering-theme, var(--sl-red)));
  transform: rotate(-45deg) scale(1.15);
}

/* ── Store cards ─────────────────────────────────────────────── */
body.ordering-store-locator .sl-list { display: grid; gap: 14px; align-content: start; }
body.ordering-store-locator .sl-card {
  background: var(--sl-paper); border: 1px solid var(--sl-line); border-radius: var(--sl-radius);
  padding: 20px; box-shadow: var(--sl-shadow); transition: .22s;
}
body.ordering-store-locator .sl-card:hover { box-shadow: var(--sl-shadow-lift); transform: translateY(-2px); }
body.ordering-store-locator .sl-card.active { border-color: var(--sl-ink); box-shadow: 0 0 0 1.5px var(--sl-ink), var(--sl-shadow-lift); }
body.ordering-store-locator .sl-card-top { display: flex; gap: 13px; align-items: flex-start; }
body.ordering-store-locator .sl-card-logo {
  width: 56px; height: 56px; flex: none; position: relative;
  border-radius: 14px; overflow: hidden;
  background: var(--ordering-theme, #f3f4f6);
  border: 1px solid var(--sl-line);
  display: grid; place-items: center;
}
body.ordering-store-locator .sl-card-logo img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  background: #fff; padding: 4px;
}
body.ordering-store-locator .sl-card-logo-fallback {
  display: none;
  font-family: "Bricolage Grotesque", "Outfit", sans-serif;
  font-weight: 800; font-size: .82rem; letter-spacing: .02em; color: #fff;
}
body.ordering-store-locator .sl-card-logo.is-fallback {
  background: var(--sl-ink); border-color: transparent;
}
body.ordering-store-locator .sl-card-logo.is-fallback .sl-card-logo-fallback { display: grid; place-items: center; width: 100%; height: 100%; }
body.ordering-store-locator .sl-card-logo:not(.is-fallback) .sl-card-logo-fallback { display: none; }
body.ordering-store-locator .sl-card-head { flex: 1; min-width: 0; }
body.ordering-store-locator .sl-card-title-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
body.ordering-store-locator .sl-card-head h2 {
  flex: 1; min-width: 0;
  font-family: "Bricolage Grotesque", "Outfit", sans-serif; font-weight: 700; font-size: 1.13rem;
  letter-spacing: -.015em; line-height: 1.15; margin: 0; color: var(--sl-ink); overflow-wrap: anywhere;
}
body.ordering-store-locator .sl-card-head h2 a { color: inherit; text-decoration: none; }
body.ordering-store-locator .sl-card-head h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.ordering-store-locator .sl-status-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 5px; font-size: .84rem; }
body.ordering-store-locator .sl-status {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  margin-top: 2px; white-space: nowrap; font-weight: 700; color: var(--sl-green);
}
body.ordering-store-locator .sl-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--sl-green); box-shadow: 0 0 0 3px rgba(23,138,76,.15); }
body.ordering-store-locator .sl-status.closed { color: var(--sl-red); }
body.ordering-store-locator .sl-status.closed i { background: var(--sl-red); box-shadow: 0 0 0 3px rgba(214,69,51,.14); }
body.ordering-store-locator .sl-status-meta { color: var(--sl-muted); font-weight: 500; }
body.ordering-store-locator .sl-card-meta { margin-top: 15px; display: grid; gap: 9px; }
body.ordering-store-locator .sl-meta-line { display: flex; gap: 11px; font-size: .93rem; color: var(--sl-ink-2); line-height: 1.4; margin: 0; }
body.ordering-store-locator .sl-meta-line .sl-icon { color: #a2a7ae; margin-top: 1px; }
body.ordering-store-locator .sl-meta-line a { color: inherit; text-decoration: none; font-weight: 600; }
body.ordering-store-locator .sl-meta-line a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.ordering-store-locator .sl-card-actions { display: flex; gap: 9px; margin-top: 18px; }
body.ordering-store-locator .sl-card .sl-btn-ghost {
  flex: 1 1 0; width: calc((100% - 9px) / 2); max-width: calc((100% - 9px) / 2); min-width: 0;
  display: inline-flex; justify-content: center; align-items: center; gap: 7px;
  background: var(--sl-paper); color: var(--sl-ink); border: 1.5px solid var(--sl-line);
  font-weight: 700; font-size: .9rem; border-radius: 13px; padding: 13px 12px; transition: .18s; text-decoration: none;
}
body.ordering-store-locator .sl-card .sl-btn-ghost:hover { border-color: var(--sl-ink); }
/* Order CTA: store_list_button_color || theme_color. Beats the generic `.ordering-theme` rule. */
body.ordering-store-locator .sl-card .sl-btn-order.store-select-btn {
  flex: 1 1 0; width: calc((100% - 9px) / 2); max-width: calc((100% - 9px) / 2); min-width: 0;
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  background: var(--sl-brand) !important; color: var(--sl-brand-fg) !important;
  border: 1.5px solid rgba(19,20,23,.08) !important;
  font-weight: 800; font-size: .95rem; text-decoration: none; border-radius: 13px; padding: 13px 12px;
  transition: .18s; letter-spacing: .01em;
}
body.ordering-store-locator .sl-card .sl-btn-order.store-select-btn:hover,
body.ordering-store-locator .sl-card .sl-btn-order.store-select-btn:focus-visible {
  background: var(--sl-brand-dark) !important; color: var(--sl-brand-fg) !important;
  transform: translateY(-1px); box-shadow: 0 8px 18px -8px rgba(19,20,23,.45);
}
body.ordering-store-locator .sl-empty {
  text-align: center; padding: 44px 24px; background: var(--sl-paper);
  border: 1.5px dashed #cfd3d8; border-radius: var(--sl-radius);
}
body.ordering-store-locator .sl-empty h3 { font-family: "Bricolage Grotesque", "Outfit", sans-serif; font-size: 1.2rem; margin-bottom: 6px; }
body.ordering-store-locator .sl-empty p { color: var(--sl-muted); font-size: .92rem; margin: 0; }
body.ordering-store-locator .sl-empty button { margin-top: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; }
body.ordering-store-locator .sl-list-msg { padding: 24px 4px; color: var(--sl-muted); }
body.ordering-store-locator .sl-list-msg.is-error { color: var(--sl-red); }

/* ── Toast ───────────────────────────────────────────────────── */
body.ordering-store-locator .sl-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 120px); background: var(--sl-ink); color: #fff;
  font-weight: 600; font-size: .9rem; padding: 13px 20px; border-radius: 14px; box-shadow: var(--sl-shadow-lift); z-index: 1060;
  transition: transform .35s cubic-bezier(.5,0,.2,1.2); display: flex; gap: 9px; align-items: center; max-width: calc(100vw - 32px);
}
body.ordering-store-locator .sl-toast.show { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  body.ordering-store-locator .sl-card,
  body.ordering-store-locator .sl-pin,
  body.ordering-store-locator .sl-toast,
  body.ordering-store-locator .sl-btn-order { transition: none !important; }
  body.ordering-store-locator .sl-btn-locate.is-loading .sl-icon { animation: none !important; }
}

/* The shared ordering stylesheet hides the copyright footer on phones so menu pages can use the bottom nav. This page has no bottom nav, so show it. */
@media (max-width: 992px) {
  body.ordering-store-locator > footer.section-footer.border-top.bg-dark {
    display: block !important;
  }
}
