/* ===================================================
   Weather Forecast — weather.css
   =================================================== */

/* ── Location Prompt ── */
.wx-prompt { text-align: center; padding: 48px 20px; }
.wx-prompt-icon { font-size: 2.5rem; color: var(--color-primary); margin-bottom: 16px; }
.wx-prompt-title { font-family: var(--font-display); font-size: 1.3rem; color: var(--gray-800); margin: 0 0 8px; }
.wx-prompt-desc { font-size: 0.82rem; color: var(--gray-500); margin: 0 0 24px; line-height: 1.5; max-width: 300px; margin-left: auto; margin-right: auto; }

.wx-locate-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--color-primary); color: #fff; border: none; border-radius: var(--radius-full); padding: 12px 28px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all var(--transition-base); }
.wx-locate-btn:active { transform: scale(0.97); }
.wx-locate-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.wx-prompt-or { font-size: 0.72rem; color: var(--gray-400); margin: 18px 0 12px; text-transform: uppercase; letter-spacing: 0.5px; }

.wx-manual-input { display: flex; gap: 8px; max-width: 340px; margin: 0 auto; }
.wx-manual-input input { flex: 1; min-width: 0; border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 10px 12px; font-size: 0.82rem; color: var(--gray-700); background: var(--gray-50); transition: border-color var(--transition-fast); }
.wx-manual-input input:focus { outline: none; border-color: var(--color-primary); background: #fff; }
.wx-manual-btn { flex-shrink: 0; background: var(--gray-800); color: #fff; border: none; border-radius: var(--radius-md); padding: 10px 16px; font-size: 0.82rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all var(--transition-base); }
.wx-manual-btn:active { transform: scale(0.97); }

.wx-error { color: #dc2626; font-size: 0.78rem; margin: 14px 0 0; background: rgba(220,38,38,0.06); padding: 10px 14px; border-radius: var(--radius-md); }

/* ── Loading Skeleton ── */
.wx-loading { padding: 0; }
.wx-skeleton-hero { height: 240px; border-radius: var(--radius-xl); background: linear-gradient(145deg, #d1d5db, #e5e7eb); animation: wx-pulse 1.5s ease-in-out infinite; margin-bottom: 16px; }
.wx-skeleton-row { height: 80px; border-radius: var(--radius-lg); background: var(--gray-100); animation: wx-pulse 1.5s ease-in-out infinite; margin-bottom: 8px; }
.wx-skeleton-row.short { width: 60%; }
@keyframes wx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── Hero ── */
.wx-hero { background: linear-gradient(145deg, #0c4a6e, #0369a1); color: #fff; border-radius: var(--radius-xl); padding: 20px; margin-bottom: 14px; }
.wx-hero-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.wx-hero-left { flex: 1; }

/* Location + updated on same line */
.wx-location-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.wx-location { font-size: 0.75rem; opacity: 0.85; margin: 0; display: flex; align-items: center; gap: 6px; }
.wx-updated { font-size: 0.62rem; opacity: 0.55; margin: 0; display: flex; align-items: center; gap: 4px; white-space: nowrap; }

.wx-hero-icon { font-size: 3rem; opacity: 0.9; flex-shrink: 0; }
.wx-temp-row { display: flex; align-items: center; gap: 14px; }
.wx-temp { font-size: 3.5rem; font-weight: 700; line-height: 1; }
.wx-condition { font-size: 0.95rem; font-weight: 600; margin: 0 0 2px; }
.wx-feels { font-size: 0.72rem; opacity: 0.75; margin: 0; }

.wx-details-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.wx-detail-chip { display: flex; flex-direction: column; align-items: center; gap: 1px; background: rgba(255,255,255,0.12); border-radius: var(--radius-md); padding: 8px 12px; flex: 1; min-width: 60px; }
.wx-detail-chip i { font-size: 0.8rem; opacity: 0.8; }
.wx-detail-chip span { font-size: 0.9rem; font-weight: 700; }
.wx-detail-chip small { font-size: 0.6rem; opacity: 0.7; text-align: center; }

.wx-spray-band { display: flex; align-items: center; gap: 8px; border-radius: var(--radius-md); padding: 10px 14px; font-size: 0.82rem; font-weight: 600; margin-bottom: 12px; }
.wx-spray-band.safe { background: rgba(34,197,94,0.2); color: #bbf7d0; }
.wx-spray-band.unsafe { background: rgba(239,68,68,0.2); color: #fca5a5; }
.wx-spray-band.marginal { background: rgba(234,179,8,0.2); color: #fde68a; }

/* Labelled action buttons */
.wx-hero-actions { display: flex; gap: 8px; }
.wx-action-btn { background: rgba(255,255,255,0.15); border: none; color: #fff; border-radius: var(--radius-full); height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em; transition: all var(--transition-fast); }
.wx-action-btn:active { transform: scale(0.94); background: rgba(255,255,255,0.25); }
.wx-action-btn span { font-size: 0.72rem; font-weight: 600; }

/* ── Today's Action Card ── */
.wx-action-card { margin-bottom: 14px; }
.wx-action-inner { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-radius: var(--radius-lg); border-left: 4px solid; box-shadow: var(--shadow-xs); }
.wx-action-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }
.wx-action-body { flex: 1; }
.wx-action-title { font-size: 0.9rem; font-weight: 700; margin: 0 0 3px; }
.wx-action-sub { font-size: 0.78rem; color: var(--gray-600); margin: 0; line-height: 1.55; }

/* ── Alerts ── */
.wx-alerts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.wx-alert-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--radius-md); border-left: 3px solid; }
.wx-alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.wx-alert-title { font-size: 0.85rem; font-weight: 700; margin: 0 0 3px; }
.wx-alert-msg { font-size: 0.78rem; color: var(--gray-600); margin: 0; line-height: 1.5; }

/* ── Section header ── */
.wx-section-hdr { margin: 4px 0 12px; display: flex; justify-content: space-between; align-items: center; }
.wx-section-hdr h2 { font-size: 0.9rem; font-weight: 700; color: var(--gray-700); margin: 0; display: flex; align-items: center; gap: 8px; }
.wx-section-location { font-size: 0.7rem; font-weight: 600; color: var(--gray-500); display: inline-flex; align-items: center; gap: 3px; }
.wx-section-location i { font-size: 0.6rem; color: var(--color-accent, #e8b84b); }

/* ── 24-hour strip ── */
.wx-hourly-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.wx-hourly-strip::-webkit-scrollbar { display: none; }

.wx-hour-card { flex: 0 0 60px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border: 1px solid rgba(0,0,0,0.05); border-radius: var(--radius-lg); padding: 10px 6px 8px; scroll-snap-align: start; box-shadow: var(--shadow-xs); }
.wx-hour-card.spray-ok { border-color: rgba(22,163,74,0.25); }

.wx-hr-time { font-size: 0.65rem; font-weight: 700; color: var(--gray-500); margin: 0; }
.wx-hr-icon { font-size: 1.05rem; color: var(--color-accent); }
.wx-hr-temp { font-size: 0.8rem; font-weight: 700; color: var(--gray-800); margin: 0; }
.wx-hr-rain { font-size: 0.6rem; color: #1d4ed8; margin: 0; display: flex; align-items: center; gap: 2px; min-height: 14px; }
.wx-hr-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.wx-hr-dot.safe   { background: #22c55e; }
.wx-hr-dot.unsafe { background: #ef4444; }

/* ── Forecast list ── */
.wx-forecast-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.wx-day-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid rgba(0, 0, 0, 0.04); border-radius: var(--radius-lg); padding: 12px 14px; box-shadow: var(--shadow-xs); }
.wx-day-card.no-spray { border-left: 3px solid #ef4444; }

.wx-day-left { min-width: 44px; }
.wx-day-label { font-size: 0.78rem; font-weight: 700; color: var(--gray-800); margin: 0; }
.wx-day-date { font-size: 0.65rem; color: var(--gray-400); margin: 0; }

.wx-day-icon { font-size: 1.4rem; color: var(--color-accent); width: 32px; text-align: center; flex-shrink: 0; }

.wx-day-center { flex: 1; }
.wx-day-condition { font-size: 0.8rem; font-weight: 600; color: var(--gray-700); margin: 0 0 5px; }
.wx-day-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.wx-chip { font-size: 0.65rem; font-weight: 500; padding: 2px 7px; border-radius: 20px; background: var(--gray-50); border: 1px solid var(--gray-100); color: var(--gray-500); display: inline-flex; align-items: center; gap: 3px; }
.wx-chip.hum { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.wx-chip.wind { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.wx-chip.rain { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }

/* Larger spray pills on forecast cards — readable on phone in sunlight */
.wx-spray-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.wx-spray-pill.safe { background: rgba(34,197,94,0.14); color: #15803d; }
.wx-spray-pill.unsafe { background: rgba(239,68,68,0.12); color: #b91c1c; }

.wx-day-temps { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.wx-high { font-size: 0.95rem; font-weight: 700; color: var(--gray-800); }
.wx-low { font-size: 0.78rem; color: var(--gray-400); }

/* ── Disclaimer ── */
.wx-disclaimer { font-size: 0.72rem; color: var(--gray-400); line-height: 1.6; padding: 10px 14px; background: white; border-radius: var(--radius-md); border: 1px solid rgba(0, 0, 0, 0.04); margin-bottom: 20px; display: flex; gap: 8px; box-shadow: var(--shadow-xs); }
.wx-disclaimer i { flex-shrink: 0; margin-top: 2px; }

/* ── Tablet ──────────────────────────────── */
@media (min-width: 600px) {
    .wx-hero { padding: 24px 28px; }
    .wx-details-row { flex-wrap: nowrap; gap: 12px; }
    .wx-detail-chip { min-width: 0; padding: 10px 14px; }
    .wx-detail-chip span { font-size: 0.95rem; }
    .wx-forecast-list { gap: 10px; }
    .wx-day-card { padding: 14px 18px; gap: 14px; }
    .wx-day-condition { font-size: 0.85rem; }
    .wx-alerts { flex-direction: row; flex-wrap: wrap; }
    .wx-alert-card { flex: 1; min-width: 200px; }
    .wx-spray-band { font-size: 0.85rem; padding: 11px 16px; }
    .wx-hour-card { flex: 0 0 68px; padding: 10px 8px; }
    .wx-action-icon { font-size: 1.6rem; }
    .wx-action-title { font-size: 0.95rem; }
}

/* ── Desktop ─────────────────────────────── */
@media (min-width: 1024px) {
    .wx-hero { padding: 28px 32px; border-radius: var(--radius-xl); }
    .wx-hero-top { margin-bottom: 10px; }
    .wx-temp { font-size: 4rem; }
    .wx-condition { font-size: 1.05rem; }
    .wx-details-row { flex-wrap: nowrap; gap: 14px; }
    .wx-detail-chip { min-width: 0; padding: 12px 16px; }
    .wx-detail-chip span { font-size: 1.05rem; }
    .wx-forecast-list { display: flex; flex-direction: column; gap: 10px; }
    .wx-day-card { padding: 14px 20px; gap: 16px; transition: box-shadow var(--transition-base), transform var(--transition-spring); }
    .wx-day-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
    .wx-day-condition { font-size: 0.88rem; }
    .wx-high { font-size: 1.05rem; }
    .wx-spray-band { font-size: 0.88rem; padding: 12px 18px; }
    .wx-prompt-desc { max-width: 440px; }
    .wx-manual-input { max-width: 460px; }
    .wx-action-btn:hover { background: rgba(255,255,255,0.25); }
    .wx-section-hdr h2 { font-size: 1rem; }
    .wx-hour-card { flex: 0 0 72px; }
    .wx-action-inner { padding: 16px 20px; }
}
