:root {
  /* Light cartographic theme — matches the OpenMapTiles light pmtilesStyle. */
  --bg: #f4f1ea;
  --land: #f4f1ea;
  --water: #aac8df;
  --kas: #e23b3b;
  --priedanga: #2c6cb0;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-border: rgba(0, 0, 0, 0.08);
  --text: #1c1f24;
  --text-muted: #5a6470;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#map {
  position: absolute;
  inset: 0;
}

/* Shared base for both legend panels (top-left status + bottom-left key). */
.legend,
.legend-key {
  position: absolute;
  z-index: 2;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.legend {
  top: 12px;
  left: 12px;
  max-width: 280px;
}

.legend strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.legend-sample {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--panel-border);
  color: #a06700;
  font-size: 12px;
}

/* Bottom-left key with one row per shelter type. */
.legend-key {
  bottom: 28px; /* clear of MapLibre attribution strip */
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  opacity: 0.85;
  flex: 0 0 auto;
}

.legend-dot-kas {
  background: var(--kas);
}

.legend-dot-priedanga {
  background: var(--priedanga);
}

/* NATO aircraft legend row uses a unicode plane glyph instead of a dot. */
.legend-plane {
  width: 14px;
  display: inline-block;
  text-align: center;
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}

/* Popup styling for shelter points — light card to match the map. */
.maplibregl-popup-content {
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.maplibregl-popup-content h4 {
  margin: 0 0 2px;
  font-size: 14px;
}

.maplibregl-popup-content .type-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.maplibregl-popup-content .meta {
  color: var(--text-muted);
}

.maplibregl-popup-tip {
  border-top-color: var(--panel) !important;
  border-bottom-color: var(--panel) !important;
}
