/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.bg-fog {
  background: url("../src/img/mostlyCloudy.png") top left / cover no-repeat !important;
  height: 70vh;
  width: 100vw;
}

/* ===== Glass Header (Base) ===== */
.ios-glass-header {
  position: relative;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  z-index: 9999 !important;
}

.ios-glass-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1.5px
  );
  background-size: 6px 6px;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

/* ===== Brand & Button Base ===== */
.ios-brand {
  transition: opacity 0.2s ease;
}
.ios-brand:hover {
  opacity: 0.85;
}

.ios-glass-btn {
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease;
}
.ios-glass-btn:active {
  transform: scale(0.97);
}

/* ===== Weather Card & Search Bar (Base) ===== */
.weather-card,
.search-bar {
  backdrop-filter: blur(12px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
}

.search-bar .form-control {
  background: transparent;
  border: none;
  box-shadow: none;
}
.search-bar .form-control:focus {
  outline: none;
}
.search-bar .btn {
  border: none;
  background: transparent;
}
.search-bar .btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
/* ===== Base Notification Panel (Blur Style) ===== */
.weather-notifications {
  position: absolute;
  top: 80px;
  right: 150px;
  border-radius: 12px;
  padding: 12px 16px;
  width: 260px;
  z-index: 999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease-in-out;
}

/* Smooth fade & slide */
.weather-notifications.show {
  opacity: 1;
  transform: translateY(0);
}
.weather-notifications.hide {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

/* ===== List Styling ===== */
.weather-notifications ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.weather-notifications ul li {
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  transition: background 0.2s ease-in-out;
}
.weather-notifications ul li:last-child {
  border-bottom: none;
}
.weather-notifications ul li:hover {
  border-radius: 6px;
  cursor: pointer;
}

/* Overlay */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1020 !important;
  opacity: 0;
  width: 100vw;
  height: 100vh;
  transition: opacity 0.25s ease;
}
.settings-overlay.show {
  opacity: 1;
  z-index: 1030 !important;
}
.settings-overlay.d-none {
  display: none;
}

/* Panel */
.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 340px;
  max-width: 100%;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 1050 !important; /* higher than your section's 1010 */
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}
.settings-panel.open {
  transform: translateX(0);
}
.sp-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.sp-body {
  padding: 16px;
  overflow: auto;
}

/* ========== Glassy form controls inside settings panel ========== */
.settings-panel .form-control,
.settings-panel .form-select {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #0f1115;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.settings-panel .form-control::placeholder {
  color: rgba(15, 17, 21, 0.55);
}

/* Focus state: subtle neon-ish ring */
.settings-panel .form-control:focus,
.settings-panel .form-select:focus {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(80, 160, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(80, 160, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  outline: none;
}

/* Buttons: glassy, minimal */
.settings-panel .btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28) !important; /* override bs outline */
  color: #0f1115;
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  border-radius: 10px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.06s ease;
}
.settings-panel .btn:hover {
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.settings-panel .btn:active {
  transform: translateY(1px);
}

/* Switches */
.settings-panel .form-check-input {
  background-color: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.settings-panel .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(80, 160, 255, 0.18);
}
.settings-panel .form-check-input:checked {
  background-color: rgba(80, 160, 255, 0.85);
  border-color: rgba(80, 160, 255, 0.85);
}

/* Select chevron contrast */
.settings-panel .form-select {
  background-image: linear-gradient(
      45deg,
      transparent 50%,
      rgba(15, 17, 21, 0.55) 50%
    ),
    linear-gradient(135deg, rgba(15, 17, 21, 0.55) 50%, transparent 50%),
    linear-gradient(to right, rgba(15, 17, 21, 0.35), rgba(15, 17, 21, 0.35));
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%,
    calc(100% - 2.2rem) 50%;
  background-size: 6px 6px, 6px 6px, 1px 65%;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

/* Header buttons (X) harmony */
.settings-panel .sp-header .btn {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.26) !important;
}

/* ===== Hourly Forecast Wrapper + Shadows ===== */
.hf-wrap {
  position: relative;
  overflow: hidden;
  padding-inline: 8px; /* keep cards clear of fades */
}
.hf-shadow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  pointer-events: none;
  z-index: 2;
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.hf-left {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent);
}
.hf-right {
  right: 0;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.22), transparent);
}

