html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}

#map {
  height: 100%;
}

#legend {
  background: white;
  padding: 10px;
  margin: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1;
  max-height: 90%;
  overflow-y: auto;
}

#legend h3 {
  margin-top: 0;
  font-size: 16px;
}

#total-stats {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

#total-stats h4 {
  margin: 0 0 5px 0;
  font-size: 14px;
}

#total-stats p {
  margin: 0;
  font-size: 12px;
}

.legend-stage {
  margin-bottom: 10px;
}

.legend-stage h4 {
  margin: 0 0 5px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.legend-stage ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.legend-stage li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 3px;
}

.legend-stage li::before {
  content: '\25cf';
  position: absolute;
  left: 0;
  font-size: 14px;
}

.color-box {
    width: 12px;
    height: 12px;
    display: inline-block;
    margin-right: 8px;
    border: 1px solid #000;
}

.toggle-button {
  background-color: white;
  border: 2px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
  padding: 5px;
  margin: 10px 10px 0 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.toggle-button .material-icons {
  vertical-align: middle;
}
.marker-container {
  position: relative;
  display: flex;
  align-items: center;
}

.marker-label {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(8px, -50%);}

.date-label {
  background-color: white;
  border: 1px solid #ccc;
  padding: 2px 5px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  transform: translate(-50%, -50%); /* Center the label on the coordinate */
}