#map-background {
  position: absolute;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.leaflet-container {
  background: #00000000;
}

#map {
  width: 100vw;
  height: calc(100svh - 50px);
}

.map-marker-0 {
  border: solid 5px #02CCB2;
  border-radius: 32px;
  background-color: #FFF;
}

/* Marker Pop up information container. ____________________________________ */
.marker-info-container h2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #000;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-wide);
}

.marker-info-container h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-normal);
  color: #000;
  margin-bottom: 0.5rem;
}

.marker-info-container p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  letter-spacing: var(--letter-spacing-wide);
  color: #000;
  margin-bottom: 1rem;
}

.marker-info-container a {
  text-decoration: none;
  color: #000;
  font-size: inherit;
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
}

.marker-info-container a::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}

.marker-info-container h2 a:focus::after {
  outline: 2px solid blue;
}

/* Controller inputs and buttons. __________________________________________ */
.custom-control {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: white;
  padding: 8px 12px;
  cursor: pointer;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-normal);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  border-radius: 4px;
  z-index: 1000;
  user-select: none;
  transition: all 0.2s ease;
}

.custom-control:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Legend Box. _____________________________________________________________ */
.legend-box {
  position: fixed;
  bottom: 120px;
  left: 10px;
  width: calc(100vw - 20px);
  height: 80vh;
  background-color: #CFD2B4;
  color: #000;
  border-radius: 50px;
  box-shadow: 0px 0px 0px 10px hsl(0deg 0% 0% / 50%);
  padding: 0 20px 30px 20px;
  display: none;
  z-index: 1000;
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity 1300ms ease-in-out, transform 1300ms ease-in-out;
}

.legend-box.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;
}

.legend-box h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-normal);
  color: #000;
  margin-bottom: 1rem;
  text-align: center;
}

.legend-box h3 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  letter-spacing: var(--letter-spacing-wide);
  color: #000;
  margin-bottom: 1rem;
  max-width: 60ch;
}

.legend-box h4 {
  margin: 0 0 5px;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-normal);
  color: #000;
}

.legend-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 66.5%;
  overflow-y: auto;
  border-radius: 32px;
}

.legend-box ul li {
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.legend-box ul li:hover {
  background-color: #eee;
}

.legend-box ul li div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.legend-box ul li h4 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .legend-box {
    bottom: 80px;
    left: 5px;
    width: calc(100vw - 10px);
    padding: 0 15px 20px 15px;
    border-radius: 30px;
  }

  .legend-box h1 {
    font-size: var(--font-size-2xl);
  }

  .legend-box h3 {
    font-size: var(--font-size-sm);
  }

  .legend-box h4 {
    font-size: var(--font-size-base);
  }

  .custom-control {
    font-size: var(--font-size-sm);
    padding: 6px 10px;
  }
}
