body {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  font-family: sans-serif;
  flex-direction: column;
}

nav {
  padding: 8px 1em;
  background-color: #00665E;
  flex-grow: 0;
}
.navbar .h2 { font-size: 1.5em; margin: 0.25em; color: white; }
.navbar img { max-height: 1.5em; margin-right: 1em; margin-left: 0.5em; }
.navbar a.btn { margin-left: 1em; }
.btn-secondary { background-color: #BB6125; }
h3, h4 { font-weight: bold; margin-top: 0.5em; }

main {
  display: flex;
  flex-direction: row;
  flex-grow: 1;
}

#map {
  flex-grow: 1;
  cursor: pointer;
  background-color: #eee;
}

#sidebar {
  min-width: 300px;
  max-width: 30%;
  padding: 0.5em 1em;
  flex-grow: 1;
}

#details {
  max-height: 100%;
  overflow-y: scroll;
}

.hide { display: none !important; }

.mapboxgl-popup .mapboxgl-popup-content {
  width: 300px;
  height: 300px;
  overflow-x: scroll;
  white-space: nowrap; /* Ensures the content stays on one line */
}
.mapboxgl-popup-close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2; /* Ensure it's above the content */
}
.mapboxgl-popup .mapboxgl-popup-content ul {
  list-style-type: none; /* Removes bullet points */
  padding: 0;
  margin: 0;
}

.mapboxgl-popup .mapboxgl-popup-content li {
  margin-bottom: 4px; /* Adds a small margin for each item */
}

.mapboxgl-popup .mapboxgl-popup-content strong {
  color: #333; /* Dark grey color for keys */
}
/* Styles for toggle switch start */
.control-container {
  display: flex;
  flex-direction: column;  /* This stacks the toggle switches vertically */
  background: white;
  border-radius: 5px;
}
.toggle-group {
  display: flex;
  justify-content: space-between; /* Spreads out the label and the switch */
  align-items: center;  /* Aligns the toggle and label vertically */
  margin-bottom: 10px;  /* Space between each toggle group */
}

.switch-label {
  order: -1;  /* Ensures labels stay to the left */
}
/*The switch - the box around the slider*/
.switch {
  position: relative;
  display: inline-block;
  order: 1;
  width: 30px;
  height: 17px;
}

/* Hide default HTML checkbox*/
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/*The slider*/ 
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: grey;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 13px;
  width: 13px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: green;
}

input:focus + .slider {
  box-shadow: 0 0 1px green;
}

input:checked + .slider:before {
  -webkit-transform: translateX(13px);
  -ms-transform: translateX(13px);
  transform: translateX(13px);
}

/*Rounded sliders*/ 
.slider.round {
  border-radius: 17px;
}

.slider.round:before {
  border-radius: 50%;
}


/* Styles for toggle switch end */ 

@keyframes spinner {
  to {transform: rotate(360deg);}
}

.spinner:before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin-top: -25px;
  margin-left: -25px;
  border-radius: 50%;
  border: 6px solid #ccc;
  border-top-color: #000;
  animation: spinner .6s linear infinite;
}