/* ===== Scroller ===== */
.hf-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0.25rem 0.75rem;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
}
.hf-scroller::-webkit-scrollbar {
  display: none; /* WebKit */
}
.hf-scroller::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 8px;
}

/* ===== Forecast Card ===== */
.hf-card {
  min-width: 128px; /* bigger for better content spacing */
  scroll-snap-align: start;
  border-radius: 14px;
  padding: 12px 12px 14px; /* more breathing room */
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  color: #fff;
  text-align: center;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease;
}
.hf-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.18);
}
.hf-card.is-now {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Day/Night Accent */
.hf-card[data-phase="night"] {
  background: rgba(0, 0, 0, 0.18);
}
.hf-card[data-phase="day"] {
  background: rgba(255, 255, 255, 0.12);
}

/* ===== Card Content ===== */
.hf-time {
  font-weight: 600;
  opacity: 0.9;
}
.hf-temp {
  font-weight: 700;
  font-size: 1.15rem;
}
.hf-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin: 0.35rem 0;
}

/* Metrics Row Below Temp */
.hf-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  justify-items: center;
  margin-top: 6px;
  font-size: 0.8rem;
}
.hf-metrics .m {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.9;
}
.hf-metrics .m i {
  font-size: 0.95rem;
  line-height: 1;
}

/* ===== Precipitation Bar ===== */
.hf-popbar {
  height: 28px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  margin-top: 0.35rem;
}
.hf-popbar-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--pop, 0%);
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(66, 133, 244, 0.9),
    rgba(66, 133, 244, 0.6)
  );
}

/* ===== Wind Chip ===== */
.hf-wind {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

/* ===== Legend ===== */
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-temp {
  background: #ff7a59;
}
.legend-pop {
  background: #4285f4;
}
.legend-wind {
  background: #7e57c2;
}

.glass-btn-group {
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08); /* subtle group film */
}

/* Base glass button (no noisy borders) */
.glass-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover */
.glass-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Active/selected */
.glass-btn.active {
  background: rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.25);
}

/* Keyboard focus (accessible but subtle) */
.glass-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(120, 185, 255, 0.35);
}
/* Heading styling */
.hourly-forecast-title {
  font-weight: 600;
  margin-bottom: 0;
  letter-spacing: 0.3px;
}

/* Base Card */
.weather-day-card {
  border-radius: 16px;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  color: #fff;
  transition: transform 0.2s ease, background-color 0.3s ease;
}
.weather-day-card:hover {
  transform: translateY(-3px);
}

/* Header */
.weather-day-title {
  font-weight: 600;
}
.weather-day-date {
  opacity: 0.8;
}

