/* The map and MapLibre's controls restyled to match. The places are drawn
   by map.js on the map's canvas. */

/* The map fills the stage, under the sheet. */
.map-wrap {
  position: absolute;
  inset: 0;
}

.map {
  height: 100%;
  overflow: hidden;
  background: var(--map-land);
}

.map__fallback {
  max-width: 36ch;
  margin: 0 auto;
  padding: 120px var(--gutter) 0;
  text-align: center;
  font-size: 18px;
}

/* Top left on phones; beside the docked sheet on wider screens. */
.map__badge {
  position: absolute;
  top: 14px;
  left: max(14px, env(safe-area-inset-left));
  z-index: 2;
  pointer-events: none;
}

@media (min-width: 641px) {
  .map__badge {
    left: calc(var(--sheet-w) + 32px);
  }
}

.map__badge .sample-badge {
  background: var(--card);
}

/* ---------- MapLibre controls ---------- */

.maplibregl-ctrl-group {
  border: var(--border);
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--ink);
  overflow: hidden;
}

.maplibregl-ctrl-group button {
  width: var(--touch);
  height: var(--touch);
}

.maplibregl-ctrl-attrib {
  font-family: var(--font-ui);
}

/* The compact attribution's (i) toggle is drawn at 24px; give it a 44px
   tap area. */
.maplibregl-ctrl-attrib-button::after {
  content: "";
  position: absolute;
  inset: -10px;
}

/* Keep the controls clear of the notch in landscape. */
.maplibregl-ctrl-top-right {
  right: env(safe-area-inset-right, 0);
}

/* The cooperative-gestures hint ("Use Ctrl + scroll to zoom"). */
.maplibregl-cooperative-gesture-screen {
  font-family: var(--font-ui);
  font-weight: 600;
}
