/* ============================================================
   storm-map.css — Regional Storm Forecast Map Styling
   Weather Compass · weathercompass.ca
   ============================================================ */

#storm-map-container {
  width: 100%;
  height: 350px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.storm-controls {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.storm-play-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.storm-play-btn:active {
  background: rgba(255, 255, 255, 0.25);
}

.storm-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
}

.storm-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #60a5fa;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
}

.storm-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #60a5fa;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
}

.storm-time-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  min-width: 55px;
  text-align: center;
  flex-shrink: 0;
}

.storm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

.storm-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
}

.storm-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.storm-legend-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  margin-right: 4px;
}

.storm-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 350px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.88rem;
}

.storm-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  animation: stormSpin 0.7s linear infinite;
  margin-left: 8px;
}

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

/* Totals summary */
.storm-totals-row {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.storm-total-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}
.storm-total-icon {
  font-size: 1rem;
}
.storm-total-val {
  font-weight: 700;
  color: #fff;
}
.storm-total-lbl {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.7rem;
}

/* Fullscreen mode */
.storm-fullscreen {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  background: #0f172a;
  display: block !important;
  padding: 0;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
}
.storm-fullscreen #storm-map-container {
  height: calc(100vh - 80px) !important;
  border-radius: 0;
}
.storm-fullscreen .storm-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
}
.storm-fullscreen .storm-totals-row,
.storm-fullscreen #storm-legend-wrap {
  display: none;
}

@media (max-width: 600px) {
  #storm-map-container {
    height: 280px;
  }
}