/* Main section */
.weather-day-icon {
  font-size: 2.5rem;
}
.weather-day-temp-min {
  opacity: 0.8;
}
.weather-day-feels {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Detail items */
.weather-detail {
  font-size: 0.9rem;
}

/* Weather Themes */
.weather-day-card[data-weather="sunny"] {
  background: rgba(255, 204, 0, 0.2);
  border: 1px solid rgba(255, 204, 0, 0.4);
}
.weather-day-card[data-weather="cloudy"] {
  background: rgba(150, 150, 150, 0.2);
  border: 1px solid rgba(200, 200, 200, 0.4);
}
.weather-day-card[data-weather="rain"] {
  background: rgba(0, 123, 255, 0.2);
  border: 1px solid rgba(0, 123, 255, 0.4);
}
.weather-day-card[data-weather="snow"] {
  background: rgba(240, 248, 255, 0.2);
  border: 1px solid rgba(240, 248, 255, 0.4);
  color: #000;
}
.weather-day-card[data-weather="storm"] {
  background: rgba(80, 0, 120, 0.25);
  border: 1px solid rgba(150, 0, 200, 0.4);
}

.weather-legend {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 6px 0;
  scrollbar-width: none; /* hide scrollbar for Firefox */
}
.weather-legend::-webkit-scrollbar {
  display: none; /* hide scrollbar for Chrome/Safari */
}

.legend-item {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  color: inherit;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

.map-heading {
  color: #0f1115;
}

/* Glass Base */
.weather-alert.glass {
  border-radius: 16px;
  backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  padding: 1rem;
}
.weather-alert.glass:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* Header */
.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.badge-severity {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  color: #fff;
}
.alert-icon {
  font-size: 1.5rem;
}

/* Body */
.alert-body {
  margin-top: 0.75rem;
}
.alert-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #777;
}

/* 🌤️ Glass Base */
.weather-alert.glass {
  border-radius: 16px;
  backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  padding: 1rem;
}
.weather-alert.glass:hover {
  transform: translateY(-4px) scale(1.02);
}

/* 🔖 Header */
.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.badge-severity {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  color: #fff;
}
.alert-icon {
  font-size: 1.5rem;
}
.alert-body {
  margin-top: 0.75rem;
}
.alert-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Severity Colors */
.weather-alert.info {
  background: rgba(0, 123, 255, 0.15);
}
.weather-alert.info .badge-severity {
  background: rgba(0, 123, 255, 0.9);
}

.weather-alert.warning {
  background: rgba(255, 193, 7, 0.15);
}
.weather-alert.warning .badge-severity {
  background: rgba(255, 193, 7, 0.9);
  color: #000;
}

.weather-alert.danger {
  background: rgba(220, 53, 69, 0.15);
}
.weather-alert.danger .badge-severity {
  background: rgba(220, 53, 69, 0.9);
}

/* Light/Dark mode */
body[data-theme="light"] .legend-item {
  color: #222;
}
body[data-theme="dark"] .legend-item {
  color: #fff;
}

/* Weather colors */
.legend-dot[data-weather="clearSunny"] {
  background: #ffcc00;
}
.legend-dot[data-weather="partlyCloudy"] {
  background: #ffd950;
}
.legend-dot[data-weather="mostlycloudy"] {
  background: #969696;
}
.legend-dot[data-weather="fog"] {
  background: #c8c8c8;
}
.legend-dot[data-weather="lightrain"] {
  background: #3296ff;
}
.legend-dot[data-weather="heavyrain"] {
  background: #005ac8;
}
.legend-dot[data-weather="lighsnow"] {
  background: #f0f8ff;
}
.legend-dot[data-weather="heavysnow"] {
  background: #e6f0ff;
}
.legend-dot[data-weather="ThunderStorm"] {
  background: #500078;
}
.legend-dot[data-weather="windy"] {
  background: #00a0ff;
}
.weather-day-card {
  border-radius: 16px;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}
.weather-day-card:hover {
  transform: translateY(-2px);
}

/* Glass card shell */
.map-glass {
  border-radius: 18px;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Toolbar pills */
.map-overlay-group {
  gap: 8px;
}
.map-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.1);
  color: #0f1115;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}
.map-pill i {
  font-size: 1rem;
}
.map-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.map-pill.active {
  background: rgba(72, 191, 83, 0.35); /* accent */
  border-color: rgba(72, 191, 83, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

/* Icon-only buttons */
.map-icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #0f1115;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}
.map-icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.map-icon-btn:active {
  transform: scale(0.97);
}

/* Footnote */
.map-footnote small {
  opacity: 0.8;
}
/* Small “chip” variant to pair with pills */
.map-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.1);
  color: #0f1115;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  font-size: 0.9rem;
}
.map-chip:hover {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.map-chip.active {
  background: rgba(72, 191, 83, 0.35);
  border-color: rgba(72, 191, 83, 0.55);
}

/* Loader bar */
.map-loader {
  height: 3px;
  width: 0%;
  margin: 4px 12px 0;
  background: linear-gradient(90deg, #48bf53, #91f086);
  border-radius: 999px;
  transition: width 0.35s ease;
  opacity: 0;
  transition: opacity 0.2s ease, width 0.35s ease;
}
.map-loader.show {
  opacity: 1;
  width: 100%;
}
/* -------- Map: responsive layout -------- */
.map-glass {
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
}

/* Toolbar wraps nicely and can scroll horizontally on tiny screens */
.map-toolbar {
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  overflow-x: auto; /* allow sideways scroll if too tight */
  -webkit-overflow-scrolling: touch;
}

/* Groups can wrap their buttons */
.map-overlay-group,
.map-model-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Pill / Chip / Icon sizes (base) */
.map-pill,
.map-chip {
  padding: 0.45rem 0.75rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.map-pill.active,
.map-chip.active {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.map-icon-btn {
  border: none;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.map-icon-btn:hover,
.map-pill:hover,
.map-chip:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

/* Loader bar stays pinned at top and scales */
.map-loader {
  height: 3px;
  margin: 0 0.75rem;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(120, 185, 255, 0.8),
    transparent
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}
.map-loader.show {
  opacity: 1;
}

/* Footnote stacks on mobile */
.map-footnote {
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* 🌐 Base glass footer */
.glass-footer {
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  background: rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1rem 0;
  text-align: center;
}

/* Footer text */
.footer-text {
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  color: #eee; /* default (dark mode) */
}

/* ====== Light Theme Base ====== */
body[data-theme="light"] {
  background-color: #eae6e1dc;
}

/* Glass Header + Brand + Buttons */
body[data-theme="light"] .ios-glass-header {
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 28px rgba(0, 0, 0, 0.14);
}
body[data-theme="light"] .ios-brand {
  color: #0f1115;
}
body[data-theme="light"] .ios-glass-btn {
  color: #0f1115;
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(0, 0, 0, 0.08);
}
body[data-theme="light"] .ios-glass-btn:hover {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Weather Cards + Search Bar */
body[data-theme="light"] .weather-card,
body[data-theme="light"] .search-bar {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.45),
    rgba(255, 255, 255, 0.25)
  );
  color: #222;
}
body[data-theme="light"] .search-bar .form-control,
body[data-theme="light"] .search-bar .btn {
  color: #222;
}
body[data-theme="light"] .search-bar .btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Notifications */
body[data-theme="light"] .weather-notifications {
  background: rgba(255, 255, 255, 0.15);
}
body[data-theme="light"] .weather-notifications ul li {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
body[data-theme="light"] .weather-notifications ul li:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Settings Panel */
body[data-theme="light"] .settings-panel {
  background: rgba(255, 255, 255, 0.55);
  color: #0f1115;
}
body[data-theme="light"] .settings-panel .form-control,
body[data-theme="light"] .settings-panel .form-select,
body[data-theme="light"] .settings-panel .btn {
  color: #0f1115;
}
body[data-theme="light"] .settings-panel .form-control::placeholder {
  color: rgba(15, 17, 21, 0.55);
}

/* Background Fog */
body[data-theme="light"] .bg-fog {
  background-blend-mode: multiply; /* use overlay for softer effect */
  height: 70vh;
  width: 100vw;
}

/* Hourly Forecast Shadows */
body[data-theme="light"] .hf-left {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.65), transparent);
}
body[data-theme="light"] .hf-right {
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.65), transparent);
}

/* Scrollbar */
body[data-theme="light"] .hf-scroller::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

/* Hourly Forecast Cards */
body[data-theme="light"] .hf-card {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
  color: #222;
}
body[data-theme="light"] .hf-card:hover {
  background: rgba(0, 0, 0, 0.08);
}
body[data-theme="light"] .hf-popbar {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}
body[data-theme="light"] .hf-wind {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

/* ===== LIGHT MODE ===== */
body[data-theme="light"] .glass-btn-group {
  background: rgba(0, 0, 0, 0.06); /* subtle contrast for light bg */
}

body[data-theme="light"] .glass-btn {
  background: rgba(0, 0, 0, 0.06);
  color: #222;
}

body[data-theme="light"] .glass-btn:hover {
  background: rgba(0, 0, 0, 0.14);
}

body[data-theme="light"] .glass-btn.active {
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15);
}

/* Light mode */
body[data-theme="light"] .hourly-forecast-title {
  color: #222; /* deep gray for contrast */
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  margin-bottom: 0;
  letter-spacing: 0.3px;
}
/* Light mode */
body[data-theme="light"] .legend-temp {
  background: #ff7a59; /* warm orange for temp */
}
body[data-theme="light"] .legend-pop {
  background: #4285f4; /* blue for precip */
}
body[data-theme="light"] .legend-wind {
  background: #7e57c2; /* purple for wind */
}

/* LIGHT MODE                    */
/* ============================= */
body[data-theme="light"] .weather-day-card {
  color: #222;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Weather Types - Light */
body[data-theme="light"] .weather-day-card[data-weather="clearSunny"] {
  background: rgba(255, 223, 80, 0.3);
  border-color: rgba(255, 204, 0, 0.5);
}

body[data-theme="light"] .weather-day-card[data-weather="fog"] {
  background: rgba(220, 220, 220, 0.4);
  border-color: rgba(180, 180, 180, 0.4);
}

body[data-theme="light"] .weather-day-card[data-weather="heavyrain"] {
  background: rgba(0, 90, 200, 0.2);
  border-color: rgba(0, 90, 200, 0.45);
  color: #fff;
}

body[data-theme="light"] .weather-day-card[data-weather="heavysnow"] {
  background: rgba(240, 250, 255, 0.6);
  border-color: rgba(180, 180, 180, 0.4);
}

body[data-theme="light"] .weather-day-card[data-weather="lightrain"] {
  background: rgba(50, 150, 255, 0.25);
  border-color: rgba(50, 150, 255, 0.45);
}

body[data-theme="light"] .weather-day-card[data-weather="lighsnow"] {
  background: rgba(250, 250, 255, 0.6);
  border-color: rgba(180, 180, 180, 0.4);
}

body[data-theme="light"] .weather-day-card[data-weather="mostlycloudy"] {
  background: rgba(200, 200, 200, 0.25);
  border-color: rgba(150, 150, 150, 0.4);
}

body[data-theme="light"] .weather-day-card[data-weather="partlyCloudy"] {
  background: linear-gradient(
    135deg,
    rgba(255, 223, 80, 0.25),
    rgba(200, 200, 200, 0.3)
  );
  border-color: rgba(150, 150, 150, 0.4);
}

body[data-theme="light"] .weather-day-card[data-weather="ThunderStorm"] {
  background: rgba(180, 120, 255, 0.25);
  border-color: rgba(150, 0, 200, 0.4);
  color: #fff;
}

body[data-theme="light"] .weather-day-card[data-weather="windy"] {
  background: rgba(0, 160, 255, 0.2);
  border-color: rgba(0, 160, 255, 0.4);
  color: #fff;
}

body[data-theme="light"] .text-body {
  color: #222;
}

/* Light theme */
body[data-theme="light"] .map-glass {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(0, 0, 0, 0.08);
}
body[data-theme="light"] .map-pill,
body[data-theme="light"] .map-icon-btn {
  color: #0f1115;
  background: rgba(0, 0, 0, 0.04);
}
body[data-theme="light"] .map-pill:hover,
body[data-theme="light"] .map-icon-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}
body[data-theme="light"] .map-pill.active {
  background: rgba(72, 191, 83, 0.2);
  border-color: rgba(72, 191, 83, 0.45);
}
/* Light/Dark */
body[data-theme="light"] .map-chip {
  color: #0f1115;
  background: rgba(0, 0, 0, 0.04);
}
body[data-theme="light"] .map-chip:hover {
  background: rgba(0, 0, 0, 0.08);
}
body[data-theme="light"] .map-chip.active {
  background: rgba(72, 191, 83, 0.2);
  border-color: rgba(72, 191, 83, 0.45);
}

body[data-theme="light"] .weather-alert.info {
  background: rgba(0, 123, 255, 0.12);
  border-color: rgba(0, 123, 255, 0.4);
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.15);
}
body[data-theme="light"] .weather-alert.info .badge-severity {
  background: rgba(0, 123, 255, 0.9);
}

body[data-theme="light"] .weather-alert.warning {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.4);
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.15);
}
body[data-theme="light"] .weather-alert.warning .badge-severity {
  background: rgba(255, 193, 7, 0.9);
  color: #000;
}

