/* blowkaart.css — denhaig.nl */

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

body {
  font-family: 'Georgia', serif;
  background: #1a1a1a;
  color: #f0ead6;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
}

@media (max-width: 400px) {
  #header h1   { font-size: 0.85rem; }
  #header p    { display: none; }
  #player      { padding: 5px 10px; gap: 8px; }
  .track-btn   { padding: 4px 8px; font-size: 0.75rem; }
  #progress-wrap { min-width: 60px; }
  #btn-safe    { font-size: 0.9rem; min-height: 38px; padding: 8px 10px; }
  #legend      { padding: 5px 10px; gap: 10px; font-size: 0.68rem; }
  #footer      { padding: 3px 0 1px; font-size: 9px; }
}

/* ============================================================
   HEADER
   ============================================================ */
#header {
  padding: 12px 20px 10px;
  background: #111;
  border-bottom: 2px solid #c0392b;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
#header-text { flex: 1; min-width: 200px; }
#header h1   { font-size: 1.15rem; letter-spacing: 0.08em; text-transform: uppercase; }
#header p    { font-size: 0.72rem; color: #888; margin-top: 2px; }

/* Taalknopjes */
#lang-btns { display: flex; gap: 6px; flex-shrink: 0; }
.lang-btn {
  background: none;
  border: 1px solid #444;
  border-radius: 3px;
  padding: 3px 6px;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s, border-color 0.15s;
  line-height: 1;
}
.lang-btn:hover  { opacity: 0.75; }
.lang-btn.active { opacity: 1; border-color: #c0392b; }

/* ============================================================
   AUDIOSPELER
   ============================================================ */
#player {
  background: #0e1e0e;
  border-bottom: 1px solid #2d5a2d;
  padding: 8px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.track-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1c2e1c;
  border: 1px solid #2d5a2d;
  border-radius: 4px;
  padding: 6px 14px;
  color: #88bb88;
  font-family: 'Georgia', serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.track-btn:hover  { background: #243d24; border-color: #4caf50; color: #f0ead6; }
.track-btn.playing {
  background: #2d5a2d;
  border-color: #4caf50;
  color: #f0ead6;
}

.play-icon { font-size: 0.9rem; }

#progress-wrap {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 8px;
}
#progress {
  flex: 1;
  height: 4px;
  background: #2d5a2d;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
#progress-fill {
  height: 100%;
  background: #4caf50;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s linear;
  pointer-events: none;
}
#time-display {
  font-size: 0.72rem;
  color: #666;
  min-width: 70px;
  text-align: right;
}

/* ============================================================
   KAART
   ============================================================ */
#map-container {
  flex: 1;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  cursor: grab;
}
#map-container:active { cursor: grabbing; }

#map-wrap {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transform-origin: 0 0;
}

svg { width: 100%; height: 100%; display: block; }

.zone-vrij         { fill: #1c2e1c; stroke: #2d5a2d; stroke-width: 0.6; transition: fill 0.1s; }
.zone-vrij:hover   { fill: #243d24; }
.zone-verbod       { fill: rgba(192,57,43,0.5); stroke: #e74c3c; stroke-width: 1.2; transition: fill 0.1s; }
.zone-verbod:hover { fill: rgba(220,70,50,0.65); }

/* ============================================================
   ZOOM KNOPPEN
   ============================================================ */
#zoom-btns {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#zoom-btns button {
  width: 30px; height: 30px;
  background: #111;
  border: 1px solid #444;
  color: #ccc;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 3px;
}
#zoom-btns button:hover { background: #222; }

/* Locatieknop */
#btn-safe {
  display: block;
  width: 100%;
  min-height: 48px;
  background: #1a4a1a;
  border: none;
  outline: none;
  border-bottom: 3px solid #4caf50;
  border-top: 1px solid #2d5a2d;
  color: #7ddf7d;
  font-family: 'Georgia', serif;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  padding: 12px 20px;
  cursor: pointer;
  text-align: center;
  flex-shrink: 0;
  -webkit-appearance: none;
  transition: background 0.15s, color 0.15s;
}
#btn-safe:hover  { background: #1f5a1f; color: #9eff9e; }
#btn-safe:active { background: #2d6e2d; }
#btn-safe.denied { background: #3a1010; color: #e74c3c; border-bottom-color: #c0392b; }
#btn-safe:disabled  { opacity: 0.45; cursor: default; color: #4caf50; }

#btn-shops {
  display: block;
  width: 100%;
  min-height: 42px;
  background: #1a1a2e;
  border: none;
  outline: none;
  border-bottom: 3px solid #3a7bd5;
  border-top: 1px solid #2a3a5a;
  color: #7ab3f5;
  font-family: 'Georgia', serif;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  cursor: pointer;
  text-align: center;
  flex-shrink: 0;
  -webkit-appearance: none;
  transition: background 0.15s, color 0.15s;
}
#btn-shops:hover   { background: #1f2a3f; color: #aad0ff; }
#btn-shops:active  { background: #253550; }
#btn-shops.busy    { opacity: 0.7; cursor: wait; }
#btn-shops:disabled { opacity: 0.35; cursor: default; color: #3a7bd5; }

