/* Speeltuinen Amsterdam-Noord */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('../fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('../fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0;
}

:root {
  --blauw: #1a73e8;
  --groen: #16a34a;
  --tekst: #1f2937;
  --tekst-licht: #6b7280;
  --vlak: #ffffff;
  --rand: #e5e7eb;
  --schaduw: 0 2px 10px rgba(15, 23, 42, 0.18);
  --radius: 16px;
  --ster: #f59e0b;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--tekst);
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input { font-family: inherit; }

#map { position: fixed; inset: 0; z-index: 1; background: #e8ecef; }

/* ---------- bovenbalk ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 400;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 0;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.searchbar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 560px;
  margin: 0 auto;
  background: var(--vlak);
  border-radius: 28px;
  box-shadow: var(--schaduw);
  padding: 6px 8px 6px 16px;
}
.searchbar-icon { display: flex; color: var(--tekst-licht); flex: none; }
.searchbar input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  background: transparent;
  padding: 8px 0;
}
.searchbar input::placeholder { color: #9ca3af; font-weight: 600; }
.searchbar input::-webkit-search-cancel-button { display: none; }

.iconbtn {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--tekst-licht);
}
.iconbtn:active { background: #f3f4f6; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 2px 12px;
  max-width: 560px;
  margin: 0 auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--vlak);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.15);
  color: var(--tekst);
  white-space: nowrap;
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.chip.actief { background: #1f2937; color: #fff; }

/* ---------- markers ---------- */
.pin { filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.4)); transition: transform 0.15s; transform-origin: bottom center; }
.marker-geselecteerd .pin { transform: scale(1.25); }
.leaflet-tooltip.speeltip {
  border-radius: 10px;
  border: none;
  box-shadow: var(--schaduw);
  font-family: 'Nunito', sans-serif;
  padding: 8px 12px;
}
.speeltip .tip-naam { font-weight: 800; font-size: 14px; }
.speeltip .tip-meta { font-size: 12px; color: var(--tekst-licht); font-weight: 600; }
.speeltip .tip-ster { color: var(--ster); font-weight: 800; }

.mijn-locatie-dot {
  width: 18px; height: 18px;
  background: var(--blauw);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.35), 0 2px 6px rgba(0,0,0,0.3);
}

/* ---------- zwevende knoppen ---------- */
.fabs {
  position: fixed;
  right: 12px;
  bottom: calc(24px + var(--safe-b));
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--vlak);
  box-shadow: var(--schaduw);
  display: flex; align-items: center; justify-content: center;
  color: var(--tekst);
}
.fab:active { transform: scale(0.94); }
.fab-primary { background: var(--blauw); color: #fff; }

/* ---------- sheets (onderkant mobiel) ---------- */
.sheet {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 500;
  background: var(--vlak);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.25);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), height 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  height: 52dvh;
  display: flex;
  flex-direction: column;
  touch-action: none;
}
.sheet.open { transform: translateY(0); }
.sheet.vol { height: 88dvh; }
.sheet-handle {
  flex: none;
  padding: 10px 0 4px;
  display: flex;
  justify-content: center;
  cursor: grab;
}
.sheet-handle span { width: 42px; height: 5px; border-radius: 3px; background: #d1d5db; }
.sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 12px 8px 20px;
}
.sheet-head h2 { font-size: 18px; font-weight: 800; }
.sheet-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px calc(20px + var(--safe-b));
  touch-action: pan-y;
}

