/* ===== MAP SECTION ===== */
.map-section {
  padding: 0;
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.mapbox-container {
  width: 100%;
  height: 60vh;
  position: relative;
}

.mapbox-container.map-active {
  outline: 1px solid #333;
}

.mapbox-container.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
}

/* Fullscreen button */
.map-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #333;
  color: #ccc;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.map-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: #666;
  color: #fff;
}

/* Legend */
.map-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  background: #000;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
}

.legend-line {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

/* Layer chooser */
.map-layer-control {
  position: absolute;
  top: 12px;
  right: 54px;
  z-index: 10;
}

.map-control-btn {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #333;
  color: #ccc;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.map-control-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: #666;
  color: #fff;
}

.map-layer-menu {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #333;
}

.map-layer-option {
  background: rgba(0, 0, 0, 0.8);
  border: none;
  color: #aaa;
  padding: 6px 12px;
  font-size: 0.75rem;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.map-layer-option:hover {
  background: rgba(40, 40, 40, 0.9);
  color: #fff;
}

.map-layer-option.active {
  color: #fff;
  background: rgba(60, 60, 60, 0.9);
}

/* Tilt control */
.map-tilt-control {
  position: absolute;
  bottom: 36px;
  right: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 4px 10px;
}

.map-tilt-label {
  color: #aaa;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.map-tilt-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: #444;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.map-tilt-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  cursor: pointer;
}

.map-tilt-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  cursor: pointer;
}

.mapboxgl-canvas {
  filter: contrast(130%);
}

/* Mapbox overrides */
.mapboxgl-ctrl-logo,
.mapboxgl-ctrl-attrib {
  opacity: 0.3;
}

.mapboxgl-ctrl-scale {
  background: rgba(0, 0, 0, 0.6) !important;
  color: #ccc !important;
  border-color: #ccc !important;
  font-size: 11px;
  padding: 0 6px;
}

.mapboxgl-popup-content {
  background: #00000091 !important;
  color: #ccc !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
}

.mapboxgl-popup-close-button {
  color: #ccc !important;
  font-size: 18px;
}

.mapboxgl-popup-close-button:hover {
  color: #fff !important;
  background: transparent !important;
}

.mapboxgl-popup-tip {
  border-top-color: #111 !important;
}

.live-controls {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
}

.live-preview-btn,
.live-clear-btn {
  padding: 10px 22px;
  background: rgba(17, 17, 17, 0.85);
  color: #fff;
  border: 1px solid #ff4d4d;
  border-radius: 4px;
  font-family: "Oswald", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.live-clear-btn {
  display: none;
}

.live-clear-btn.visible {
  display: inline-block;
}

.live-preview-btn:hover,
.live-clear-btn:hover {
  background: #ff4d4d;
  color: #fff;
}

.live-device-marker {
  display: block;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

.live-popup {
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #fff;
  padding: 2px 4px;
}

.live-popup strong {
  font-size: 13px;
  color: #ffcc00;
}

.live-popup-actions {
  margin-top: 8px;
  text-align: center;
}

.live-popup-show-all {
  font-family: inherit;
  font-size: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.live-popup-show-all:hover {
  background: rgba(255, 204, 0, 0.18);
  border-color: #ffcc00;
}

