body {
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, "Liberation Sans", sans-serif !important;
  font-size: 16px !important;
  color: #222 !important;
  background: #f6f8fb !important;
  margin: 20px !important;
}

h2, h3, h4, h5 {
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, "Liberation Sans", sans-serif !important;
  font-weight: 500 !important;
  color: #183c6b !important;
  letter-spacing: 0.5px !important;
  margin-top: 0.3em !important;
  margin-bottom: 0.3em !important;
}

label, select, button {
  font-family: inherit !important;
  font-size: 1em !important;
  color: #222 !important;
}

#speciesPanel {
  height: 600px !important;
  overflow-y: auto !important;
  min-width: 220px !important;
  max-width: 350px !important;
  border-left: 1px solid #ccc !important;
  background: #f5faff !important;
  box-shadow: 0 0 4px #ddd !important;
  font-size: 1em !important;
  color: #222 !important;
  font-family: inherit !important;
}

#speciesResult {
  margin-top: 20px !important;
  font-family: inherit !important;
  font-size: 1em !important;
  color: #222 !important;
}

#speciesResult ul {
  padding-left: 24px !important;
}

.leaflet-control-layers,
.leaflet-control-layers label,
.leaflet-popup-content,
ul, li {
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, "Liberation Sans", sans-serif !important;
  font-size: 1em !important;
  color: #222 !important;
}

.leaflet-control-layers {
  background: white !important;
  border-radius: 4px !important;
  box-shadow: 0 1px 4px #888 !important;
}

/* --- Choose map box size and font --- */
.leaflet-control-layers-expanded {
  min-width: 80px !important;
  max-width: 180px !important;
  width: 120px !important;
  padding: 8px 10px !important;
  font-size: 0.89em !important;      /* smaller text in choose map box */
}
/* ------------------------------------ */

.leaflet-control-layers label {
  font-weight: normal !important;
  letter-spacing: 0.5px !important;
}

/* Bonus: Make form fields look better */
input, textarea {
  font-family: inherit !important;
  font-size: 1em !important;
  color: #222 !important;
}

/* Make Download button less ugly by default */
button, #downloadBtn {
  border-radius: 4px;
  padding: 7px 12px;
  background: #eaf2fa;
  color: #183c6b;
  border: 1px solid #2c497a;
  cursor: pointer;
  font-family: inherit !important;
  font-size: 1em !important;
  margin-top: 8px;
}

button:hover, #downloadBtn:hover {
  background: #d8e7f5;
  border-color: #183c6b;
  color: #183c6b;
}

.layer-control-title {
  font-size: 1.14em;
  font-weight: bold;
  color: #222;
  background: white;
  padding: 6px 8px 2px 8px;
}

#top-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px; /* Optional: adds space between controls */
}

#top-controls label {
  margin-bottom: 0;   /* Removes bottom margin (vertical spacing) */
}

/* --- OVERRIDE: Ensure NO SCROLL in choose map box --- */
body .leaflet-control-container .leaflet-control-layers-expanded,
body .leaflet-control-container .leaflet-control-layers-list {
  max-height: none !important;
  height: auto !important;
  overflow-y: visible !important;
}