/* ---------- lijst ---------- */
.lijst-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 12px 6px;
  border-bottom: 1px solid var(--rand);
}
.lijst-item:active { background: #f9fafb; }
.lijst-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.lijst-tekst { flex: 1 1 auto; min-width: 0; }
.lijst-naam { font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lijst-meta { font-size: 13px; color: var(--tekst-licht); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lijst-meta .tip-ster { color: var(--ster); }
.lijst-afstand { flex: none; font-size: 13px; font-weight: 800; color: var(--blauw); }
.lijst-leeg { padding: 24px 8px; color: var(--tekst-licht); font-weight: 600; text-align: center; }

/* ---------- detail ---------- */
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.detail-top > div { min-width: 0; }
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  border-radius: 14px;
  padding: 5px 12px;
  margin-bottom: 8px;
}
.detail-naam { font-size: 22px; font-weight: 900; line-height: 1.2; overflow-wrap: break-word; }
.detail-adres { color: var(--tekst-licht); font-weight: 600; font-size: 14px; margin-top: 4px; }
.detail-afstand { color: var(--blauw); font-weight: 800; }

.sterren-blok { margin-top: 14px; padding: 14px; background: #f9fafb; border-radius: var(--radius); }
.sterren-regel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sterren { display: inline-flex; gap: 2px; }
.sterren svg { width: 26px; height: 26px; }
.sterren-cijfer { font-size: 20px; font-weight: 900; }
.sterren-aantal { font-size: 13px; color: var(--tekst-licht); font-weight: 600; }
.jouw-sterren { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rand); }
.jouw-sterren p { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.jouw-sterren .sterren button { padding: 2px; border-radius: 6px; }
.jouw-sterren .sterren svg { width: 34px; height: 34px; }
.jouw-sterren .sterren button:active { transform: scale(1.15); }

.rolstoel-blok { margin-top: 12px; padding: 14px; background: #eff6ff; border-radius: var(--radius); }
.rolstoel-kop { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14.5px; }
.rolstoel-kop svg { flex: none; color: var(--blauw); }
.dots { display: inline-flex; gap: 4px; align-items: center; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #cbd5e1; display: inline-block; }
.dots i.on { background: var(--blauw); }
.rolstoel-tekst { font-size: 13.5px; font-weight: 600; color: #374151; margin-top: 6px; }
.rolstoel-knoppen { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rolstoel-knoppen button {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}
.rolstoel-knoppen button:active { background: #dbeafe; }

.info-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.info-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 700;
  max-width: 100%;
}
.info-chip svg { flex: none; color: var(--tekst-licht); }

.detail-sectie { margin-top: 16px; }
.detail-sectie h3 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.fac-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fac-chip {
  background: #ecfdf5;
  color: #065f46;
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 13.5px;
  font-weight: 700;
}

.detail-knoppen {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.knop {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 26px;
  padding: 14px 10px;
  font-size: 15.5px;
  font-weight: 800;
}
.knop:active { transform: scale(0.97); }
.knop-primair { background: var(--groen); color: #fff; box-shadow: 0 3px 10px rgba(22, 163, 74, 0.35); }
.knop-secundair { background: #eef2ff; color: #3730a3; }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  background: var(--vlak);
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  max-height: min(86dvh, 700px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.4);
}
.modal-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px 8px 22px;
}
.modal-head h2 { font-size: 20px; font-weight: 900; }
.modal-body { overflow-y: auto; padding: 0 22px 24px; }
.modal-body p, .modal-body ul { font-size: 14.5px; font-weight: 600; color: #374151; margin-bottom: 10px; line-height: 1.5; }
.modal-body h3 { font-size: 15.5px; font-weight: 800; margin: 14px 0 6px; color: var(--tekst); }
.dots-uitleg { list-style: none; }
.dots-uitleg li { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.qr { width: 170px; height: 170px; border-radius: 12px; border: 1px solid var(--rand); display: block; margin: 4px auto 10px; }
.kleine-tekst { font-size: 12.5px; color: var(--tekst-licht); }
.modal-body a { color: var(--blauw); font-weight: 700; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 800;
  background: #1f2937;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 24px;
  box-shadow: var(--schaduw);
  max-width: calc(100vw - 32px);
  text-align: center;
  transition: opacity 0.25s;
}

.hidden { display: none !important; }

/* Leaflet attributie iets subtieler */
.leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.75) !important;
}

/* ---------- desktop ---------- */
@media (min-width: 768px) {
  .topbar { padding-top: 16px; }
  .searchbar { margin: 0 0 0 16px; max-width: 420px; }
  .chips { margin: 0 0 0 16px; max-width: 420px; }

  .sheet {
    left: 16px;
    right: auto;
    top: 128px;
    bottom: 16px;
    width: 400px;
    height: auto !important;
    border-radius: 20px;
    transform: translateX(-120%);
    transition: transform 0.25s ease;
  }
  .sheet.open { transform: translateX(0); }
  .sheet-handle { display: none; }
  .sheet-body { padding-top: 14px; }
  #detailSheet .sheet-body { padding-top: 20px; }

  .fabs { right: 16px; bottom: 24px; }
}
