/**
 * Met Office–inspired layout on top of the Crip dark/cyan theme.
 * Cleaner sections, official warnings prominence, observation-style hero.
 */

:root {
    --mo-amber: #f5c842;
    --mo-amber-bg: rgba(245, 200, 66, 0.12);
    --mo-red: #e84855;
    --mo-red-bg: rgba(232, 72, 85, 0.14);
    --mo-section-bar: var(--cyan);
    --mo-radius: 10px;
}

/* Calmer backdrop — less “tech grid”, more forecast service */
body.has-weather-scene .grid-overlay {
    opacity: 0.06;
    background-size: 72px 72px;
}

body.has-weather-scene .glow-overlay {
    background: radial-gradient(ellipse at 50% 0%, transparent 20%, rgba(0, 0, 0, 0.55) 100%);
}

/* Institutional header */
.top-bar {
    border-bottom: 1px solid rgba(0, 190, 255, 0.12);
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.logo-section h1 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.logo-section p {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.app-version-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    margin-top: 4px;
    border-radius: 999px;
    border: 1px solid rgba(0, 212, 255, 0.25);
    background: rgba(0, 212, 255, 0.06);
    color: var(--cyan-dim);
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.app-intro {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(220, 232, 248, 0.88);
    border-left: 3px solid var(--mo-section-bar);
    padding-left: 14px;
    margin-bottom: 14px;
}

/* Met Office section headings */
.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    text-transform: uppercase;
}

.card-title::before {
    content: "";
    width: 4px;
    height: 1.1em;
    border-radius: 2px;
    background: var(--mo-section-bar);
    flex-shrink: 0;
}

.section-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cyan-dim);
    margin-bottom: 6px;
}

/* Observation panel (current weather) */
.weather-card-hero {
    border-radius: var(--mo-radius);
    padding: 20px 22px 18px;
}

.weather-card-hero .card-header-row {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 190, 255, 0.1);
}

.location {
    justify-content: flex-start;
    text-align: left;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.weather-hero {
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 8px;
}

.temp-main {
    font-size: clamp(64px, 12vw, 88px);
    color: #fff;
}

.condition {
    text-align: left;
    font-size: 18px;
    font-weight: 500;
    color: rgba(230, 240, 255, 0.95);
    margin-bottom: 16px;
}

.current-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.current-details .detail-item {
    background: rgba(0, 18, 40, 0.5);
    border: 1px solid rgba(0, 190, 255, 0.1);
    border-radius: 8px;
    padding: 10px 10px;
}

.current-details .detail-label {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.current-details .detail-value {
    font-size: 15px;
    font-weight: 600;
}

.sun-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 190, 255, 0.1);
}

.sun-block {
    background: rgba(0, 18, 40, 0.45);
    border: 1px solid rgba(0, 190, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
}

.live-badge {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.28);
    color: #e8f4ff;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: none;
}

.live-badge::before {
    background: #3dffa8;
    box-shadow: 0 0 8px rgba(61, 255, 168, 0.55);
}

/* Official warnings — Met Office amber/red strip */
.alerts-panel {
    border-radius: var(--mo-radius);
    border-left: 4px solid var(--mo-amber);
    background: linear-gradient(90deg, var(--mo-amber-bg), rgba(8, 20, 44, 0.92));
}

.alerts-panel .card-title {
    color: var(--mo-amber);
}

.alerts-panel .card-title::before {
    background: var(--mo-amber);
}

.alert-item {
    border-radius: 8px;
    border-left: 3px solid var(--mo-amber);
    background: rgba(8, 16, 32, 0.65);
}

.alert-item.alert-moderate {
    border-left-color: var(--mo-amber);
}

.alert-item.alert-severe {
    border-left-color: #ff8c2a;
    background: rgba(255, 140, 40, 0.08);
}

.alert-item.alert-extreme {
    border-left-color: var(--mo-red);
    background: var(--mo-red-bg);
}

.alert-source {
    color: var(--mo-amber);
}

.alert-item.alert-extreme .alert-source,
.alert-item.alert-severe .alert-source {
    color: #ff9f7a;
}

/* Forecast table — cleaner Met Office outlook */
.forecast-card,
.hourly-card,
.radar-card {
    border-radius: var(--mo-radius);
}

.forecast-table th {
    background: rgba(0, 25, 55, 0.55);
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 0.1em;
    border-bottom: 2px solid rgba(0, 190, 255, 0.15);
}

.forecast-table tbody tr {
    transition: background 0.15s ease;
}

.forecast-table tbody tr:nth-child(even) {
    background: rgba(0, 20, 45, 0.25);
}

.forecast-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.06);
}

.forecast-table td[data-label="Day"],
.forecast-table td:first-child {
    font-weight: 600;
    color: #fff;
}

.forecast-precip {
    font-weight: 600;
    color: var(--cyan-dim);
}

/* Radar — service panel */
.radar-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 14px;
    border-left: 2px solid rgba(0, 190, 255, 0.2);
}

.official-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.source-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 190, 255, 0.18);
    background: rgba(0, 20, 45, 0.45);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
}

.source-pill i {
    color: var(--cyan);
    font-size: 10px;
}

.source-pill strong {
    color: var(--text-primary);
    font-weight: 600;
}

.weather-card {
    border-radius: var(--mo-radius);
}

/* Footer — institutional */
.footer-data::before {
    content: "Data sources · ";
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .location {
        justify-content: center;
        text-align: center;
    }

    .weather-hero {
        justify-content: center;
        flex-wrap: wrap;
    }

    .condition {
        text-align: center;
    }

    .current-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .official-sources {
        padding: 0 12px;
    }

    .app-intro {
        margin: 0 12px 12px;
    }
}

@media (min-width: 900px) {
    .content-grid {
        gap: 16px;
    }

    .weather-card-hero {
        grid-column: 1 / -1;
    }

    .alerts-panel:not(.hidden) {
        grid-column: 1 / -1;
    }
}
