@import url("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css");
@import url("https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.css");
@import url("https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.Default.css");

*{
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family: "Roboto";
  font-weight: normal;
}

main {
  width: 100%;
  height: 750px;
  position: relative;
  z-index: 0;
}

h2, h3, p {
  margin: 0;
  padding: 0;
}

@media screen and (max-width: 640px){
  .hide-on-mobile {
    display:none;
  }
}

/* MAP START */
#map {
  height: 750px;
  width: 100%;
  position: relative;
  z-index: 0;
}

@media screen and (min-width: 640px) {
  #legend {
    margin: 0 1rem;
  }
}


.tooltip {
  min-width: 300px;
  max-width: 60vw;
  display: flex;
  flex-direction: column;
  padding: 15px;
  overflow-wrap: break-word;
}

.tooltip h2,
.tooltip h3, 
.tooltip p,
#hud {
  white-space: normal;
  margin: 0;
  overflow-wrap: break-word;
  word-wrap: balance;
  overflow: hidden;
}

.tooltip h2, #hud h2 {
  line-height: 1.6rem;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.tooltip p {
  font-size: 1rem;
  line-height: 1rem;
}

/* .marker--dropbox {
  background-color:rgba(196, 207, 34, 0.5);
  border: 1px solid rgba(173, 182, 66, 0.5);
  border-radius: 50%;
} */

#hud--container {
  width: 100%;
  height:100%;
  pointer-events: none;
}

#hud {
  width: 100%;
  background-color: rgba(255,255,255,0.9);
  padding: 15px;
  
  display: flex;
  flex-direction: column;

  position: absolute;
  z-index: 1;
  box-shadow: 0 -8px 15px #36362b; 
}

#hud h2 {
  width: 100%;
  padding-right: 10px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

#hud-description {
  margin-left: 31px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  font-size: 1.2rem;
}

#hud .map-link {
  display: flex;
  align-items:flex-start;
  gap: 15px;
  text-decoration: none;
  color: #36362b;
  font-size: 1rem;
  transition: fill 0.1s ease-in-out;
}

#hud .map-link svg {
  width: 25px;
  height: 25px;
  fill: #36362b;
  transition: fill 0.1s ease-in-out;
}

#hud .map-link:hover {
  color: #4daae0;
}

#hud .map-link svg:hover {
  fill: #4daae0;
}
/* MAP END */

.marker_dropbox {
  --marker-size: 20px;
  --marker-opacity: 0.5;
  --marker-background-color: rgb(173, 182,66);
  --marker-border-color: rgb(173, 182, 66);
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker_dropbox--dot {
  width: var(--marker-size);
  height: var(--marker-size);
  opacity: var(--marker-opacity);
  border-radius: 50%;
  background-color: var(--marker-background-color);
  border: 2px solid var(--marker-border-color);
  flex:none;
  transition: all 0.15s ease-in-out;
} 

/* Set on the map container by updateFocusState(): dim everything else */
#map.has-selected-marker .marker_dropbox:not(.marker_dropbox--selected) {
  --marker-opacity: 0.3;
  pointer-events: none;
}

.marker_dropbox--hovered {
  --marker-size: 30px;
  --marker-opacity: 0.8;
  --marker-background-color: rgb(86, 107, 27);
  --marker-border-color: rgb(86, 107, 27);
}

/* Keep this last so a selected marker wins when it's also hovered */
.marker_dropbox--selected {
  --marker-size: 40px;
  --marker-opacity: 1;
  --marker-background-color: rgb(86, 107, 27);
  --marker-border-color: rgb(86, 107, 27);
}

@media (prefers-reduced-motion: reduce) {
  .marker_dropbox--dot { transition: none; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
