/* Base map and layout */
html, body, #map {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

/* Timestamp display */
#timestamp {
  position: absolute;
  top: 10px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  font-size: 13px;
  border-radius: 4px;
  z-index: 1000;
  pointer-events: none;
}

/* Legend block */
#legend {
  position: absolute;
  top: 50px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 10px;
  color: white;
  font-size: 12px;
  line-height: 1.4em;
  border-radius: 6px;
  z-index: 1000;
}

.legend-box {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.3); /* ✅ Optional but recommended */
}

/* Credits footer */
#credits {
  position: absolute;
  bottom: 24px; /* moved up from 8px */
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 6px 10px;
  font-size: 9px;
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  border-radius: 4px;
  z-index: 1000;
  line-height: 1.4em;
  text-align: left;
  max-width: 280px;
}



/* Mobile responsiveness */

@media (max-width: 600px) {
  #legend {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 11px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    z-index: 1000;
  }

  /* Timestamp sits beside the legend, top-aligned */
  #timestamp {
    position: absolute;
    top: 8px;
    left: calc(8px + 165px); /* width of legend + margin */
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    z-index: 1000;
    max-width: 45vw;
    white-space: normal;
  }

  #credits {
    font-size: 8px;
    bottom: 30px;
    max-width: 90%;
  }
}


.leaflet-control-scale {
  background: none !important;
  padding: 4px 6px !important;
  box-shadow: none !important;
  line-height: 1.4em !important;
  font-size: 11px !important;
  font-family: 'Inter', sans-serif !important;
}

.leaflet-control-scale-line {
  background: none !important;
  border: none !important;
  border-top: 1px solid white !important;
  height: 6px !important;
  margin-top: 2px !important;
  text-align: center !important;
  min-width: 60px;
}
