/* LBK News Map — front end styles. House fonts: Lora (titles), Inter (UI). Brand indigo #192680. */

.lbkmap {
  --lbkmap-h: 75vh;
  --ink: #192680;
  --text: #1c2b33;
  --muted: #566169;
  --paper: #ffffff;
  --line: rgba(28, 43, 51, .14);
  --sales: #E8590C;
  --police: #1F4E79;
  --news: #E63946;
  position: relative;
  width: 100%;
  height: var(--lbkmap-h);
  min-height: 420px;
  overflow: hidden;
  border-radius: 8px;
  background: #e9eef1;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  box-sizing: border-box;
}
.lbkmap *, .lbkmap *::before, .lbkmap *::after { box-sizing: inherit; }

.lbkmap-canvas { position: absolute; inset: 0; }

.lbkmap-status {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 14px; color: var(--muted); background: rgba(255,255,255,.9);
  padding: 8px 12px; border-radius: 6px; z-index: 5; pointer-events: none;
}

/* ---- markers ---- */
.lbkmap-pin { width: 56px; height: 60px; transform: translateY(6px); cursor: pointer;
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff) drop-shadow(0 3px 4px rgba(0,0,0,.5)); transition: transform .12s ease; }
.lbkmap-pin:hover { transform: translateY(6px) scale(1.1); }
.lbkmap-pin svg { display: block; width: 100%; height: 100%; }
.lbkmap-cluster { width: 62px; height: 62px; cursor: pointer; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff) drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.lbkmap-cluster svg { display: block; width: 100%; height: 100%; }

/* ---- controls ---- */
.lbkmap-controls {
  position: absolute; left: 12px; top: 12px; z-index: 6;
  display: flex; flex-direction: column; gap: 8px; width: 300px; max-width: calc(100% - 80px);
}
.lbkmap-panel {
  background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.18); backdrop-filter: blur(6px);
}
.lbkmap-search { padding: 0; }
.lbkmap-search input[type="search"] {
  width: 100%; border: 0; background: transparent; padding: 10px 12px; font: inherit; font-size: 13.5px;
  color: var(--text); outline: none; border-radius: 8px; -webkit-appearance: none; appearance: none; margin: 0;
}
.lbkmap-search input::placeholder { color: var(--muted); }
.lbkmap-search input:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }

.lbkmap-basemap { display: flex; gap: 4px; }
.lbkmap-basemap button {
  flex: 1; font: inherit; font-size: 12.5px; font-weight: 500; padding: 7px 8px; border-radius: 6px;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; margin: 0;
}
.lbkmap-basemap button.is-active { background: var(--ink); color: #fff; }
.lbkmap-basemap button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.lbkmap-layers { display: flex; flex-direction: column; gap: 2px; }
.lbkmap-layers label {
  display: flex; align-items: center; gap: 10px; font-size: 15px; padding: 5px 6px; border-radius: 6px;
  cursor: pointer; margin: 0; font-weight: 700; color: var(--ink); letter-spacing: .01em;
}
.lbkmap-layers label:hover { background: rgba(0,0,0,.04); }
.lbkmap-layers input[type="checkbox"] { accent-color: var(--ink); width: 15px; height: 15px; margin: 0; }
.lbkmap-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.lbkmap-legend-icon { width: 36px; height: 36px; flex: 0 0 auto; display: inline-flex; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.lbkmap-legend-icon svg { width: 36px; height: 36px; display: block; }
.lbkmap-layer-name { flex: 1; }
.lbkmap-count { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- popup sheet ---- */
.lbkmap-backdrop {
  position: absolute; inset: 0; background: rgba(15,20,22,.28); opacity: 0; pointer-events: none;
  transition: opacity .18s ease; z-index: 7;
}
.lbkmap-backdrop.is-open { opacity: 1; pointer-events: auto; }

.lbkmap-sheet {
  position: absolute; left: 12px; bottom: 12px; width: 380px; max-width: calc(100% - 24px); max-height: calc(100% - 24px);
  overflow-y: auto; z-index: 8;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.28); padding: 0 18px 18px;
  transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .2s ease, opacity .2s ease;
}
.lbkmap-sheet.is-open { transform: none; opacity: 1; pointer-events: auto; }

.lbkmap-close {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.25); padding: 0; margin: 0;
}
.lbkmap-close:focus-visible { outline: 2px solid var(--ink); }

.lbkmap-photo { position: relative; margin: 0 -18px 12px; aspect-ratio: 16 / 9; background: #dfe5e8; overflow: hidden; border-radius: 12px 12px 0 0; }
.lbkmap-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lbkmap-photo-note {
  position: absolute; left: 10px; bottom: 8px; font-size: 10.5px; padding: 3px 7px; border-radius: 4px;
  background: rgba(0,0,0,.55); color: #fff;
}

.lbkmap-kicker { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-top: 14px; }
.lbkmap-sheet .lbkmap-title {
  font-family: 'Lora', Georgia, 'Times New Roman', serif; font-size: 19px; font-weight: 600; line-height: 1.25;
  margin: 4px 0 8px; padding-right: 28px; color: var(--text);
}
.lbkmap-address { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.lbkmap-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 0 0 8px; }
.lbkmap-table td { padding: 6px 0; border-top: 1px solid var(--line); vertical-align: top; }
.lbkmap-table td.k { color: var(--muted); width: 38%; padding-right: 10px; }

.lbkmap-summary { font-size: 13.5px; line-height: 1.5; margin: 8px 0 12px; border-top: 1px solid var(--line); padding-top: 8px; }

.lbkmap-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.lbkmap-list { list-style: none; margin: 4px 0 0; padding: 0; }
.lbkmap-list li { border-top: 1px solid var(--line); }
.lbkmap-list button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0;
  padding: 10px 4px; cursor: pointer; font: inherit; color: var(--text);
}
.lbkmap-list button:hover { background: rgba(0,0,0,.04); }
.lbkmap-list button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.lbkmap-list-icon { flex: 0 0 auto; display: inline-flex; }
.lbkmap-list-text { display: flex; flex-direction: column; gap: 2px; }
.lbkmap-list-text strong { font-family: 'Lora', Georgia, serif; font-weight: 600; font-size: 15px; line-height: 1.3; }
.lbkmap-list-text small { font-size: 12px; color: var(--muted); }
.lbkmap-btn {
  display: inline-block; font-size: 13px; font-weight: 500; padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--text); text-decoration: none; background: #fff;
}
.lbkmap-btn:hover { background: #f4f6f8; text-decoration: none; }
.lbkmap-btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.lbkmap-btn-primary:hover { background: #121c66; color: #fff; }
.lbkmap-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---- mobile ---- */
@media (max-width: 719px) {
  .lbkmap { border-radius: 0; }
  .lbkmap-controls { top: auto; bottom: 12px; width: 230px; }
  .lbkmap-search input[type="search"] { font-size: 16px; padding: 9px 10px; } /* 16px prevents iOS zoom */
  .lbkmap-sheet {
    left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 68%;
    border-radius: 14px 14px 0 0; transform: translateY(102%); opacity: 1;
  }
  .lbkmap-sheet.is-open { transform: none; }
  .lbkmap-photo { border-radius: 14px 14px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .lbkmap-sheet, .lbkmap-backdrop, .lbkmap-pin { transition: none; }
}
