/* weather-forecast.css v2-r4 */

/* ── Search bar ───────────────────────────────────────── */
.weather-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.weather-search .input {
  flex: 1;
  font-size: 0.95rem;
}

/* ── Loading state ────────────────────────────────────── */
.weather-loading {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: none;
}

/* ── Error bar ────────────────────────────────────────── */
.weather-error {
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(220,38,38,0.3);
  background: rgba(220,38,38,0.05);
  font-size: 0.82rem;
  color: #dc2626;
  display: none;
  margin-bottom: 0.75rem;
}

/* ── Location header ──────────────────────────────────── */
.weather-location {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.15rem;
  display: none;
}

.weather-location-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: none;
}

/* ── Current conditions block ─────────────────────────── */
.weather-current {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1.5rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  border-color: rgba(37,99,235,0.25);
  margin-bottom: 0.85rem;
  display: none;
}

.weather-temp-main {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.weather-temp-unit {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-muted);
}

.weather-current-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.weather-current-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.weather-current-range {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.weather-current-condition {
  font-size: 1rem;
  font-weight: 600;
}

/* ── Stat row (humidity, precip, AQI) ────────────────── */
.weather-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  display: none;
}

@media (max-width: 480px) { .weather-stats { grid-template-columns: 1fr 1fr; } }

.weather-stat-block {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  background: #fcfcfc;
}

.weather-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.weather-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── 7-day forecast grid ──────────────────────────────── */
.forecast-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: none;
}

.forecast-grid-wrap {
  overflow-x: auto;
  margin-bottom: 0.85rem;
  -webkit-overflow-scrolling: touch;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(82px, 1fr));
  gap: 0.45rem;
  min-width: 560px;
}

.forecast-day-block {
  border: 1px solid var(--border);
  background: #fcfcfc;
  padding: 0.55rem 0.45rem;
  text-align: center;
}

.forecast-day-block.today {
  border-color: rgba(37,99,235,0.3);
  background: var(--accent-soft);
}

.forecast-day-name {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.forecast-high {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}

.forecast-low {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.forecast-precip {
  font-size: 0.68rem;
  color: #2563eb;
  margin-top: 0.25rem;
}

.forecast-condition {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.3;
}

/* ── Warnings ─────────────────────────────────────────── */
.weather-warnings {
  display: none;
}

.warning-block {
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(220,38,38,0.35);
  background: rgba(220,38,38,0.04);
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.warning-event {
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
}

.warning-detail { color: var(--text-muted); }

/* ── Attribution ──────────────────────────────────────── */
.weather-attribution {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  display: none;
}
