/* ── Ecowitt Airfield Weather v2.0 ───────────────────────────────────────── */

.ecowitt-weather {
    background: linear-gradient(160deg, #0f2744 0%, #1a3a5c 55%, #0d2137 100%);
    border-radius: 14px;
    padding: 22px;
    max-width: 440px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .07);
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.ew-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.ew-station {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .03em;
}

.ew-meta {
    font-size: .72rem;
    color: rgba(255, 255, 255, .45);
}

/* ── Wind Row ────────────────────────────────────────────────────────────── */

.ew-wind-row {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 18px;
}

.ew-compass {
    flex-shrink: 0;
    width: 92px;
    height: 92px;
}

.ew-compass svg {
    width: 100%;
    height: 100%;
    display: block;
}

.ew-wind-info {
    flex: 1;
}

.ew-spd {
    display: flex;
    align-items: baseline;
    gap: 5px;
    line-height: 1;
    margin-bottom: 5px;
}

.ew-spd-val {
    font-size: 3.4rem;
    font-weight: 800;
    letter-spacing: -.03em;
}

.ew-spd-unit {
    font-size: .9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .55);
}

.ew-dir {
    font-size: .95rem;
    color: rgba(255, 255, 255, .75);
    margin-bottom: 5px;
}

.ew-gust {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    color: #f5a623;
    background: rgba(245, 166, 35, .15);
    border: 1px solid rgba(245, 166, 35, .3);
    border-radius: 5px;
    padding: 2px 9px;
}

/* ── Runway Analysis ─────────────────────────────────────────────────────── */

.ew-runways {
    background: rgba(0, 0, 0, .22);
    border-radius: 9px;
    padding: 13px 15px;
    margin-bottom: 14px;
}

.ew-section-hd {
    font-size: .64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .38);
    margin-bottom: 10px;
}

.ew-rwy {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    font-size: .82rem;
    flex-wrap: wrap;
}

.ew-rwy:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ew-rwy-id {
    font-weight: 700;
    letter-spacing: .05em;
    min-width: 70px;
}

.ew-rwy-hw {
    padding: 2px 9px;
    border-radius: 4px;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
}

.ew-rwy-hw.head {
    background: rgba(39, 174, 96, .2);
    color: #7fe0a8;
    border: 1px solid rgba(39, 174, 96, .28);
}

.ew-rwy-hw.tail {
    background: rgba(231, 76, 60, .18);
    color: #f98776;
    border: 1px solid rgba(231, 76, 60, .25);
}

.ew-rwy-xw {
    color: rgba(255, 255, 255, .5);
    white-space: nowrap;
}

/* ── Data Grid ───────────────────────────────────────────────────────────── */

.ew-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ew-cell {
    background: rgba(255, 255, 255, .07);
    border-radius: 8px;
    padding: 9px 10px;
    text-align: center;
}

.ew-lbl {
    display: block;
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .42);
    margin-bottom: 4px;
}

.ew-val {
    display: block;
    font-size: .93rem;
    font-weight: 700;
}

/* ── Error State ─────────────────────────────────────────────────────────── */

.ecowitt-weather.error {
    background: linear-gradient(135deg, #3d1414 0%, #5c1f1f 100%);
}

.ecowitt-weather.error p {
    margin: 0;
    font-size: .9rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 380px) {
    .ew-spd-val     { font-size: 2.6rem; }
    .ew-grid        { grid-template-columns: repeat(2, 1fr); }
    .ew-compass     { width: 76px; height: 76px; }
}
