/* Full-width title above map */

.outerContainer {
  border: solid 1px #c0c0c0;
}
#mapTitle {
  width: 100%;
  text-align: center;
  font-size: 28px;
  color: #555;
  background: rgba(255,255,255,0.95);
  padding: 5px 0;
  margin: 0;
}
/* Map container full width */
#mapContainer {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 1600px;
  background: #fff;
}
canvas {
  border: none;
  background: #fff;
  cursor: grab;
  width: 100%;
  height: auto;
  display: block;
}
canvas:active { cursor: grabbing; }

/* Tooltip */
#tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(30, 30, 30, 0.92);
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  display: none;
  max-width: 300px;
  line-height: 1.4em;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
  z-index: 6;
}
#tooltip b {
  font-size: 15px;
  color: #ffd966;
}

/* Zoom buttons */
#zoomControls {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #666;
  border-radius: 4px;
  box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
  padding: 4px;
  z-index: 4;
}
.zoom-btn {
  background: #fff;
  border: 1px solid #666;
  border-radius: 3px;
  font-size: 18px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  text-align: center;
  line-height: 26px;
  transition: background 0.2s;
}
.zoom-btn:hover { background: #e0e0e0; }

/* Horizontal legend below map */
#legendBox {
  width: 100%;
  background: rgba(255,255,255,0.9);
  font-size: 20px;
  font-family: Arial, sans-serif;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap; /* Prevent icon/label wrap */
}

.legend-color {
  width: 18px;
  height: 18px;
  border: 1px solid #333;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Dataset selector */
#controls {
  margin: 20px 0 25px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
select {
  padding: 5px 10px;
  font-size: 15px;
}

@media (max-width: 700px) {
  #mapTitle { font-size: 18px; padding: 12px 0; }
  #legendBox { font-size: 15px; gap: 15px; }
}