/* ── Base reset & layout ── */
html,
body {
  margin: 0;
  height: 100%;
  font-family: Inter, Arial, sans-serif;
  overflow: hidden;
}

body {
  display: flex;
  background: #0f172a;
  color: #e2e8f0;
}

/* ── Main map area ── */
.map-area {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ── Map container & pane grid ── */
.map-container {
  display: grid;
  width: 100%;
  height: 100%;
}

.map-container.single {
  grid-template: 1fr / 1fr;
}

.map-container.quad {
  grid-template-rows: 1fr 6px 1fr;
  grid-template-columns: 1fr 6px 1fr;
  background: #1f2937;
}

/* Pane grid placement set via JS (grid-area inline style) */

.map-pane {
  position: relative;
  overflow: hidden;
}

.map-pane .map-gl {
  width: 100%;
  height: 100%;
}

/* ── Quad-view drag dividers ── */
.quad-divider {
  background: #1f2937;
  z-index: 5;
}
.quad-divider-v {
  grid-area: 1 / 2 / 4 / 3;
  cursor: col-resize;
}
.quad-divider-h {
  grid-area: 2 / 1 / 3 / 4;
  cursor: row-resize;
}
.quad-divider-center {
  grid-area: 2 / 2 / 3 / 3;
  cursor: move;
  z-index: 6;
}
.quad-divider:hover,
.quad-divider:active {
  background: #3b82f6;
}

/* ── Pane controls (bottom-left selects & buttons) ── */
.pane-controls {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 5;
  display: flex;
  gap: 4px;
  align-items: center;
}

.pane-radar-select {
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.82rem;
  cursor: pointer;
  max-width: 200px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.pane-national-btn {
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  line-height: 1;
}
.pane-national-btn:hover {
  background: rgba(30, 41, 59, 0.95);
}

/* ── Pane legend overlay ── */
.pane-legend {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  max-width: 90%;
  height: auto;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.75);
  border-radius: 4px;
  padding: 2px 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Tall (vertical) legends anchor to the right edge instead of bottom-center */
.pane-legend.vertical {
  left: auto;
  bottom: auto;
  transform: none;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 60px;
  max-height: 80%;
}

/* ── Pane label (top overlay) ── */
.pane-label {
  position: absolute;
  top: 8px;
  left: 50px;
  z-index: 5;
  background: rgba(15, 23, 42, 0.75);
  color: #94a3b8;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  pointer-events: none;
}

/* ── Popup overrides ── */
.maplibregl-popup-content {
  color: #000;
}

.maplibregl-popup-content strong {
  color: #000;
}

/* ── Misc ── */
.last-updated {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
}

code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

