/* ============ iOS 26 Liquid Glass ============ */

:root {
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(255, 255, 255, 0.15);
  --text: #1c1c1e;
  --text-secondary: rgba(60, 60, 67, 0.6);
  --accent: #0a84ff;
  --green: #30d158;
  --red: #ff453a;
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --spring: cubic-bezier(0.34, 1.3, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --glass-bg: rgba(28, 28, 30, 0.55);
    --glass-bg-strong: rgba(28, 28, 30, 0.75);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    --text: #f2f2f7;
    --text-secondary: rgba(235, 235, 245, 0.6);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#map { position: absolute; inset: 0; }

/* Het glas zelf: blur + saturatie + specular randlicht */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  border-radius: var(--radius-md);
}

button { font-family: inherit; color: var(--text); cursor: pointer; border: none; background: none; }

.hidden { display: none !important; }

/* ============ Token dialoog ============ */
.token-overlay {
  position: absolute; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #6db3f2 0%, #a7d8f0 40%, #d4e9d7 100%);
}
.token-card {
  width: min(420px, calc(100vw - 48px));
  padding: 36px 32px; text-align: center;
  border-radius: var(--radius-lg);
  animation: pop-in 0.5s var(--spring);
}
.token-icon { font-size: 52px; margin-bottom: 12px; }
.token-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.token-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px; }
.token-card a { color: var(--accent); font-weight: 600; }
.token-card code {
  background: rgba(120,120,128,0.16); padding: 1px 6px; border-radius: 6px; font-size: 13px;
}
.token-card input {
  width: 100%; padding: 13px 16px; margin-bottom: 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.5); font-size: 14px; color: var(--text);
  outline: none; font-family: ui-monospace, monospace;
}
.token-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(10,132,255,0.18); }
.btn-primary {
  width: 100%; padding: 14px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 600;
  transition: transform 0.2s var(--spring), filter 0.2s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { transform: scale(0.97); }

/* ============ Zoekbalk ============ */
.search-wrap {
  position: absolute; top: max(18px, env(safe-area-inset-top)); left: 18px; z-index: 10;
  width: min(400px, calc(100vw - 36px));
}
.search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px; height: 54px;
  border-radius: 27px;
  transition: box-shadow 0.3s, transform 0.3s var(--spring);
}
.search-bar:focus-within {
  transform: scale(1.015);
  box-shadow: 0 12px 40px rgba(0,0,0,0.22), var(--glass-highlight), 0 0 0 4px rgba(10,132,255,0.22);
}
.search-icon { width: 19px; height: 19px; color: var(--text-secondary); flex-shrink: 0; }
#search-input {
  flex: 1; border: none; background: none; outline: none;
  font-size: 16px; color: var(--text); min-width: 0;
}
#search-input::placeholder { color: var(--text-secondary); }
.search-clear {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: rgba(120,120,128,0.22); color: var(--text-secondary);
  font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

.search-provider {
  display: flex; align-items: center; gap: 2px; flex-shrink: 0;
  background: rgba(120,120,128,0.16); border-radius: 16px; padding: 2px;
}

.provider-opt {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.4; transition: opacity 0.2s, background 0.2s, box-shadow 0.2s;
}

.provider-opt svg { width: 16px; height: 16px; display: block; }

.provider-opt.active {
  opacity: 1; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.search-results {
  margin-top: 10px; overflow: hidden;
  border-radius: var(--radius-md);
  animation: pop-in 0.35s var(--spring);
}
.search-result {
  display: flex; align-items: center; gap: 13px;
  width: 100%; padding: 13px 18px; text-align: left;
  transition: background 0.15s;
}
.search-result:hover, .search-result.selected { background: rgba(10,132,255,0.14); }
.search-result + .search-result { border-top: 1px solid rgba(120,120,128,0.14); }
.result-icon { font-size: 20px; flex-shrink: 0; }
.result-text { min-width: 0; }
.result-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-detail { font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ Floating buttons rechts ============ */
.fab-stack {
  position: absolute; right: 18px; top: max(18px, env(safe-area-inset-top)); z-index: 10;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.fab {
  width: 50px; height: 50px; border-radius: 25px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  transition: transform 0.25s var(--spring), background 0.2s;
}
.fab:hover { transform: scale(1.08); }
.fab:active { transform: scale(0.92); }
.fab svg { width: 22px; height: 22px; }
.fab.active { background: var(--accent); color: #fff; border-color: transparent; }
#compass-needle { transition: transform 0.2s linear; }

.fab-group {
  display: flex; flex-direction: column; border-radius: 25px; overflow: hidden;
}

/* ============ Quota-indicator ============ */
.fab-quota { position: relative; font-size: 11px; }
.quota-ring { position: absolute; inset: 0; width: 50px; height: 50px; transform: rotate(-90deg); }
.quota-ring-bg, .quota-ring-fg {
  fill: none; stroke-width: 3; cx: 18; cy: 18; r: 15;
}
.quota-ring-bg { stroke: rgba(120,120,128,0.22); }
.quota-ring-fg {
  stroke: #30d158; stroke-linecap: round;
  stroke-dasharray: 94.2; stroke-dashoffset: 94.2;
  transition: stroke-dashoffset 0.4s var(--spring), stroke 0.3s;
}
.fab-quota.q-warn .quota-ring-fg { stroke: #ff9f0a; }
.fab-quota.q-full .quota-ring-fg { stroke: #ff453a; }
.quota-pct { font-weight: 700; font-size: 10.5px; letter-spacing: -0.3px; }

.quota-panel {
  position: absolute; right: 18px; top: max(80px, env(safe-area-inset-top));
  width: min(300px, calc(100vw - 36px)); z-index: 20;
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 11px;
  animation: pop-in 0.3s var(--spring);
}

.nearby-panel {
  position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%);
  width: min(420px, calc(100vw - 36px)); z-index: 25;
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  animation: pop-in 0.3s var(--spring);
}

.nearby-filter {
  width: 100%; padding: 10px 14px; border-radius: 14px;
  border: none; outline: none; font-size: 14px;
  background: rgba(255,255,255,0.08); color: var(--text);
}
.nearby-filter::placeholder { color: var(--text-secondary); }
.nearby-panel .feature-row.toggles { flex-wrap: wrap; max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; }
.nearby-panel .feature-row.toggles .glass-chip.hidden { display: none; }

.nearby-search {
  padding: 10px 16px; border-radius: 14px; font-size: 14px; font-weight: 700;
  background: var(--accent); color: #fff; text-align: center;
  transition: transform 0.15s var(--spring);
}
.nearby-search:hover { transform: scale(1.03); }
.quota-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quota-title { font-size: 14px; font-weight: 700; }
.quota-bar-track {
  height: 8px; border-radius: 4px; background: rgba(120,120,128,0.2); overflow: hidden;
}
.quota-bar-fill {
  height: 100%; border-radius: 4px; background: #30d158;
  width: 0%; transition: width 0.4s var(--spring), background 0.3s;
}
.quota-panel.q-warn .quota-bar-fill { background: #ff9f0a; }
.quota-panel.q-full .quota-bar-fill { background: #ff453a; }
.quota-stats { font-size: 13px; font-weight: 600; }
.quota-stats span { color: var(--text-secondary); font-weight: 500; }
.quota-note { font-size: 11.5px; line-height: 1.4; color: var(--text-secondary); }
.fab-inner {
  width: 50px; height: 46px; font-size: 20px; font-weight: 500;
  transition: background 0.15s;
}
.fab-inner:hover { background: rgba(120,120,128,0.15); }
.fab-divider { height: 1px; background: rgba(120,120,128,0.22); margin: 0 12px; }

/* ============ Fietsroute-planner ============ */
.planner-panel {
  position: absolute; right: 80px; top: max(18px, env(safe-area-inset-top));
  width: min(330px, calc(100vw - 110px)); z-index: 15;
  border-radius: var(--radius-lg); padding: 18px;
  display: flex; flex-direction: column; gap: 13px;
  animation: pop-in 0.35s var(--spring);
}
.planner-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; font-weight: 700;
}
.planner-head button {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(120,120,128,0.2); color: var(--text-secondary); font-size: 12px;
}
.planner-section { display: flex; flex-direction: column; gap: 7px; }
.planner-loc { display: flex; gap: 8px; }
.planner-loc input {
  flex: 1; min-width: 0; padding: 10px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: rgba(120,120,128,0.12); color: var(--text);
  font-size: 14px; outline: none; font-family: inherit;
}
.planner-loc input:focus { border-color: var(--accent); }
.planner-loc button {
  width: 42px; border-radius: var(--radius-sm);
  background: rgba(120,120,128,0.16); font-size: 16px;
  transition: transform 0.2s var(--spring);
}
.planner-loc button:active { transform: scale(0.92); }
.planner-params { display: flex; gap: 10px; }
.planner-params > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.unit-input {
  display: flex; align-items: center; gap: 6px;
  background: rgba(120,120,128,0.16); border-radius: var(--radius-sm);
  padding: 9px 12px;
}
.unit-input input {
  width: 100%; border: none; background: none; outline: none;
  font-size: 15px; font-weight: 700; color: var(--text); font-family: inherit;
}
.unit-input span { font-size: 13px; color: var(--text-secondary); }
#planner-go:disabled { opacity: 0.65; cursor: wait; }

.planner-results { display: flex; flex-direction: column; gap: 6px; }
.planner-option {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: var(--radius-sm);
  background: rgba(120,120,128,0.14);
  font-size: 14px; font-weight: 600; text-align: left;
  transition: background 0.15s, transform 0.2s var(--spring);
}
.planner-option:hover { background: rgba(10,132,255,0.15); transform: scale(1.02); }
.planner-option .opt-dot {
  width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid rgba(255,255,255,0.9);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.planner-option .opt-sub { color: var(--text-secondary); font-weight: 500; margin-left: auto; font-size: 13px; }

/* ============ Showcase paneel linksonder ============ */
/* Standaard even groot als de andere fab-knoppen (50x50 bubbel met ✨-icoon);
   bij hover (of tik/klik op touch) klapt het open tot het volledige paneel. */
.features-panel {
  position: absolute; left: 18px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 10;
  width: 50px; max-height: 50px; max-width: 50px;
  border-radius: 25px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: max-width 0.4s var(--spring), max-height 0.4s var(--spring), border-radius 0.4s var(--spring);
}
.features-panel.expanded {
  width: min(340px, calc(100vw - 36px));
  max-width: min(340px, calc(100vw - 36px));
  max-height: min(80vh, 480px);
  border-radius: var(--radius-lg);
}
.features-icon {
  width: 50px; height: 50px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  cursor: pointer;
}
.features-panel.expanded .features-icon {
  display: none;
}
.features-header {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 15px 20px; flex-shrink: 0;
  white-space: nowrap;
}
.features-title { font-size: 15px; font-weight: 700; }
.chevron {
  font-size: 22px; color: var(--text-secondary);
  transform: rotate(-90deg); transition: transform 0.35s var(--spring);
}
.features-panel.expanded .chevron { transform: rotate(90deg); }
.features-body {
  padding: 2px 18px 16px;
  display: flex; flex-direction: column; gap: 13px;
  overflow-y: auto;
}

.feature-row { display: flex; flex-direction: column; gap: 7px; }
.feature-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; }

.segmented {
  display: flex; gap: 3px; padding: 3px;
  background: rgba(120,120,128,0.16); border-radius: var(--radius-sm);
}
.segmented button {
  flex: 1; padding: 7px 6px; border-radius: 11px;
  font-size: 12.5px; font-weight: 600;
  transition: background 0.25s, box-shadow 0.25s, transform 0.2s var(--spring);
}
.segmented button.active {
  background: var(--glass-bg-strong);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.5);
}
.segmented button:active { transform: scale(0.94); }

.feature-row.toggles { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.glass-chip {
  padding: 8px 14px; border-radius: 18px; font-size: 13px; font-weight: 600;
  background: rgba(120,120,128,0.16);
  border: 1px solid transparent;
  transition: all 0.25s var(--spring);
}
.glass-chip:hover { transform: scale(1.05); }
.glass-chip.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 14px rgba(10,132,255,0.4);
}
.hint { font-size: 12px; color: var(--text-secondary); line-height: 1.45; }

/* ============ Route paneel ============ */
.route-panel {
  position: absolute; right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 10;
  width: min(360px, calc(100vw - 36px));
  max-height: min(60vh, 540px);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  animation: slide-up 0.45s var(--spring);
}
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes pop-in { from { transform: scale(0.92); opacity: 0; } }

.route-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.profile-picker { flex: 1; max-width: 200px; }
.profile-picker button { font-size: 17px; padding: 6px; }
.route-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(120,120,128,0.2); color: var(--text-secondary);
  font-size: 13px;
}

.route-summary { display: flex; align-items: baseline; gap: 10px; }
.route-duration { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.route-distance { font-size: 16px; color: var(--text-secondary); font-weight: 600; }

.route-endpoints { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.endpoint {
  display: flex; align-items: center; gap: 9px; color: var(--text-secondary);
  padding: 5px 6px; border-radius: 9px; cursor: pointer;
  transition: background 0.15s;
}
.endpoint:hover { background: rgba(120,120,128,0.12); }
.endpoint .dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.endpoint .dot.a { background: var(--green); }
.endpoint .dot.b { background: var(--red); }
.endpoint .dot.via {
  width: 15px; height: 15px; background: var(--accent);
  color: #fff; font-size: 9px; font-weight: 800;
}
.ep-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-x {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  background: rgba(120,120,128,0.2); color: var(--text-secondary);
  font-size: 10px; line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.ep-x:hover { background: var(--red); color: #fff; }

.route-alts { display: flex; gap: 8px; }
.alt-chip {
  flex: 1; padding: 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600;
  background: rgba(120,120,128,0.14); text-align: center;
  transition: all 0.2s;
}
.alt-chip.active { background: rgba(10,132,255,0.18); color: var(--accent); }

.route-steps {
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column;
  border-top: 1px solid rgba(120,120,128,0.16);
  padding-top: 6px;
  scrollbar-width: thin;
}
.route-step {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 9px 4px; cursor: pointer; border-radius: 10px;
  transition: background 0.15s;
}
.route-step:hover { background: rgba(120,120,128,0.12); }
.step-icon { font-size: 18px; width: 26px; text-align: center; flex-shrink: 0; }
.step-text { font-size: 13.5px; line-height: 1.4; }
.step-dist { font-size: 12px; color: var(--text-secondary); }

/* ============ Markers & toast ============ */
.gm-marker {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  border: 3px solid rgba(255,255,255,0.95);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  cursor: grab;
  transition: transform 0.2s var(--spring);
}
.gm-marker:hover { transform: scale(1.15); }
.gm-marker.a { background: var(--green); }
.gm-marker.b { background: var(--red); }
.gm-marker.search { background: var(--accent); font-size: 15px; }
.gm-marker.via { width: 24px; height: 24px; font-size: 11px; background: var(--accent); border-width: 2.5px; }

/* ============ Contextmenu ============ */
.context-menu {
  position: absolute; z-index: 40;
  min-width: 225px; padding: 6px;
  border-radius: 18px;
  background: var(--glass-bg-strong);
  animation: pop-in 0.22s var(--spring);
}
.context-menu button {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 10px 12px; border-radius: 13px;
  font-size: 14px; font-weight: 600; text-align: left;
  transition: background 0.15s;
}
.context-menu button:hover { background: rgba(10,132,255,0.14); }
.ctx-coords {
  font-size: 11px; color: var(--text-secondary);
  padding: 7px 12px 4px; margin-top: 4px;
  border-top: 1px solid rgba(120,120,128,0.16);
  font-variant-numeric: tabular-nums;
}

/* Exportmenu hangt onder de exportknop in het routepaneel */
.export-menu {
  position: absolute; top: 56px; right: 14px;
  min-width: 250px; z-index: 5;
}
#route-export svg { width: 15px; height: 15px; }

/* Slepen om de volgorde van routepunten te wijzigen */
.ep-grip {
  color: var(--text-secondary); cursor: grab;
  font-size: 13px; flex-shrink: 0; padding: 0 2px;
  opacity: 0.55;
}
.endpoint.dragging { opacity: 0.35; }
.endpoint.drag-over {
  background: rgba(10,132,255,0.18);
  box-shadow: inset 0 2px 0 var(--accent);
}

.poi-marker {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; background: var(--glass-bg-strong);
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  cursor: pointer; transition: transform 0.2s var(--spring);
}
.poi-marker:hover { transform: scale(1.18); }

/* ---- Groot, gecentreerd POI-detailvenster ---- */
.poi-modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.32);
  backdrop-filter: blur(6px);
  animation: poi-fade 0.2s ease-out;
}
@keyframes poi-fade { from { opacity: 0; } to { opacity: 1; } }
.poi-modal {
  position: relative;
  width: 90vw; height: 90vh; max-width: 1000px;
  padding: 22px; border-radius: var(--radius-lg, 22px);
  overflow-y: auto; overscroll-behavior: contain;
  animation: poi-pop 0.32s var(--spring);
}
@keyframes poi-pop { from { opacity: 0; transform: scale(0.94) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.poi-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 15px; font-weight: 700;
  background: rgba(30,30,32,0.45); color: #fff;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.poi-modal-close:hover { background: rgba(255,69,58,0.65); color: #fff; }

/* ---- Foto-lightbox ---- */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 2100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.78);
  animation: poi-fade 0.15s ease-out;
}
.lightbox-img {
  max-width: 92vw; max-height: 88vh; object-fit: contain;
  border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: poi-pop 0.25s var(--spring);
}
.lightbox-close, .lightbox-nav {
  position: absolute; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,0.12); color: #fff;
  backdrop-filter: blur(10px); transition: background 0.15s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-close { top: 18px; right: 18px; width: 38px; height: 38px; font-size: 16px; font-weight: 700; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 26px; }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-counter {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  padding: 5px 14px; border-radius: 12px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,0.12); color: #fff; backdrop-filter: blur(10px);
}
@media (max-width: 640px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 22px; }
}
@media (max-width: 720px) {
  .poi-modal { width: 94vw; height: 92vh; padding: 16px; }
}

/* Op grotere schermen opent de "in de buurt"-lijst compact linksonder
   ipv als groot gecentreerd modaal venster. */
@media (min-width: 721px) {
  .nearby-overlay {
    background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
    align-items: flex-end; justify-content: flex-start;
    padding: 0 0 90px 18px; pointer-events: none;
  }
  .nearby-modal {
    pointer-events: auto;
    width: 380px; max-width: calc(100vw - 36px);
    height: min(560px, 70vh); max-height: 70vh;
    margin: 0; animation: pop-in 0.3s var(--spring);
  }
}

/* ---- "In de buurt" lijst bij kaartklik ---- */
.poi-nearby-list { display: flex; flex-direction: column; gap: 4px; height: 100%; }
.poi-nearby-list .poi-name { font-size: 17px; font-weight: 700; }
.poi-nearby-list .poi-detail { color: var(--text-secondary); font-size: 13px; margin-bottom: 6px; }
.poi-nearby-items {
  display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto; overscroll-behavior: contain; padding-right: 2px;
}
.poi-nearby-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left; padding: 10px 12px;
  border-radius: 14px; background: rgba(255,255,255,0.05);
  transition: background 0.15s;
}
.poi-nearby-item:hover, .poi-nearby-item:active { background: rgba(255,255,255,0.12); }
.poi-nearby-icon { font-size: 20px; flex: none; }
.poi-nearby-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.poi-nearby-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poi-nearby-sub { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poi-nearby-dist { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); flex: none; }
.poi-nearby-info-btn {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-style: italic; font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent, #0a84ff);
  background: rgba(10,132,255,0.12);
  transition: background 0.15s, transform 0.15s;
}
.poi-nearby-info-btn:hover { background: rgba(10,132,255,0.22); transform: scale(1.08); }
.poi-nearby-info-btn:active { transform: scale(0.94); }

.poi-popup { display: flex; flex-direction: column; gap: 8px; min-width: 160px; }
.poi-popup .poi-name { font-size: 14px; font-weight: 700; }
.poi-popup .poi-detail { font-size: 12px; color: var(--text-secondary); }
.poi-popup button {
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 600;
  transition: filter 0.2s;
}
.poi-popup button:hover { filter: brightness(1.1); }
.popup-actions { display: flex; flex-direction: column; gap: 6px; }
.popup-actions button { background: rgba(120,120,128,0.16); color: var(--text); text-align: left; }
.popup-actions button:hover { background: rgba(10,132,255,0.16); filter: none; }

.poi-meta {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px 0; margin: 2px 0;
  border-top: 1px solid rgba(120,120,128,0.18);
  border-bottom: 1px solid rgba(120,120,128,0.18);
}
.meta-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); min-width: 0; }
.meta-line .meta-ic { width: 16px; text-align: center; flex-shrink: 0; }
.meta-line span, .meta-line a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-line a { color: var(--accent); text-decoration: none; }
.meta-line a:hover { text-decoration: underline; }

.popup-links { display: flex; gap: 6px; }
.popup-link {
  flex: 1; text-align: center; text-decoration: none;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: rgba(120,120,128,0.16); color: var(--text);
  font-size: 12.5px; font-weight: 600;
  transition: background 0.15s;
}
.popup-link:hover { background: rgba(10,132,255,0.16); }

/* ---- Google Places verrijking in de infokaart ---- */
.poi-photos { display: flex; flex-direction: column; gap: 5px; margin: -2px 0 2px; }
.poi-hero {
  width: 100%; height: min(40vh, 360px); object-fit: cover;
  border-radius: var(--radius-sm); display: block; background: rgba(120,120,128,0.16);
  cursor: zoom-in; transition: opacity 0.15s;
}
.poi-hero:hover { opacity: 0.92; }
.poi-thumbs { display: flex; gap: 5px; }
.poi-thumbs img {
  width: 100%; height: 64px; flex: 1; object-fit: cover; border-radius: 8px;
  cursor: pointer; opacity: 0.8; transition: opacity 0.15s, transform 0.15s var(--spring);
}
.poi-thumbs img:hover { opacity: 1; transform: scale(1.05); }

.poi-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 13px; }
.stars { position: relative; display: inline-block; font-size: 14px; line-height: 1; white-space: nowrap; }
.stars-bg { color: rgba(120,120,128,0.4); }
.stars-fg { position: absolute; left: 0; top: 0; color: #ff9f0a; overflow: hidden; }
.stars.stars-sm { font-size: 11px; }
.rating-num { font-weight: 700; }
.rating-count { color: var(--text-secondary); font-size: 12px; }
.rating-price { color: var(--text-secondary); font-weight: 600; }
.open-badge { margin-left: auto; padding: 2px 9px; border-radius: 10px; font-size: 11.5px; font-weight: 700; }
.open-badge.open { background: rgba(48,209,88,0.2); color: #1a8a3a; }
.open-badge.closed { background: rgba(255,69,58,0.18); color: #c4392f; }
@media (prefers-color-scheme: dark) {
  .open-badge.open { color: #4ad36a; }
  .open-badge.closed { color: #ff6b61; }
}

.poi-summary { font-size: 12.5px; line-height: 1.45; color: var(--text-secondary); }

.poi-reviews {
  display: flex; flex-direction: column; gap: 9px;
  padding-top: 9px; border-top: 1px solid rgba(120,120,128,0.18);
}
.reviews-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-secondary); }
.review { display: flex; flex-direction: column; gap: 4px; }
.review-head { display: flex; align-items: center; gap: 8px; }
.review-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.review-who { min-width: 0; }
.review-author { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-meta { display: flex; align-items: center; gap: 6px; }
.review-time { font-size: 11px; color: var(--text-secondary); }
.review-text {
  font-size: 12px; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

.google-loading { font-size: 12px; color: var(--text-secondary); padding: 2px 0; }

.pulse-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgba(10,132,255,0.5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(10,132,255,0.45); }
  70% { box-shadow: 0 0 0 18px rgba(10,132,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(10,132,255,0); }
}

.toast {
  position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%);
  z-index: 50; padding: 12px 22px; border-radius: 22px;
  font-size: 14px; font-weight: 600;
  animation: pop-in 0.35s var(--spring);
  max-width: calc(100vw - 40px); text-align: center;
}

/* Mapbox attributie & popup in glass-stijl */
.mapboxgl-ctrl-attrib {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(12px);
  border-radius: 10px !important;
  font-size: 10px;
}
.mapboxgl-popup-content {
  background: var(--glass-bg-strong) !important;
  backdrop-filter: blur(24px) saturate(1.8);
  border-radius: 16px !important;
  box-shadow: var(--glass-shadow) !important;
  color: var(--text);
  font-family: inherit;
  padding: 12px 16px !important;
}
.mapboxgl-popup-tip { display: none; }

@media (max-width: 640px) {
  .search-wrap { width: calc(100vw - 90px); }
  .features-panel { width: calc(100vw - 36px); }
  .route-panel { max-height: 46vh; }
}
