/* ===================================================================
   Wetter-Widget — Design H (Two-Column Layout)
   =================================================================== */

/* Loading */
.w-loading {
  text-align: center; padding: 3rem 1rem;
  color: var(--text-dim); font-size: 0.85rem;
}
.w-spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: wh-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes wh-spin { to { transform: rotate(360deg); } }

/* Flyability dots */
.fly-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.fly-dot--good { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.4); }
.fly-dot--moderate { background: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,0.4); }
.fly-dot--bad { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.4); }

/* Wind arrow */
.wind-arrow {
  display: inline-block; width: 14px; height: 14px;
  margin-left: 0.2rem; vertical-align: -2px; color: var(--accent);
}

/* Two-column layout */
.wh {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 0;
}

/* === LEFT: Hero === */
.wh-hero {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 60%, var(--accent-glow) 100%);
  border: 1px solid var(--border);
  border-radius: 14px 0 0 14px;
  padding: 2.5rem 2rem;
  display: flex; flex-direction: column; gap: 1.5rem;
  position: relative; overflow: hidden;
  transition: border-color 0.4s;
}
.wh-hero:hover { border-color: var(--accent); }
.wh-hero::after {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  transition: width 0.4s, height 0.4s, opacity 0.4s;
}
.wh-hero:hover::after {
  width: 300px; height: 300px; opacity: 0.8;
}

/* Hero top row: icon + info */
.wh-hero-top {
  display: flex; align-items: center; gap: 1.5rem;
  position: relative; z-index: 1;
}

/* Weather icon */
.wh-icon {
  width: 80px; height: 80px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 16px;
  color: var(--accent);
}
.wh-icon svg { width: 44px; height: 44px; }

/* Info block */
.wh-loc {
  font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.08em; display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.5rem;
}
.wh-loc svg { width: 11px; height: 11px; color: var(--accent); }
.wh-temp {
  font-family: var(--heading); font-size: 3.5rem; font-weight: 700;
  letter-spacing: -0.04em; line-height: 1;
}
.wh-temp small { font-size: 1.5rem; font-weight: 400; color: var(--text-mid); }
.wh-desc { font-size: 0.9rem; color: var(--text-mid); margin-top: 0.25rem; }

/* Flyability pill */
.wh-fly {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 0.75rem; padding: 0.35rem 0.75rem; border-radius: 20px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  border: 1px solid var(--border);
  font-size: 0.7rem; font-weight: 500; color: var(--text-mid);
}
.wh-fly strong { color: var(--text); }
.wh-fly .fly-dot { width: 8px; height: 8px; }

/* Stats row below hero content */
.wh-stats {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  position: relative; z-index: 1;
  margin-top: auto;
}
.wh-sr { display: flex; align-items: center; gap: 0.5rem; }
.wh-sr svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.wh-sr-lbl { font-size: 0.6rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; min-width: 55px; }
.wh-sr-val { font-family: var(--heading); font-size: 0.85rem; font-weight: 600; white-space: nowrap; }

/* === RIGHT: Forecast cards === */
.wh-fc {
  display: flex; flex-direction: column;
}
.wh-fc-day {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border); border-left: none;
  border-bottom: none;
  padding: 1.25rem 1.5rem;
  display: grid; grid-template-columns: auto 1fr;
  align-items: center; gap: 0.4rem 1.25rem;
  transition: background 0.3s;
}
.wh-fc-day:first-child { border-radius: 0 14px 0 0; }
.wh-fc-day:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 14px 0; }
.wh-fc-day:hover { background: var(--surface-2); }

/* Left: date + temps stacked */
.wh-fc-left {
  display: flex; flex-direction: column; justify-content: center;
}
.wh-fc-name {
  font-family: var(--heading); font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.wh-fc-temps { font-family: var(--heading); font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.wh-fc-temps span { font-weight: 400; color: var(--text-dim); font-size: 1rem; }

/* Icon below temps */
.wh-fc-ico { width: 32px; height: 32px; color: var(--accent); margin-top: 0.35rem; }
.wh-fc-ico svg { width: 100%; height: 100%; }

/* Right: desc + meta + flyability */
.wh-fc-details {
  display: flex; flex-direction: column; gap: 0.2rem;
}
.wh-fc-desc { font-size: 0.75rem; color: var(--text-mid); }
.wh-fc-meta {
  font-size: 0.7rem; color: var(--text-dim); line-height: 1.5;
  display: flex; gap: 0.75rem; flex-wrap: wrap;
}
.wh-fc-meta svg { width: 11px; height: 11px; color: var(--accent); vertical-align: -2px; margin-right: 0.1rem; }
.wh-fc-fly {
  display: flex; align-items: center; gap: 0.25rem;
  margin-top: 0.1rem;
}
.wh-fc-fly span { font-size: 0.65rem; color: var(--text-dim); }
.wh-fc-fly .fly-dot { width: 6px; height: 6px; }

/* === Mobile: stack vertically === */
@media (max-width: 768px) {
  .wh {
    grid-template-columns: 1fr;
  }
  .wh-hero {
    border-radius: 14px 14px 0 0;
    padding: 1.75rem 1.5rem;
  }
  .wh-hero-top { gap: 1.25rem; }
  .wh-temp { font-size: 2.75rem; }
  .wh-stats { gap: 0.5rem 1.25rem; }
  .wh-fc-day {
    border-left: 1px solid var(--border);
  }
  .wh-fc-day:first-child { border-radius: 0; }
  .wh-fc-day:last-child { border-radius: 0 0 14px 14px; }
}

@media (max-width: 480px) {
  .wh-hero-top { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .wh-fc-day {
    grid-template-columns: auto 1fr;
    gap: 0.4rem 0.75rem;
  }
  .wh-fc-ico { display: none; }
  .wh-fc-left { flex-direction: row; align-items: baseline; gap: 0.5rem; }
  .wh-fc-details { grid-column: 1 / -1; }
}
