/* 3D MAP. MapLibre's own stylesheet isn't bundled, so the few control and popup styles it needs are here. */
#map3d-v {
  position: relative;
  height: calc(100vh - 100px - var(--header-extra));
  /* The height actually visible on a phone: 100vh counts the address bar too. */
  height: calc(100dvh - 100px - var(--header-extra));
  width: 100%;
  padding-bottom: 0;
}

.map3d-root,
#map3d {
  position: relative;
  height: 100%;
  width: 100%;
  background: #0b1d3a;
}

.map3d-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.map3d-bar .map-btn {
  text-decoration: none;
}

.map3d-status,
.map3d-hint {
  background: rgba(11, 29, 58, 0.85);
  color: #f5f7fa;
  border-radius: 3px;
}

.map3d-status {
  font-size: 0.7rem;
  padding: 4px 8px;
}

.map3d-hint {
  position: absolute;
  bottom: 22px;
  left: 10px;
  z-index: 5;
  margin: 0;
  max-width: calc(100% - 20px);
  font-size: 0.62rem;
  padding: 3px 6px;
}

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

.maplibregl-canvas {
  position: absolute;
  left: 0;
  top: 0;
  outline: none;
}

.maplibregl-ctrl-top-right,
.maplibregl-ctrl-bottom-right {
  position: absolute;
  right: 10px;
  z-index: 5;
  pointer-events: none;
}

.maplibregl-ctrl-top-right { top: 10px; }
.maplibregl-ctrl-bottom-right { bottom: 0; right: 0; }

.maplibregl-ctrl {
  pointer-events: auto;
}

.maplibregl-ctrl-group {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.maplibregl-ctrl-group button {
  width: 30px;
  height: 30px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1b3a6b;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.maplibregl-ctrl-zoom-in::before { content: "+"; }
.maplibregl-ctrl-zoom-out::before { content: "−"; }
.maplibregl-ctrl-compass::before { content: "🧭"; font-size: 14px; }
.maplibregl-ctrl-icon { display: none; }

.maplibregl-ctrl-attrib {
  background: rgba(255, 255, 255, 0.75);
  color: #0f172a;
  font-size: 10px;
  padding: 1px 6px;
}

.maplibregl-ctrl-attrib a {
  color: #1b3a6b;
}

.maplibregl-ctrl-attrib-button {
  display: none;
}

.maplibregl-popup {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  will-change: transform;
  pointer-events: none;
  z-index: 6;
}

.maplibregl-popup-content {
  position: relative;
  background: #0b1d3a;
  color: #f5f7fa;
  border: 1px solid #ea580c;
  border-radius: 4px;
  padding: 8px 22px 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: auto;
}

.maplibregl-popup-content a {
  color: #5ac8fa;
}

.maplibregl-popup-close-button {
  position: absolute;
  top: 2px;
  right: 4px;
  background: none;
  border: 0;
  color: #f5f7fa;
  font-size: 16px;
  cursor: pointer;
}

.maplibregl-popup-tip {
  display: none;
}