.shop-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #222;
  font-size: 0.95rem;
}
.shop-item:last-child { border-bottom: none; }
.shop-name  { color: #aad0ff; flex: 1; text-decoration: underline; text-underline-offset: 3px; }
.shop-name:hover { color: #cce4ff; }
.shop-dist  { color: #666; font-size: 0.8rem; white-space: nowrap; }
.shop-addr  { color: #888; font-size: 0.8rem; width: 100%; margin-top: 1px; }

.shop-header {
  font-size: 0.72rem;
  color: #3a7bd5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 14px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #2a3a5a;
}
.shop-header:first-child { margin-top: 6px; }

.panel-shop-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: #1a1a2e;
  border: 1px solid #3a7bd5;
  border-radius: 6px;
  color: #7ab3f5;
  font-family: 'Georgia', serif;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.panel-shop-btn:hover    { background: #1f2a3f; }
.panel-shop-btn:disabled { opacity: 0.5; cursor: wait; }

/* Shop-regel in wijk-paneel */
.panel-shop-line {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #2a3a5a;
  color: #7ab3f5;
  font-size: 0.95rem;
  cursor: default;
}
.panel-shop-line.loading {
  opacity: 0.5;
  font-style: italic;
}
.panel-shop-line.clickable {
  cursor: pointer;
  opacity: 1;
}
.panel-shop-line.clickable:hover { color: #aad0ff; }

/* Scheiding tussen shops in lijst */
.shop-sep {
  height: 8px;
}

/* ============================================================
   INFO PANEEL — schuift omhoog bij klik/tap op wijk
   ============================================================ */
#info-panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 20;
  background: #111;
  border-top: 3px solid #555;
  border-radius: 16px 16px 0 0;
  padding: 0 24px 24px;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#info-panel.open { transform: translateY(0); }
#info-panel.verbod { border-color: #c0392b; }
#info-panel.vrij   { border-color: #2d5a2d; }
#info-panel.warn   { border-color: #e67e22; }

/* Drag handle */
#panel-lines {
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
}

#panel-handle {
  touch-action: none;
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
  cursor: pointer;
  touch-action: none;
}
#panel-handle::before {
  content: '';
  width: 40px; height: 4px;
  background: #444;
  border-radius: 2px;
  display: block;
}

#panel-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
  padding-top: 4px;
}
#info-panel.verbod #panel-title { color: #e74c3c; }
#info-panel.vrij   #panel-title { color: #4caf50; }
#info-panel.warn   #panel-title { color: #e67e22; }

.panel-line           { color: #ccc; font-size: 1.05rem; margin-top: 8px; line-height: 1.5; }
.panel-line.alert     { color: #e67e22; }
.panel-line.forbidden { color: #e74c3c; }

/* Overlay om buiten-klik te vangen */
#panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0,0,0,0.4);
}
#panel-overlay.open { display: block; }

/* ============================================================
   LEGENDA
   ============================================================ */
#legend {
  padding: 9px 20px;
  background: #111;
  border-top: 1px solid #333;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #aaa;
  flex-shrink: 0;
}
.li { display: flex; align-items: center; gap: 7px; }
.lb { width: 14px; height: 14px; border-radius: 2px; }
.lr { background: rgba(192,57,43,0.5); border: 2px solid #e74c3c; }
.lg { background: #1c2e1c; border: 2px solid #2d5a2d; }
#status { margin-left: auto; color: #444; font-size: 0.68rem; }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  text-align: center;
  font-size: 11px;
  color: #fff;
  padding: 6px 0 2px 0;
  opacity: 0.8;
  background: #111;
  flex-shrink: 0;
}
