html,
body,
#map {
  height: 100%;
  margin: 0;
  padding: 0;
}
.date-control {
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 10px;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  font-family: sans-serif;
  font-size: 14px;
  min-width: 360px;
}
.date-control input[type="range"] {
  width: 340px;
}
.date-label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

/* bottom-left toggle button */
.opacity-control {
  background: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  font-family: sans-serif;
  font-size: 13px;
}
.opacity-control a {
  color: #222;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}
.opacity-control a:focus {
  outline: 2px solid #66a3ff;
  border-radius: 3px;
}
.info-control {
  position: relative;
}
.info-btn {
  background: #fff;
  border-radius: 6px;
  padding: 6px 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-family: sans-serif;
  font-size: 13px;
  text-decoration: none;
  color: #222;
  display: inline-block;
}
.info-btn:focus {
  outline: 2px solid #66a3ff;
  border-radius: 4px;
}

/* popup panel */
.info-popup {
  position: absolute;
  right: 0;
  bottom: 44px; /* sits above the button */
  width: 360px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  padding: 12px;
  font-family: sans-serif;
  font-size: 14px;
  line-height: 1.4;
  display: none; /* hidden by default */
  z-index: 1000;
}

/* header row inside popup */
.info-popup .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.info-popup .close-btn {
  background: #eee;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 13px;
}
.info-popup .close-btn:focus {
  outline: 2px solid #66a3ff;
  border-radius: 4px;
}
.leaflet-bottom.leaflet-left .leaflet-control {
  display: inline-block;
  margin-right: 5px;
}

.changes-layer-tile {
  image-rendering: pixelated;    /* keep heatmap crisp when zooming */
  -moz-image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
  z-index: 90;
}

.change-range-panel {
  background: rgba(255,255,255,0.95);
  padding: 8px;
  border-radius: 6px;
  font-family: sans-serif;
  font-size: 13px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
  min-width: 260px;
  margin-top: 6px;
}

.change-range-panel .labels {
  font-size: 12px;
  color: #333;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.change-range-slider {
  position: relative;
  width: 100%;
  height: 24px;
}

/* the grey track */
.change-range-slider::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  z-index: 1;
}

/* the active (selected) range fill */
.change-range-fill {
  position: absolute;
  top: 10px;
  height: 4px;
  background: #0078ff;
  border-radius: 2px;
  z-index: 2;
}

/* slider thumbs (both inputs) */
.change-range-slider input[type=range] {
  position: absolute;
  width: 100%;
  top: 0;
  height: 24px;
  pointer-events: none; /* only thumbs handle events */
  background: none;
  -webkit-appearance: none;
  z-index: 3;
}

.change-range-slider input[type=range]::-webkit-slider-thumb {
  pointer-events: all;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0078ff;
  border: 1px solid #004a99;
  -webkit-appearance: none;
}

.change-range-slider input[type=range]::-moz-range-thumb {
  pointer-events: all;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0078ff;
  border: 1px solid #004a99;
}
