/* --- GLOBAL --- */
body {
  margin: 0;
  font-family: Arial, sans-serif;
}

#map {
  height: 100vh;
  width: 100%;
}

/* --- CONTROLS PANEL (RIGHT SIDE) --- */
#controls {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 260px;
  max-height: 80vh;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* --- HEADER --- */
#controls-header {
  background: #f4f4f4;
  padding: 8px 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

#controls-header button {
  border: none;
  background: none;
  font-size: 14px;
  cursor: pointer;
}

/* --- BODY --- */
#controls-body {
  padding: 10px;
  overflow-y: auto;
}

/* collapsed state */
#controls.collapsed #controls-body {
  display: none;
}

/* --- CONTROL ROWS --- */
.control-row {
  margin-bottom: 12px;
}

.control-row label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

/* --- INPUTS --- */
#yearSlider {
  width: 100%;
}

#recordType {
  width: 100%;
  padding: 4px;
  font-size: 13px;
}

/* --- REGION LIST --- */
#regionList {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 13px;
}

#regionList label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* --- LEGEND --- */
#legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  margin-top: 6px;
}

#legend span {
  display: flex;
  align-items: center;
}

/* --- COLOR DOTS --- */
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.green {
  background: green;
}

.red {
  background: red;
}

.gray {
  background: gray;
}

/* --- POPUP --- */
.popup-content {
  font-size: 13px;
  line-height: 1.3;
  max-width: 250px;
}

.record {
  margin-bottom: 4px;
}

/* --- CUSTOM MARKER (used via divIcon) --- */
.custom-marker {
  display: flex;
  justify-content: center;
  align-items: center;
}
