/* 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;
}
