/* =========================================================
   London Vineyard Finder — full-screen wizard layout
   /london-vineyard-finder/
   Mobile-first. Shares london90.css for cards/filters.
   ========================================================= */

/* ── Suppress site chrome on this page ──────────────────── */
body.lvf-page .site-hero,
body.lvf-page #mobile-panel,
body.lvf-page #mobile-burger,
body.lvf-page .site-footer {
  display: none !important;
}

body.lvf-page main {
  padding: 0 !important;
  margin: 0 !important;
  flex: none !important;
}

/* ── Page shell ─────────────────────────────────────────── */
html.lvf-page,
body.lvf-page {
  height: 100%;
  overflow: hidden;
}

.lvf-app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
}

/* Suppress london90.js guide (we use the wizard instead) */
.lvf-page #l90Guide {
  display: none !important;
}

/* Shim elements london90.js expects but we don't visually use */
.lvf-l90-shim,
.lvf-l90-hidden {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

/* ── Screen base ────────────────────────────────────────── */
.lvf-screen {
  position: absolute;
  inset: 0;
}
.lvf-screen[hidden] {
  display: none !important;
}

/* ── Landing screen ─────────────────────────────────────── */
.lvf-landing {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f7faf7 0%, #eaf3ea 100%);
  z-index: 10;
}
.lvf-landing.is-hiding {
  animation: lvfLandingOut 0.4s ease forwards;
}
@keyframes lvfLandingOut {
  to { opacity: 0; transform: translateY(-24px); }
}

.lvf-landing__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
  gap: 16px;
}

.lvf-landing__logo {
  width: 140px;
  margin-bottom: 8px;
}

.lvf-landing__title {
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text, #1a1a1a);
  margin: 0;
}

.lvf-landing__sub {
  font-size: 1rem;
  color: #666;
  margin: 0;
}

