/* /weather/ - a deliberate one-off dark page (js/weather.js renders it,
   server/views/weather.ejs is just the shell) - every other page on the
   site is the light beige/blue theme from css/common.css; this one isn't,
   so colours are hardcoded here rather than pulled from the shared
   --text-dark/--text-light tokens that assume a light background. */

body.weather-body {
    background: linear-gradient(180deg, #3a4150 0%, #565f72 45%, #7c8598 100%);
    background-attachment: fixed;
}

.weather-app-container {
    background: transparent;
    box-shadow: none;
    padding-bottom: 40px;
}

.weather-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 20px 6px;
    color: #fff;
    background: transparent; /* css/common.css's bare `header {}` rule defaults every <header> to a white card background - this page needs the dark gradient to show through instead */
    text-align: left;
}
.weather-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.weather-header-text h1 {
    font-size: 1.5rem;
    font-weight: 600;
}
.weather-header-text p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
}

#weather-content {
    padding: 8px 20px 0;
}

.weather-loading {
    color: rgba(255,255,255,0.75);
    text-align: center;
    padding: 40px 0;
}

/* ---- Hero ---- */

.weather-hero {
    text-align: center;
    color: #fff;
    padding: 18px 0 6px;
}
.weather-hero-condition {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 6px;
}
.weather-hero-temp {
    font-size: 5.5rem;
    font-weight: 300;
    line-height: 1;
    margin: 6px 0;
}
.weather-hero-hilo {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

/* This site's own layer on top of a generic forecast (server/weather/
   forHumans.js) - practical, scannable chips rather than a data card, so
   they read as "worth noticing" rather than one more stat among many. */
.weather-notes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 6px;
}
.weather-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.82rem;
    color: #fff;
}

/* ---- Shared dark card ---- */

.weather-card {
    background: #0c0d10;
    border-radius: 26px;
    padding: 18px 18px 16px;
    margin: 16px 0;
    color: #fff;
}
.weather-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 14px;
}
.weather-card-head-center { justify-content: center; }

/* ---- How it feels ---- */