body[data-theme="light"] .weather-alert.danger {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.4);
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.15);
}
body[data-theme="light"] .weather-alert.danger .badge-severity {
  background: rgba(220, 53, 69, 0.9);
}

body[data-theme="light"] .weather-alert {
  color: #222; /* default text color */
}
body[data-theme="light"] .weather-alert h6 {
  color: #111;
}
body[data-theme="light"] .weather-alert p {
  color: #444;
}
body[data-theme="light"] .weather-alert .alert-meta {
  color: #666;
}

/* Severity colors - Light */
body[data-theme="light"] .weather-alert.info {
  background: rgba(0, 123, 255, 0.12);
  border-color: rgba(0, 123, 255, 0.4);
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.15);
}
body[data-theme="light"] .weather-alert.info .badge-severity {
  background: rgba(0, 123, 255, 0.9);
}

body[data-theme="light"] .weather-alert.warning {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.4);
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.15);
}
body[data-theme="light"] .weather-alert.warning .badge-severity {
  background: rgba(255, 193, 7, 0.9);
  color: #000;
}

body[data-theme="light"] .weather-alert.danger {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.4);
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.15);
}
body[data-theme="light"] .weather-alert.danger .badge-severity {
  background: rgba(220, 53, 69, 0.9);
}

body[data-theme="light"] .footer-text {
  color: #222;
}
body[data-theme="light"] .glass-footer {
  background: rgba(255, 255, 255, 0.65);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ====== Dark Theme Base ====== */
body[data-theme="dark"] {
  background-color: #2c2f36ea;
}

/* Glass Header + Brand + Buttons */
body[data-theme="dark"] .ios-glass-header {
  background: rgba(20, 20, 22, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 30px rgba(0, 0, 0, 0.35);
}
body[data-theme="dark"] .ios-brand {
  color: #f5f7fa;
}
body[data-theme="dark"] .ios-glass-btn {
  color: #f5f7fa;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}
body[data-theme="dark"] .ios-glass-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Weather Cards + Search Bar */
body[data-theme="dark"] .weather-card,
body[data-theme="dark"] .search-bar {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.1)
  );
  color: #fff;
}
body[data-theme="dark"] .search-bar .form-control,
body[data-theme="dark"] .search-bar .btn {
  color: #fff;
}

/* Notifications */
body[data-theme="dark"] .weather-notifications {
  background: rgba(30, 30, 30, 0.3);
}
body[data-theme="dark"] .weather-notifications ul li {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .weather-notifications ul li:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Settings Panel */
body[data-theme="dark"] .settings-panel {
  background: rgba(20, 20, 20, 0.55);
  color: #f5f7fa;
  border-left-color: rgba(255, 255, 255, 0.12);
}
body[data-theme="dark"] .sp-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .settings-panel .form-control,
body[data-theme="dark"] .settings-panel .form-select {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f5f7fa;
}
body[data-theme="dark"] .settings-panel .form-control::placeholder {
  color: rgba(245, 247, 250, 0.6);
}
body[data-theme="dark"] .settings-panel .form-control:focus,
body[data-theme="dark"] .settings-panel .form-select:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(120, 185, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(120, 185, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
body[data-theme="dark"] .settings-panel .btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #f5f7fa;
}
body[data-theme="dark"] .settings-panel .btn:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}
body[data-theme="dark"] .settings-panel .form-check-input {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.22);
}
body[data-theme="dark"] .settings-panel .form-check-input:checked {
  background-color: rgba(120, 185, 255, 0.9);
  border-color: rgba(120, 185, 255, 0.9);
}

/* Background Fog */
body[data-theme="dark"] .bg-fog {
  background-blend-mode: multiply;
  height: 70vh;
  width: 100vw;
}

body[data-theme="dark"] .glass-btn-group {
  background: rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .glass-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

body[data-theme="dark"] .glass-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

body[data-theme="dark"] .glass-btn.active {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.25);
}

body[data-theme="dark"] .hourly-forecast-title {
  color: #f5f5f5; /* soft white for readability */
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  margin-bottom: 0;
  letter-spacing: 0.3px;
}

body[data-theme="dark"] .legend-temp {
  background: #ff8b6b;
}
body[data-theme="dark"] .legend-pop {
  background: #5a97ff;
}
body[data-theme="dark"] .legend-wind {
  background: #9c7eff;
}

body[data-theme="dark"] .weather-day-card {
  color: #fff;
  background: rgba(40, 40, 40, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Weather Types - Dark */
body[data-theme="dark"] .weather-day-card[data-weather="clearSunny"] {
  background: rgba(255, 204, 0, 0.15);
  border-color: rgba(255, 204, 0, 0.3);
}

body[data-theme="dark"] .weather-day-card[data-weather="fog"] {
  background: rgba(180, 180, 180, 0.12);
  border-color: rgba(200, 200, 200, 0.25);
}

body[data-theme="dark"] .weather-day-card[data-weather="heavyrain"] {
  background: rgba(0, 90, 200, 0.18);
  border-color: rgba(0, 90, 200, 0.35);
}

body[data-theme="dark"] .weather-day-card[data-weather="heavysnow"] {
  background: rgba(230, 240, 255, 0.15);
  border-color: rgba(230, 240, 255, 0.35);
  color: #000;
}

body[data-theme="dark"] .weather-day-card[data-weather="lightrain"] {
  background: rgba(50, 150, 255, 0.15);
  border-color: rgba(50, 150, 255, 0.3);
}

body[data-theme="dark"] .weather-day-card[data-weather="lighsnow"] {
  background: rgba(240, 248, 255, 0.15);
  border-color: rgba(240, 248, 255, 0.3);
  color: #000;
}

body[data-theme="dark"] .weather-day-card[data-weather="mostlycloudy"] {
  background: rgba(140, 140, 140, 0.15);
  border-color: rgba(180, 180, 180, 0.3);
}

body[data-theme="dark"] .weather-day-card[data-weather="partlyCloudy"] {
  background: linear-gradient(
    135deg,
    rgba(255, 204, 0, 0.12),
    rgba(120, 120, 120, 0.15)
  );
  border-color: rgba(200, 200, 200, 0.25);
}

body[data-theme="dark"] .weather-day-card[data-weather="ThunderStorm"] {
  background: rgba(80, 0, 120, 0.25);
  border-color: rgba(150, 0, 200, 0.4);
}

body[data-theme="dark"] .weather-day-card[data-weather="windy"] {
  background: rgba(0, 160, 255, 0.15);
  border-color: rgba(0, 160, 255, 0.3);
}

body[data-theme="dark"] .text-body {
  color: rgb(255, 255, 255) !important;
}
body[data-theme="dark"] .map-heading {
  color: #f5f7fa;
}
body[data-theme="dark"] .map-glass {
  background: rgba(20, 20, 22, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
}
body[data-theme="dark"] .map-pill,
body[data-theme="dark"] .map-icon-btn {
  color: #f5f7fa;
  background: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .map-pill:hover,
body[data-theme="dark"] .map-icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
body[data-theme="dark"] .map-pill.active {
  background: rgba(72, 191, 83, 0.35);
  border-color: rgba(72, 191, 83, 0.55);
}

/* Slightly dim tiles in dark mode for contrast */
body[data-theme="dark"] .leaflet-tile,
body[data-theme="dark"] iframe {
  filter: none;
} /* keep Windy vivid */

body[data-theme="dark"] .map-chip {
  color: #f5f7fa;
  background: rgba(255, 255, 255, 0.1);
}
body[data-theme="dark"] .map-chip:hover {
  background: rgba(255, 255, 255, 0.16);
}
body[data-theme="dark"] .map-chip.active {
  background: rgba(72, 191, 83, 0.35);
  border-color: rgba(72, 191, 83, 0.55);
}
body[data-theme="dark"] .weather-alert.glass {
  border-color: rgba(255, 255, 255, 0.08);
}
body[data-theme="dark"] .weather-alert.info {
  background: rgba(0, 123, 255, 0.2);
  border-color: rgba(0, 123, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}
body[data-theme="dark"] .weather-alert.info .badge-severity {
  background: rgba(0, 123, 255, 0.95);
}

body[data-theme="dark"] .weather-alert.warning {
  background: rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.5);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.25);
}
body[data-theme="dark"] .weather-alert.warning .badge-severity {
  background: rgba(255, 193, 7, 0.95);
  color: #000;
}

body[data-theme="dark"] .weather-alert.danger {
  background: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.5);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}
body[data-theme="dark"] .weather-alert.danger .badge-severity {
  background: rgba(220, 53, 69, 0.95);
}
body[data-theme="dark"] .weather-alert {
  color: #eee; /* default text color */
}
body[data-theme="dark"] .weather-alert h6 {
  color: #fff;
}
body[data-theme="dark"] .weather-alert p {
  color: #ccc;
}
body[data-theme="dark"] .weather-alert .alert-meta {
  color: #aaa;
}

/* Severity colors - Dark */
body[data-theme="dark"] .weather-alert.info {
  background: rgba(0, 123, 255, 0.2);
  border-color: rgba(0, 123, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}
body[data-theme="dark"] .weather-alert.info .badge-severity {
  background: rgba(0, 123, 255, 0.95);
}

body[data-theme="dark"] .weather-alert.warning {
  background: rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.5);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.25);
}
body[data-theme="dark"] .weather-alert.warning .badge-severity {
  background: rgba(255, 193, 7, 0.95);
  color: #000;
}

body[data-theme="dark"] .weather-alert.danger {
  background: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.5);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}
body[data-theme="dark"] .weather-alert.danger .badge-severity {
  background: rgba(220, 53, 69, 0.95);
}
body[data-theme="dark"] .footer-text {
  color: #f1f1f1;
}
body[data-theme="dark"] .glass-footer {
  background: rgba(18, 18, 18, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
@media (min-width: 992px) {
  .border-lg-end {
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
  }
  .hf-card {
    width: 90px;
  }
  .hf-scroller {
    gap: 1rem;
  }
}
@media (max-width: 576.98px) {
  .hourly-forecast-title {
    font-size: 1rem;
  }
  .hf-card {
    width: 70px;
    padding: 0.45rem 0.3rem;
    font-size: 0.8rem;
  }
  .hf-scroller {
    gap: 0.75rem;
  }
  .hf-shadow {
    display: none !important;
  } /* avoid overlay shadows on small */
}

/* Tablets */
@media (min-width: 577px) and (max-width: 991.98px) {
  .hf-card {
    width: 80px;
  }
}
