/* General Styles */
body {
  margin: 0;
  padding: 0;
}

html,
body,
#map {
  height: 100%;
}

/* Map Overlay Styles */
.map-overlay {
  font:
    12px/20px "Helvetica Neue",
    Arial,
    Helvetica,
    sans-serif;
  position: absolute;
  width: 250px;
  top: 10px;
  left: 10px;
  padding: 10px;
  z-index: 1;
}

.map-overlay .map-overlay-inner {
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  padding: 10px;
  margin-bottom: 10px;
}

.map-overlay h2 {
  line-height: 24px;
  display: block;
  margin: 0 0 10px;
}

.map-overlay label {
  display: block;
  margin-bottom: 5px;
}

.map-overlay input[type="range"] {
  background-color: transparent;
  display: inline-block;
  width: 100%;
  position: relative;
  margin: 0;
  cursor: ew-resize;
}

.date-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.map-overlay input[type="date"] {
  flex: 1;
  margin-bottom: 0;
}

.refresh-button {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #495057;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.refresh-button:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #343a40;
}

#hour-value-display {
  font-weight: bold;
  margin-left: 5px;
}

#loading-indicator {
  margin-top: 10px;
  padding: 10px;
  background-color: #f0f8ff;
  border: 1px solid #4a90e2;
  border-radius: 4px;
  font-size: 12px;
  color: #333;
  display: none;
  text-align: center;
  position: relative;
}

#loading-indicator.active {
  display: block;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e3e3e3;
  border-top: 2px solid #4a90e2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-text {
  vertical-align: middle;
  font-weight: 500;
}

.loading-progress {
  margin-top: 5px;
  font-size: 11px;
  color: #666;
}

/* Info Button Styling */
.info-button {
  background: none;
  border: none;
  color: #0078ff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 10px;
}

.info-button:hover {
  color: #0056b3;
}

/* GitHub Link Style */
.github-link {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  background-color: #fff;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  text-decoration: none;
  color: #333;
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
}

.github-link:hover {
  background-color: #f0f0f0;
}

.github-icon {
  width: 16px;
  height: 16px;
  margin-right: 5px;
}
/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 3px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  font:
    12px/20px "Helvetica Neue",
    Arial,
    Helvetica,
    sans-serif;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.close-button {
  color: #666;
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 15px;
  top: 10px;
}

.close-button:hover,
.close-button:focus {
  color: #333;
  text-decoration: none;
}

.modal-content h2 {
  line-height: 24px;
  display: block;
  margin: 0 0 15px;
  font-size: 16px;
  font-weight: bold;
}

.modal-body {
  margin-top: 10px;
  line-height: 1.6;
}

.modal-body h3 {
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: bold;
}

.modal-body ul {
  padding-left: 20px;
  margin-top: 5px;
  margin-bottom: 15px;
}

.modal-body li {
  margin-bottom: 5px;
}

.modal-body p {
  margin-bottom: 15px;
}

/* Legend Styling */
.legend {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 10px;
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  min-width: 200px;
}

.legend-header {
  margin-bottom: 8px;
  font-weight: bold;
  text-align: center;
}

.legend-title {
  display: block;
  font-size: 13px;
}

.legend-units {
  display: block;
  font-size: 11px;
  color: #666;
  font-weight: normal;
}

.legend-scale {
  display: flex;
  flex-direction: column;
}

.legend-gradient {
  height: 20px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 2px;
  margin-bottom: 5px;
}

.legend-label-container {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #666;
}

.legend-min,
.legend-max {
  font-weight: 500;
}

  .playback-controls {
    display: flex;
    align-items: center;
    gap: 10px;
  }
 
  #play-button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
 
  #play-button.playing {
    background: #2b6cb0;
    color: #fff;
    border-color: #2b6cb0;
  }
 
  .speed-label {
    font-size: 12px;
    color: #555;
  }
 
  #speed-slider {
    width: 140px;
  }

  .forecast-hour-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
  }
 
  .forecast-label {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
  }
 
  #forecast-hour-slider {
    width: 180px;
  }
 
  #forecast-hour-display {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    color: #333;
    min-width: 110px;
  }

    .mode-toggle {
    display: inline-flex;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
  }
 
  .mode-btn {
    border: none;
    background: #fff;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    color: #555;
  }
 
  .mode-btn + .mode-btn {
    border-left: 1px solid #ccc;
  }
 
  .mode-btn.active {
    background: #2b6cb0;
    color: #fff;
  }
 
  /* Visibly grey out the date picker while it's disabled in forecast mode. */
  #date-picker:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #eee;
  }
 
  #forecast-hour-slider:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }



