/* ============================================================================
   MAP — Leaflet container + themed popup detail cards.
   The only file that styles third-party (.leaflet-*) selectors, so a future
   MapLibre swap replaces this file alongside js/modules/map-view.js.
   ========================================================================== */

/* Clip map chrome so Leaflet panes cannot steal clicks from lists below.
   Popups stay readable via Leaflet autoPan (map pans to fit the card). */
.map-shell {
  border: 1px solid var(--navy-700);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  background: var(--navy-900);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
#map {
  height: min(62vh, 560px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-900);
}
#map .leaflet-pane,
#map .leaflet-popup-pane,
#map .leaflet-tooltip-pane {
  z-index: 700;
}

.home-pin {
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
}

/* --- Popup detail card -------------------------------------------------------- */

.kiezly-popup .leaflet-popup-content-wrapper {
  background: var(--navy-800);
  color: var(--ink-100);
  border: 1px solid var(--navy-700);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font-family: var(--font-body);
}
.kiezly-popup .leaflet-popup-tip {
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
}
.kiezly-popup .leaflet-popup-content {
  margin: 12px 14px;
}

.popup-head {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}
.popup-cat {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cat, var(--gold-500));
  font-weight: 700;
}
.popup-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
}
.popup-dist {
  color: var(--ink-500);
  font-size: 0.78rem;
}

.popup-rows {
  border-top: 1px dashed var(--navy-700);
  padding-top: 6px;
}
.popup-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  padding: 2px 0;
}
.popup-row span:first-child {
  color: var(--ink-500);
}
.popup-row a {
  color: var(--gold-300);
}

.popup-conf {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--ink-500);
  border-top: 1px dashed var(--navy-700);
  padding-top: 6px;
}
.popup-conf strong {
  color: var(--gold-500);
}
.popup-empty {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-500);
}

.kiezly-tooltip {
  background: var(--navy-800) !important;
  color: var(--ink-100) !important;
  border: 1px solid var(--navy-700) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-card) !important;
  font-family: var(--font-body) !important;
  font-size: 0.78rem !important;
  padding: 4px 8px !important;
}
.kiezly-tooltip::before {
  border-top-color: var(--navy-700) !important;
}

/* Dim Leaflet attribution to match theme (keep it legible & present) */
.leaflet-container .leaflet-control-attribution {
  background: rgba(13, 21, 38, 0.8);
  color: var(--ink-500);
}
.leaflet-container .leaflet-control-attribution a {
  color: var(--ink-300);
}
[data-theme='light'] .leaflet-container .leaflet-control-attribution {
  background: rgba(247, 249, 252, 0.9);
}
