/* Left directory and right detail sit above the original full-bleed Leaflet map. */
body.map-kiosk {
  --map-panel:#201c28;
  --map-control:#322940;
  --map-edge:#766786;
  --map-text:#fff4ff;
  --map-link:#c8e7ff;
  --map-focus:#ffdc76;
  --map-base:#4d435a;
  --map-panel-top:calc(var(--kiosk-top) + var(--kiosk-header-h,80px) + 15px);
  --map-panel-height:max(120px,calc(100dvh - var(--map-panel-top) - 40px));
}
html[data-ukfb-theme="light"] body.map-kiosk {
  --map-panel:#f8f1fb;
  --map-control:#eee4f3;
  --map-edge:#796785;
  --map-text:#2d2038;
  --map-link:#284f72;
  --map-focus:#563485;
  --map-base:#d9d0e4;
}
.map-kiosk #map-canvas { background:var(--map-base); }
.map-kiosk :is(.kiosk-hud,.map-detail) {
  top:var(--map-panel-top); width:clamp(245px,23vw,355px);
  max-height:var(--map-panel-height); padding:14px 16px;
  color:var(--map-text); background:var(--map-panel);
  border:1px solid var(--map-edge); border-radius:2px; box-shadow:0 5px 16px #140e2447;
  scrollbar-color:var(--map-edge) var(--map-panel); overscroll-behavior:contain;
}
.map-kiosk .map-detail {
  position:absolute; z-index:1000; right:max(14px,env(safe-area-inset-right)); overflow:auto;
}
.map-kiosk .map-panel-heading {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  margin-block-end:.35rem;
}
.map-kiosk #spot-list { border-color:var(--map-edge); }
.map-kiosk .map-panel-heading :is(h2,p) { font:700 .93rem/1.3 system-ui; margin:0; }
.map-kiosk .map-detail h2 {
  font-size:clamp(1.2rem,2vw,1.65rem); line-height:1.18; margin:.3rem 0 .65rem;
}
.map-kiosk .map-detail :is(.spot-place,.spot-note,.spot-links) { margin-block:.55rem; }
.map-kiosk :is(#spot-list,.map-detail,#spot-feedback) a:not(.kiosk-suggest) { color:var(--map-link); }
.map-kiosk :is(.kiosk-actions button,.map-panel-heading button,#map-detail-feedback,#spot-filters input,#spot-filters select,.spot-view,.ukfb-area-buttons button) {
  min-height:44px; color:var(--map-text); border:1px solid var(--map-edge);
  border-radius:2px; background:var(--map-control); font-family:system-ui;
}
.map-kiosk :is(.map-panel-heading button,#map-detail-feedback) {
  padding:.35rem .65rem; font-size:.8rem; font-weight:700; cursor:pointer;
}
.map-kiosk #map-detail-feedback { margin-top:.5rem; }
.map-kiosk .spot-entry { background:transparent; border-color:var(--map-edge); }
.map-kiosk .spot-entry[data-selected] { box-shadow:inset 3px 0 var(--map-focus); }
.map-kiosk :is(#spot-list,.map-detail,.kiosk-actions,#spot-feedback) :focus-visible,
.map-kiosk #spot-detail-title:focus {
  outline:3px solid var(--map-focus); outline-offset:2px;
}
.map-kiosk .spot-marker[aria-current="true"] { outline:3px solid #482762; outline-offset:2px; }
.map-kiosk #map-canvas .leaflet-bottom.leaflet-right { bottom:.6rem; }
.map-kiosk #map-canvas .leaflet-control-zoom a { width:44px; height:44px; line-height:44px; }
.map-kiosk #spot-feedback,
.map-kiosk #spot-feedback :is(select,textarea,button) {
  color:var(--map-text); background:var(--map-panel); border-color:var(--map-edge);
}
@media (max-width:860px), (max-height:560px) {
  .map-kiosk .kiosk-hud {
    width:max-content; max-width:calc(100vw - 85px); max-height:none;
    overflow:visible; padding:7px 9px; z-index:1001;
  }
  .map-kiosk .kiosk-hud h1 { margin-bottom:5px; }
  .map-kiosk #map-status { max-width:16ch; }
  .map-kiosk :is(#spot-list,.map-detail) {
    position:fixed; inset:auto max(10px,env(safe-area-inset-right)) max(13px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
    width:auto; max-height:min(47dvh,440px); padding:12px;
    overflow:auto; margin:0; border:1px solid var(--map-edge); border-radius:2px;
    color:var(--map-text); background:var(--map-panel); box-shadow:0 -3px 18px #140e2466;
    overscroll-behavior:contain;
  }
  .map-kiosk .map-detail { z-index:1002; }
  .map-kiosk #map-canvas .leaflet-top.leaflet-right { top:var(--map-panel-top); }
  .map-kiosk #map-canvas .leaflet-control-attribution { font-size:.63rem; }
}
@media (min-width:861px) and (min-height:561px) {
  .map-kiosk #map-canvas .leaflet-top.leaflet-right {
    top:auto; bottom:29px; right:max(8px,env(safe-area-inset-right));
  }
}
