/* ===================================
   Weather Overlay – Simple Horizontal Forecast
   =================================== */

/* Overlay wrapper */
.weather-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

.weather-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

/* Container */
.weather-overlay .weather-container {
  width: 100%;
  height: 100%;
  background: #e8e8e8;
  padding: clamp(1.5rem, 2.5vh, 3rem) clamp(2rem, 3vw, 4rem)
    clamp(8rem, 12vh, 12rem) clamp(2rem, 3vw, 4rem);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  transition: background 1.5s ease;
}

/* Weather-themed backgrounds */
.weather-overlay .weather-container.theme-clear-day {
  background: linear-gradient(135deg, #87ceeb 0%, #fdb462 50%, #ffe66d 100%);
}

.weather-overlay .weather-container.theme-clear-night {
  background: linear-gradient(135deg, #1a1f4d 0%, #2d3561 50%, #4a5584 100%);
}

.weather-overlay .weather-container.theme-rain {
  background: linear-gradient(135deg, #6b8e99 0%, #8ba6b0 50%, #a8bfc9 100%);
}

.weather-overlay .weather-container.theme-clouds {
  background: linear-gradient(135deg, #b8c6d0 0%, #d0d8de 50%, #e5eaf0 100%);
}

.weather-overlay .weather-container.theme-snow {
  background: linear-gradient(135deg, #d4e8f5 0%, #e8f4fa 50%, #f5fcff 100%);
}

.weather-overlay .weather-container.theme-thunderstorm {
  background: linear-gradient(135deg, #4a5568 0%, #606875 50%, #7a8291 100%);
}

.weather-overlay .weather-container.theme-mist {
  background: linear-gradient(135deg, #b0bec5 0%, #cfd8dc 50%, #eceff1 100%);
}

/* Default fallback theme */
.weather-overlay .weather-container.theme-default {
  background: linear-gradient(135deg, #c4cdd5 0%, #dde2e7 50%, #e8e8e8 100%);
}

/* ===== Video Background Layer ===== */
.weather-overlay .weather-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}

.weather-overlay .weather-video-bg.active {
  opacity: 1;
}

/* Darken overlay for readability when video is playing */
.weather-overlay .weather-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}

.weather-overlay .weather-video-overlay.active {
  opacity: 1;
}

/* Ensure container is positioned for z-index stacking */
.weather-overlay .weather-container {
  position: relative;
}

/* Content sits above video */
.weather-overlay .weather-location,
.weather-overlay .forecast-title,
.weather-overlay .forecast-container,
.weather-overlay .current-temp-bar {
  position: relative;
  z-index: 2;
}

/* Text colors when video background is active */
.weather-overlay .weather-container.has-video .weather-location {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.weather-overlay .weather-container.has-video .forecast-title {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.weather-overlay .weather-container.has-video .forecast-temp-high {
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.weather-overlay .weather-container.has-video .forecast-temp-low {
  color: rgba(255, 255, 255, 0.7);
}

.weather-overlay .weather-container.has-video .forecast-condition {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.weather-overlay .weather-container.has-video .forecast-icon {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.weather-overlay .weather-container.has-video .current-temp-bar {
  background: rgba(0, 0, 0, 0.2);
}

.weather-overlay .weather-container.has-video .current-temp-value {
  color: #fff;
}

.weather-overlay .weather-container.has-video .current-temp-condition {
  color: rgba(255, 255, 255, 0.8);
}

/* Location header */
.weather-overlay .weather-location {
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  font-weight: 400;
  color: #666;
  margin: 0 0 clamp(0.5rem, 1vh, 1rem) 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Forecast title */
.weather-overlay .forecast-title {
  font-size: clamp(1.8rem, 3vw, 3.5rem);
  font-weight: 700;
  color: #333;
  text-align: center;
  margin: clamp(1rem, 2vh, 2rem) 0 clamp(1.5rem, 2.5vh, 2.5rem) 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Forecast container */
.weather-overlay .forecast-container {
  display: flex;
  gap: clamp(1rem, 1.5vw, 2rem);
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: clamp(1rem, 2vh, 2rem) 0;
  max-height: calc(100vh - 200px);
}

/* Forecast card */
.weather-overlay .forecast-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.75rem, 1.5vh, 1.5rem);
  flex: 1;
  max-width: clamp(200px, 18vw, 320px);
  padding: clamp(1.5rem, 2vh, 2.5rem) clamp(1rem, 1.5vw, 2rem);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: clamp(12px, 1.2vw, 20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: calc(var(--card-index, 0) * 0.1s);
  opacity: 0;
}

/* Card style when video is active — slightly darker for contrast */
.weather-overlay .weather-container.has-video .forecast-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Time header */
.weather-overlay .forecast-time {
  background: #26b9e2;
  color: white;
  font-size: clamp(1.5rem, 2.5vw, 3rem);
  font-weight: 700;
  padding: clamp(0.5rem, 1vh, 0.8rem) clamp(0.75rem, 1vw, 1.5rem);
  border-radius: 4px;
  width: 100%;
  max-width: 100%;
  text-align: center;
  box-sizing: border-box;
}

/* Weather icon */
.weather-overlay .forecast-icon {
  font-size: clamp(6rem, 10vw, 12rem);
  line-height: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
  margin: clamp(0.5rem, 1vh, 1rem) 0;
}

/* Temperature */
.weather-overlay .forecast-temp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.weather-overlay .forecast-temp-high {
  font-size: clamp(2.5rem, 4vw, 5rem);
  font-weight: 700;
  color: #000;
  line-height: 1;
}

.weather-overlay .forecast-temp-low {
  font-size: clamp(1.5rem, 2.5vw, 3rem);
  font-weight: 400;
  color: #999;
  line-height: 1;
}

/* Condition text */
.weather-overlay .forecast-condition {
  font-size: clamp(1.2rem, 1.8vw, 2rem);
  font-weight: 400;
  color: #333;
  text-align: center;
  margin-top: clamp(0.25rem, 0.5vh, 0.5rem);
}

/* Hidden class */
.weather-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Optional current temperature display */
.weather-overlay .current-temp-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  animation: fadeIn 0.4s ease-out forwards;
}

.weather-overlay .current-temp-icon {
  font-size: clamp(2.5rem, 4vw, 5rem);
  line-height: 1;
}

.weather-overlay .current-temp-value {
  font-size: clamp(2.5rem, 4vw, 5rem);
  font-weight: 700;
  color: #333;
  line-height: 1;
}

.weather-overlay .current-temp-condition {
  font-size: clamp(1.2rem, 2vw, 2.5rem);
  font-weight: 400;
  color: #666;
}