/* ── CTA button ─────────────────────────────────────────── */
.lvf-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent, #739d75);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  white-space: nowrap;
}
.lvf-cta-btn:hover {
  background: var(--accent-d, #5a8a5c);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(0,0,0,0.22);
}
.lvf-cta-btn--find {
  width: 100%;
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* ── Wizard container ───────────────────────────────────── */
.lvf-wizard {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.lvf-wizard[hidden] {
  display: none !important;
}

/* ── Wizard step ────────────────────────────────────────── */
.lvf-wiz-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  animation: lvfStepIn 0.3s ease;
}
.lvf-wiz-step[hidden] {
  display: none !important;
}
@keyframes lvfStepIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Wizard header bar */
.lvf-wiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--frame-border, #e8e8e8);
  flex-shrink: 0;
  gap: 12px;
}

.lvf-wiz-logo {
  height: 32px;
  width: auto;
}

.lvf-wiz-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
  line-height: 1;
  flex-shrink: 0;
}
.lvf-wiz-close:hover { color: #333; }

.lvf-wiz-back {
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent, #739d75);
  cursor: pointer;
  padding: 4px 8px 4px 0;
  font-family: inherit;
  flex-shrink: 0;
}
.lvf-wiz-back:hover { text-decoration: underline; }

.lvf-wiz-progress {
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Wizard body */
.lvf-wiz-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px 16px;
}
.lvf-wiz-body--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.lvf-wiz-title {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text, #1a1a1a);
  margin: 0 0 8px;
}

.lvf-wiz-sub {
  font-size: 0.9rem;
  color: #666;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* Wizard footer */
.lvf-wiz-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--frame-border, #e8e8e8);
  flex-shrink: 0;
}

/* ── Step 1: Transport mode cards ───────────────────────── */
.lvf-mode-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.lvf-mode-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 2px solid var(--frame-border, #e8e8e8);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  width: 100%;
}
.lvf-mode-card:hover {
  border-color: var(--accent, #739d75);
  background: #f7faf7;
}
.lvf-mode-card.is-active {
  border-color: var(--accent, #739d75);
  background: #f0f6f0;
  box-shadow: 0 0 0 3px rgba(115,157,117,0.15);
}

.lvf-mode-card__icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.lvf-mode-card__label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #1a1a1a);
  display: block;
  line-height: 1.2;
}

.lvf-mode-card__desc {
  font-size: 0.8rem;
  color: #777;
  display: block;
  line-height: 1.3;
  margin-top: 2px;
}

/* ── Step 2: Station list ───────────────────────────────── */
.lvf-stations {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.lvf-stations[hidden] {
  display: none !important;
}

.lvf-station-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--frame-border, #e8e8e8);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  position: relative;
}
.lvf-station-item:hover {
  border-color: var(--accent, #739d75);
  background: #f9fbf9;
}

/* Checkbox / radio inputs: hidden visually */
.lvf-station-item input[type="checkbox"],
.lvf-station-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.lvf-station-item__label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text, #1a1a1a);
}

/* Tick indicator (checkbox) */
.lvf-station-item__tick {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1.5px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  flex-shrink: 0;
}
.lvf-station-item--check input:checked ~ .lvf-station-item__tick {
  background: var(--accent, #739d75);
  border-color: var(--accent, #739d75);
  color: #fff;
}
.lvf-station-item--check input:checked ~ .lvf-station-item__label {
  font-weight: 700;
}
.lvf-station-item--check:has(input:checked) {
  border-color: var(--accent, #739d75);
  background: #f0f6f0;
}

/* Radio dot indicator */
.lvf-station-item__dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.12s;
}
.lvf-station-item__dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent, #739d75);
  transition: transform 0.12s ease;
}
.lvf-station-item--radio input:checked ~ .lvf-station-item__dot {
  border-color: var(--accent, #739d75);
}
.lvf-station-item--radio input:checked ~ .lvf-station-item__dot::after {
  transform: translate(-50%, -50%) scale(1);
}
.lvf-station-item--radio input:checked ~ .lvf-station-item__label {
  font-weight: 700;
}
.lvf-station-item--radio:has(input:checked) {
  border-color: var(--accent, #739d75);
  background: #f0f6f0;
}

/* Geolocation button */
.lvf-geo-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--accent, #739d75);
  border-radius: 12px;
  background: #f0f6f0;
  color: var(--accent, #739d75);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 8px;
  transition: background 0.15s;
}
.lvf-geo-btn:hover { background: #e4f0e4; }
.lvf-geo-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.lvf-geo-btn__icon { font-size: 1.1rem; }

.lvf-stations-or {
  font-size: 0.8rem;
  color: #999;
  text-align: center;
  margin: 8px 0 4px;
}

/* ── Step 3: Time slider ────────────────────────────────── */
.lvf-time-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding-top: 8px;
}

.lvf-time-step__out {
  font-size: clamp(2.4rem, 10vw, 3.5rem);
  font-weight: 900;
  color: var(--accent, #739d75);
  line-height: 1;
  letter-spacing: -0.02em;
}

.lvf-time-step__desc {
  font-size: 0.9rem;
  color: #666;
  margin: -8px 0 0;
  text-align: center;
}

.lvf-time-step__range {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent, #739d75) 0%, var(--accent, #739d75) 100%, #ddd 100%);
  outline: none;
  cursor: pointer;
}
.lvf-time-step__range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent, #739d75);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  cursor: grab;
}
.lvf-time-step__range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent, #739d75);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  cursor: grab;
}

.lvf-time-step__labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.75rem;
  color: #aaa;
  font-weight: 600;
  margin-top: -8px;
}

/* ── Step 4: Preference pills ───────────────────────────── */
.lvf-prefs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.lvf-pref-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1.5px solid var(--frame-border, #e0e0e0);
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text, #333);
  background: #fff;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  user-select: none;
}
.lvf-pref-pill:hover {
  border-color: var(--accent, #739d75);
  background: #f7faf7;
}
.lvf-pref-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.lvf-pref-pill:has(input:checked) {
  border-color: var(--accent, #739d75);
  background: var(--accent, #739d75);
  color: #fff;
}

/* ── Loading animation ──────────────────────────────────── */
.lvf-loading {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.lvf-loading[hidden] { display: none !important; }
.lvf-loading.is-fading {
  animation: lvfFadeOut 0.4s ease 0.8s forwards;
}
@keyframes lvfFadeOut {
  to { opacity: 0; }
}

.lvf-loading__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.lvf-loading__logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lvf-loading__logo {
  width: 100px;
  animation: lvfLogoPulse 1.2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
@keyframes lvfLogoPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
}
.lvf-loading__pulse {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(115,157,117,0.12);
  animation: lvfPulseRing 1.2s ease-in-out infinite;
}
@keyframes lvfPulseRing {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.15; }
}
.lvf-loading__label {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
}
.lvf-loading__dots {
  display: flex;
  gap: 6px;
}
.lvf-loading__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #739d75);
  animation: lvfDot 1.2s ease-in-out infinite;
}
.lvf-loading__dots span:nth-child(2) { animation-delay: 0.2s; }
.lvf-loading__dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes lvfDot {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Results view ───────────────────────────────────────── */
.lvf-results {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lvf-results[hidden] { display: none !important; }
.lvf-results.is-entering {
  animation: lvfSlideUp 0.45s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
@keyframes lvfSlideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Results top bar */
.lvf-results-header {
  position: relative; /* needed for z-index to apply */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #fff;
  border-bottom: 1px solid var(--frame-border, #e8e8e8);
  flex-shrink: 0;
  z-index: 10;
}

.lvf-filters-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px solid #ccc;
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text, #1a1a1a);
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.lvf-filters-toggle:hover {
  border-color: #888;
  background: #f5f5f5;
}

.lvf-time-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.lvf-time-bar__label {
  font-size: 0.73rem;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
  flex-shrink: 0;
}
.lvf-time-bar__range {
  flex: 1;
  min-width: 0;
}
.lvf-time-bar__out {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent, #739d75);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 5ch;
  text-align: right;
}

/* Map area — z-index: 0 creates a stacking context so Mapbox's internal
   z-indexes (it sets z-index:1 on .mapboxgl-map) stay contained here
   and don't bleed above the sheet overlay. */
.lvf-map-area {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  z-index: 0;
}
/* Mapbox overrides position:relative on its container, so we use
   width/height 100% rather than position:absolute/inset:0 to ensure
   the element always fills the map area even after Mapbox mutates it. */
.lvf-map-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
/* Keep the internal Mapbox canvas & wrapper filling the container */
.lvf-map-canvas .mapboxgl-map,
.lvf-map-canvas .mapboxgl-canvas-container {
  width: 100% !important;
  height: 100% !important;
}
.lvf-map-canvas .mapboxgl-canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Map pin popup */
.lvf-pin-popup {
  position: absolute;
  bottom: 96px;
  left: 12px;
  right: 12px;
  z-index: 5; /* above sheet z-index:2 */
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  overflow: hidden;
  animation: lvfPopupIn 0.22s ease;
  max-height: calc(100% - 160px); /* never taller than viewport minus header+gap */
  overflow-y: auto;
}
.lvf-pin-popup[hidden] { display: none !important; }
@keyframes lvfPopupIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lvf-pin-popup__close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255,255,255,0.9);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  z-index: 1;
  line-height: 1;
}
.lvf-pin-popup .l90-card {
  border: none;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
  transform: none !important;
}
.lvf-pin-popup .l90-card:hover {
  box-shadow: none;
  transform: none;
}
.lvf-pin-popup .l90-card__details { display: none; }

/* ── Bottom sheet ───────────────────────────────────────── */
.lvf-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(100% - 44px); /* 44px = results header height */
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -3px 16px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  will-change: transform;
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 2; /* above .lvf-map-area (z-index:0) */
}
.lvf-sheet.is-dragging {
  transition: none;
}

/* Snap positions */
.lvf-sheet[data-snap="closed"] { transform: translateY(calc(100% - 80px)); }
.lvf-sheet[data-snap="half"]   { transform: translateY(55%); }
.lvf-sheet[data-snap="open"]   { transform: translateY(0); }

.lvf-sheet__handle-bar {
  display: flex;
  justify-content: center;
  padding: 14px 0 12px;
  flex-shrink: 0;
  cursor: grab;
  touch-action: none;
}
.lvf-sheet__handle-bar:active { cursor: grabbing; }
.lvf-sheet__handle {
  width: 36px;
  height: 4px;
  background: #d0d0d0;
  border-radius: 2px;
}

.lvf-sheet__inner {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Meta row — sits outside the scrollable inner div, doubles as drag zone */
.lvf-sheet__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 6px;
  border-bottom: 1px solid var(--frame-border, #e8e8e8);
  background: #fff;
  flex-shrink: 0;
  touch-action: none;
  cursor: grab;
}
.lvf-sheet__meta:active { cursor: grabbing; }
.lvf-sheet__meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lvf-sheet__count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.lvf-back-filters {
  background: none;
  border: 1.5px solid #ccc;
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text, #1a1a1a);
}
.lvf-back-filters[hidden] { display: none !important; }

.lvf-sort {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lvf-sort .l90-results__label {
  font-size: 0.8rem;
  color: #777;
  white-space: nowrap;
}

/* Card list */
.lvf-card-list {
  list-style: none;
  padding: 0 12px;
  margin: 0;
}
.lvf-card-list .l90-card {
  margin-top: 12px;
}
.lvf-card-list .l90-card:first-child {
  margin-top: 8px;
}

/* "dep. from" label below vineyard name */
.lvf-dep-label {
  display: block;
  font-size: 0.76rem;
  color: #888;
  font-weight: 500;
  margin-top: 2px;
  line-height: 1.3;
}

/* ── Compact card overrides for LVF results sheet ─────── */
/* More compact card padding */
.lvf-page .l90-card {
  padding: 10px 12px 8px !important;
}
.lvf-page .l90-card + .l90-card {
  margin-top: 8px !important;
}
/* 4 keyword chips per row */
.lvf-page .l90-card__chips .l90-chip {
  flex: 0 0 calc((100% - 3 * 0.4rem) / 4) !important;
  width: calc((100% - 3 * 0.4rem) / 4) !important;
  min-width: unset !important;
  font-size: 0.65rem !important;
  padding: 0.2rem 0.35rem !important;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
/* Compact meta row links to fit 4 on one line */
.lvf-page .l90-card__metaRow {
  font-size: 0.75rem !important;
  margin-top: 4px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lvf-page .l90-card__site {
  font-size: 0.75rem;
}
/* Tighter card top area */
.lvf-page .l90-card__top {
  margin-bottom: 2px;
}
.lvf-page .l90-card__chips {
  margin-top: 3px !important;
}

/* Load more / spacer */
.lvf-more-wrap {
  padding: 16px 12px 12px;
  text-align: center;
}
.lvf-more-wrap[hidden] { display: none !important; }

.lvf-sheet__spacer {
  height: env(safe-area-inset-bottom, 20px);
  min-height: 20px;
}

/* Mapbox attribution: keep above sheet handle */
.lvf-map-canvas .mapboxgl-ctrl-bottom-right,
.lvf-map-canvas .mapboxgl-ctrl-bottom-left {
  bottom: 0 !important;
}

/* ── Global header ──────────────────────────────────────── */
.lvf-global-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 44px;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
}
.lvf-global-header__logo-link { display: flex; align-items: center; }
.lvf-global-header__logo { height: 26px; width: auto; }

/* App sits below the header */
.lvf-app {
  top: 44px; /* override: was inset:0 which includes top:0 */
}

/* ── Range input: green fill ────────────────────────────── */
.lvf-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--accent, #739d75) var(--range-fill, 100%),
    #dde8dd var(--range-fill, 100%)
  );
  cursor: pointer;
  outline: none;
}
.lvf-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent, #739d75);
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(115,157,117,0.18);
}
.lvf-range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent, #739d75);
  border: none; cursor: pointer;
}
.lvf-range::-moz-range-track { height: 4px; border-radius: 2px; background: #dde8dd; }

/* ── Filter panel (edit mode) ───────────────────────────── */
.lvf-filter-panel {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.lvf-filter-panel[hidden] { display: none !important; }
.lvf-filter-panel.is-open { transform: translateY(0); }

.lvf-fp__header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
  gap: 8px;
}
.lvf-fp__title {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.lvf-fp__close {
  background: none;
  border: none;
  font-size: 0.85rem;
  color: #666;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  flex-shrink: 0;
  min-width: 56px;
}
.lvf-fp__apply-btn {
  background: var(--accent, #739d75);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.lvf-fp__apply-btn:disabled,
.lvf-fp__apply-btn.is-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.lvf-fp__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.lvf-fp__section {
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}
.lvf-fp__section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin: 0 0 12px;
}
.lvf-fp__section-optional { font-weight: 400; text-transform: none; letter-spacing: 0; }
.lvf-fp__mode-pills {
  display: flex;
  gap: 8px;
}
.lvf-fp__mode-pill {
  flex: 1;
  padding: 8px 4px;
  border: 1.5px solid #ddd;
  border-radius: 50px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.lvf-fp__mode-pill.is-active {
  border-color: var(--accent, #739d75);
  background: #f0f7f0;
  color: var(--accent, #739d75);
}
/* "All" button — appears as first chip in the station grid */
.lvf-station-all-btn {
  padding: 6px 16px;
  border: 1.5px solid #ddd;
  border-radius: 50px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  color: inherit;
}
.lvf-station-all-btn.is-active,
.lvf-station-all-btn:hover {
  border-color: var(--accent, #739d75);
  background: #f0f7f0;
  color: var(--accent, #739d75);
}

.lvf-fp__station-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lvf-fp__station-grid[hidden] {
  display: none;
}
.lvf-fp__section[hidden] {
  display: none !important;
}
.lvf-fp__station-pill {
  cursor: pointer;
  user-select: none;
}
.lvf-fp__station-pill input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.lvf-fp__station-pill span {
  display: inline-block;
  padding: 6px 12px;
  border: 1.5px solid #ddd;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}
.lvf-fp__station-pill:has(input:checked) span {
  border-color: var(--accent, #739d75);
  background: #f0f7f0;
  color: var(--accent, #739d75);
  font-weight: 700;
}
.lvf-fp__time-out {
  font-weight: 700;
  color: var(--accent, #739d75);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
}
.lvf-fp__range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 6px;
}
.lvf-fp__prefs { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Zero results fallback ──────────────────────────────── */
.lvf-zero-fallback {
  margin: 12px;
  padding: 16px;
  background: #fff9f0;
  border: 1.5px solid #f0e8d4;
  border-radius: 12px;
  font-size: 0.88rem;
}
.lvf-zero-fallback__title {
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 6px;
}
.lvf-zero-fallback__sub {
  color: #666;
  margin: 8px 0 10px;
  font-size: 0.84rem;
}
.lvf-zero-fallback__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.lvf-zero-fallback__btn {
  padding: 8px 14px;
  border: 1.5px solid var(--accent, #739d75);
  background: #fff;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--accent, #739d75);
  transition: background 0.15s;
}
.lvf-zero-fallback__btn:hover { background: #f0f7f0; }

/* ── Desktop layout (≥ 768px) ───────────────────────────── */
@media (min-width: 768px) {

  /* Wizard steps: max-width centred */
  .lvf-wiz-step {
    align-items: center;
  }
  .lvf-wiz-header {
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
  }
  .lvf-wiz-body {
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
  }
  .lvf-wiz-footer {
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
  }

  /* Mode cards: 3-column row on desktop */
  .lvf-mode-cards {
    flex-direction: row;
  }
  .lvf-mode-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 24px 16px;
    flex: 1;
  }
  .lvf-mode-card__desc {
    font-size: 0.77rem;
  }

  /* Results: side-by-side layout */
  .lvf-results {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .lvf-results-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 380px;
    z-index: 20;
    border-bottom: none;
    border-right: 1px solid var(--frame-border, #e8e8e8);
  }

  .lvf-map-area {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 380px;
  }

  /* Sheet = fixed left panel on desktop */
  .lvf-sheet {
    position: absolute;
    top: 44px; /* below results header */
    left: 0;
    right: auto;
    bottom: 0;
    width: 380px;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    border-right: 1px solid var(--frame-border, #e8e8e8);
    transform: none !important;
    transition: none;
  }
  .lvf-sheet__handle-bar { display: none; }
  .lvf-sheet__inner { padding-bottom: 40px; }

  .lvf-pin-popup {
    left: calc(380px + 12px);
  }
}

@media (min-width: 720px) {
  .lvf-filter-panel {
    left: 0;
    width: 380px;
    right: auto;
  }
}