.weather-feels-card {
    text-align: center;
}
.weather-feels-value {
    font-size: 2.75rem;
    font-weight: 300;
    line-height: 1;
    margin: 4px 0 8px;
}
.weather-feels-caption {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

/* ---- Hourly strip ---- */

.weather-hourly-strip {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 2px;
}
.weather-hour-col {
    flex: 0 0 auto;
    text-align: center;
    min-width: 34px;
}
.weather-hour-temp { font-weight: 600; font-size: 0.95rem; }
.weather-hour-icon { font-size: 1.3rem; margin: 6px 0; }
.weather-hour-rain { font-size: 0.72rem; color: #6fb3ff; min-height: 1em; }
.weather-hour-time { font-size: 0.72rem; color: rgba(255,255,255,0.6); margin-top: 6px; }

/* ---- 10-day strip ---- */

.weather-daily-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 6px;
}
.weather-day-pill {
    flex: 0 0 auto;
    width: 78px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 40px;
    padding: 14px 6px;
    text-align: center;
}
.weather-day-temps { font-size: 0.85rem; }
.weather-day-temps strong { display: block; font-size: 1rem; }
.weather-day-temps span { color: rgba(255,255,255,0.55); }
.weather-day-icon { font-size: 1.3rem; margin: 8px 0; }
.weather-day-rain { font-size: 0.72rem; color: #6fb3ff; min-height: 1em; }
.weather-day-label { font-size: 0.72rem; color: rgba(255,255,255,0.65); margin-top: 10px; line-height: 1.4; }

/* ---- Map ---- */

.weather-map-card .map-preview-wrap { margin-bottom: 0; }
.weather-map-canvas { height: 170px; }

/* ---- Stat tile grid ---- */

.weather-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 16px 0;
}

.weather-tile {
    background: #0c0d10;
    color: #fff;
    padding: 18px;
    position: relative;
    overflow: hidden;
}
.weather-tile-square { border-radius: 26px; }
.weather-tile-circle {
    border-radius: 50%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.weather-tile-circle .weather-tile-head { justify-content: center; margin-bottom: 6px; font-size: 0.85rem; }

.weather-tile-head { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.9); }
.weather-tile-value { font-size: 2.1rem; font-weight: 300; line-height: 1.1; margin-top: 6px; }
.weather-tile-unit { font-size: 1rem; font-weight: 400; margin-left: 2px; color: rgba(255,255,255,0.7); }
.weather-tile-caption { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-top: 6px; }

/* Wind/Visibility - a soft decorative blob rather than a real gauge (no
   scale to visualise for those two), matching the screenshot's warm
   circular backdrops without pretending to be a chart. */
.weather-tile-blob::before {
    content: '';
    position: absolute;
    inset: -10%;
    background: radial-gradient(circle at 50% 55%, rgba(120, 60, 60, 0.55), transparent 70%);
    z-index: 0;
}
.weather-tile-blob .weather-tile-head,
.weather-tile-blob .weather-tile-value,
.weather-tile-blob .weather-tile-caption { position: relative; z-index: 1; }

/* UV index - dots instead of a second caption line spelling out the band. */
.weather-uv-dots { display: flex; gap: 6px; margin-top: 10px; }
.weather-uv-dot { width: 8px; height: 8px; border-radius: 50%; opacity: 0.35; }
.weather-uv-dot.active { opacity: 1; box-shadow: 0 0 0 3px rgba(255,255,255,0.15); }

/* Air quality - a fixed 5-band gradient bar with a marker at the current
   DAQI position (server/weather/bands.js), same idea as the UV dots but
   as a continuous scale since DAQI has 10 discrete steps, not 5. */
.weather-aq-bar {
    position: relative;
    height: 6px;
    border-radius: 3px;
    margin-top: 10px;
    background: linear-gradient(to right, #4caf50, #cddc39, #ff9800, #e53935, #8e24aa);
}
.weather-aq-marker {
    position: absolute;
    top: 50%;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #0c0d10;
    transform: translate(-50%, -50%);
}

/* Humidity - a rising fill from the bottom of the card, height set inline
   per-reading (js/weather.js). */
.weather-tile-fill { padding: 0; }
.weather-fill {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(120, 60, 60, 0.8), rgba(120, 60, 60, 0.25));
    z-index: 0;
}
.weather-tile-content { position: relative; z-index: 1; padding: 18px; }
.weather-tile-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    margin-top: 10px;
}
.weather-tile-pill span { color: rgba(255,255,255,0.7); }

/* Pressure - a conic-gradient ring (background, set inline) around an
   inner solid circle, giving a gauge look without a canvas/SVG dependency. */
.weather-tile-ring { padding: 8px; }
.weather-tile-ring-inner {
    background: #0c0d10;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Sunrise/sunset */
.weather-sun-arc {
    text-align: center;
    font-size: 1.6rem;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
}
.weather-sun-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
}

/* ---- Pollen ---- */

.weather-pollen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}
.weather-pollen-ring {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    padding: 6px;
    margin: 0 auto 10px;
}
.weather-pollen-ring-inner {
    background: #0c0d10;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.85);
}
.weather-pollen-ring-inner span:first-child { font-size: 1.2rem; }
.weather-pollen-level { font-weight: 600; font-size: 0.9rem; }
.weather-pollen-band { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 2px; }

/* ---- Credit ---- */

.weather-credit {
    text-align: center;
    margin: 22px 0 10px;
}
.weather-credit a {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    text-decoration: underline;
}

@media (min-width: 520px) {
    .weather-tiles { grid-template-columns: repeat(4, 1fr); }
    .weather-pollen-grid { max-width: 420px; margin: 0 auto; }
}
