/* ============================================================
   OROSEIMETEO · STAZIONE
   Stile coerente con la nuova Home e con la pagina Stazioni.
   La pagina usa home.css per i componenti meteo condivisi.
   ============================================================ */

.stationdash {
    background: #fff;
}


/* ============================================================
   HERO
   ============================================================ */

.stationdash-hero {
    background: #fff;
    border-bottom: 1px solid var(--om-line-strong);
}

.stationdash-hero-inner {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 52px;
    padding-top: 54px;
    padding-bottom: 54px;
}

.stationdash-hero-copy {
    min-width: 0;
}

.stationdash-hero-copy .home3-kicker {
    display: block;
    margin-bottom: 7px;
    color: var(--om-blue);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.stationdash-hero-copy h1 {
    margin: 0 0 14px;
    color: var(--om-blue-dark);
    font-size: clamp(42px, 4.4vw, 58px);
    line-height: 1.02;
    letter-spacing: -.9px;
    font-weight: 700;
}

.stationdash-hero-copy p {
    max-width: 760px;
    margin: 0;
    color: var(--om-muted);
    font-size: 18px;
    line-height: 1.55;
}

.stationdash-hero-status {
    flex: 0 0 235px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0 8px 28px;
    border-left: 1px solid var(--om-line-strong);
    background: transparent;
}

.stationdash-status-dot {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border-radius: 50%;
    background: #9aa4aa;
    box-shadow: 0 0 0 5px rgba(154, 164, 170, .12);
}

.stationdash-hero-status.online .stationdash-status-dot {
    background: #45ab6a;
    box-shadow: 0 0 0 5px rgba(69, 171, 106, .12);
}

.stationdash-hero-status.offline .stationdash-status-dot {
    background: #d15c62;
    box-shadow: 0 0 0 5px rgba(209, 92, 98, .12);
}

.stationdash-hero-status small {
    display: block;
    color: var(--om-muted-2);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.stationdash-hero-status strong {
    display: block;
    margin-top: 4px;
    color: var(--om-blue-dark);
    font-size: 22px;
    line-height: 1.05;
    font-weight: 700;
}

.stationdash-hero-status > div > span {
    display: block;
    margin-top: 6px;
    color: var(--om-muted);
    font-size: 14px;
    line-height: 1.3;
}


/* ============================================================
   SLOT STATO STAZIONE · MOBILE
   Su desktop rimane nascosto.
   Il JS sposta qui lo stesso blocco stato sotto i 760 px.
   ============================================================ */

.stationdash-mobile-status-slot {
    display: none;
}


/* ============================================================
   SELETTORE STAZIONE
   4 stazioni sulla stessa riga su desktop ampio.
   ============================================================ */

.stationdash-switch-section {
    padding: 30px 0 0;
    background: #fff;
}

.stationdash-switch {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stationdash-switch a {
    min-width: 0;
    position: relative;
    display: block;
    padding: 18px 20px 17px;
    border: 1px solid var(--om-line);
    border-radius: 4px;
    background: #fff;
    transition:
        border-color .16s ease,
        background-color .16s ease;
}

.stationdash-switch a:hover {
    border-color: #aebdc5;
    background: #fafafa;
}

.stationdash-switch a.is-active {
    border-color: var(--om-blue);
}

.stationdash-switch a.is-active::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    bottom: -1px;
    width: 4px;
    background: var(--om-blue);
    border-radius: 4px 0 0 4px;
}

.stationdash-switch span {
    display: block;
    color: var(--om-blue-dark);
    font-size: 21px;
    line-height: 1.15;
    font-weight: 700;
}

.stationdash-switch a.is-active span {
    color: var(--om-blue);
}

.stationdash-switch small {
    display: block;
    margin-top: 5px;
    color: var(--om-muted);
    font-size: 15px;
    line-height: 1.4;
    white-space: normal;
}


/* ============================================================
   ALLINEAMENTO CARD SELETTORE · DESKTOP
   ============================================================ */

@media (min-width: 1101px) {

    .stationdash-switch span {
        min-height: 49px;
    }

    .stationdash-switch small {
        min-height: 42px;
    }
}


/* ============================================================
   SEZIONE DATI
   ============================================================ */

.stationdash-live-section {
    padding-top: 46px;
    padding-bottom: 62px;
}

.stationdash-section-title {
    align-items: flex-end;
    margin-bottom: 24px;
}

.stationdash-section-title p {
    max-width: 460px;
    margin: 0;
    color: var(--om-muted);
    font-size: 17px;
    line-height: 1.45;
    text-align: right;
}

.stationdash-cockpit {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.stationdash-cockpit > * {
    min-width: 0;
}

.stationdash-module {
    height: 100%;
}

.stationdash-mini-chart {
    min-height: 250px;
}


/* ============================================================
   COLORE TEMPERATURA DINAMICO
   Stessa scala usata nella pagina Stazioni.
   ============================================================ */

.stationdash-module.home3-module-temp.is-temp-freezing {
    --live-temp-color: #315fca;
}

.stationdash-module.home3-module-temp.is-temp-cold {
    --live-temp-color: #2f7fce;
}

.stationdash-module.home3-module-temp.is-temp-cool {
    --live-temp-color: #249bb7;
}

.stationdash-module.home3-module-temp.is-temp-mild {
    --live-temp-color: #27956f;
}

.stationdash-module.home3-module-temp.is-temp-warm {
    --live-temp-color: #d09a18;
}

.stationdash-module.home3-module-temp.is-temp-hot {
    --live-temp-color: #e9782f;
}

.stationdash-module.home3-module-temp.is-temp-very-hot {
    --live-temp-color: #d9534f;
}


/* ============================================================
   COMFORT TERMICO SOTTO LA TEMPERATURA
   ============================================================ */

.home3-temp-primary-v50 {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.stationdash-module .home3-temp-comfort-primary-v50 {
    display: block;
    margin-top: 15px;
    color: var(
        --comfort-color,
        var(--live-temp-color, #27956f)
    );
    font-size: 27px;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.3px;
}

.stationdash-module .home3-temp-comfort-humidex-only-v50 {
    display: block;
    min-height: 0;
    margin-top: 15px;
    margin-bottom: 18px;
}

.stationdash-module
.home3-temp-comfort-humidex-only-v50
.home3-temp-humidex {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.stationdash-module
.home3-temp-comfort-humidex-only-v50
.home3-temp-humidex b {
    font-size: 18px;
}


/* ============================================================
   UMIDITÀ / PIOGGIA
   ============================================================ */

.stationdash-humidity-facts,
.stationdash-rain-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 16px;
    border-top: 1px solid var(--om-line);
    border-bottom: 1px solid var(--om-line);
}

.stationdash-humidity-facts span,
.stationdash-rain-totals > div {
    min-width: 0;
    padding: 15px 14px;
    color: var(--om-muted);
    font-size: 14px;
    line-height: 1.35;
}

.stationdash-humidity-facts span:first-child,
.stationdash-rain-totals > div:first-child {
    padding-left: 0;
    border-right: 1px solid var(--om-line);
}

.stationdash-humidity-facts span:last-child,
.stationdash-rain-totals > div:last-child {
    padding-right: 0;
}

.stationdash-humidity-facts b,
.stationdash-rain-totals strong {
    display: block;
    margin-top: 4px;
    color: var(--om-blue-dark);
    font-size: 19px;
    line-height: 1.2;
    font-weight: 700;
}

.stationdash-rain-totals span {
    display: block;
    color: var(--om-muted);
    font-size: 14px;
}

.stationdash-comfort {
    min-height: 0;
}


/* ============================================================
   PRESSIONE / ARIA
   ============================================================ */

.stationdash-pressure-card,
.stationdash-air-panel {
    min-height: 0;
}

.stationdash-air-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--om-line);
    color: var(--om-blue);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.stationdash-air-link:hover {
    color: #0e6389;
}


/* ============================================================
   METRICHE SECONDARIE
   ============================================================ */

.stationdash-ribbon {
    margin-top: 22px;
}

.stationdash-capability.is-unavailable {
    display: none !important;
}


/* ============================================================
   AZIONI
   ============================================================ */

.stationdash-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--om-line-strong);
}

.stationdash-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 17px;
    border: 1px solid var(--om-line-strong);
    border-radius: 4px;
    background: #fff;
    color: #465c67;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        color .16s ease;
}

.stationdash-btn:hover {
    border-color: #9fb5c0;
    background: #f7f7f7;
}

.stationdash-btn-primary {
    border-color: var(--om-blue);
    background: var(--om-blue);
    color: #fff;
}

.stationdash-btn-primary:hover {
    border-color: #0e6389;
    background: #0e6389;
    color: #fff;
}


/* ============================================================
   STATO CARICAMENTO / ERRORI GRAFICI
   ============================================================ */

.stationdash[data-loading="true"] .stationdash-mini-chart {
    opacity: .55;
}

.stationdash-chart-error {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    color: var(--om-muted);
    font-size: 14px;
    text-align: center;
}


/* ============================================================
   DESKTOP / TABLET ORIZZONTALE
   2 × 2 quando quattro colonne diventano troppo strette.
   ============================================================ */

@media (max-width: 1100px) {

    .stationdash-switch {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 980px) {

    .stationdash-hero-inner {
        gap: 34px;
    }

    .stationdash-cockpit {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 760px) {

    .stationdash-hero-inner {
        min-height: 0;
        align-items: stretch;
        flex-direction: column;
        gap: 24px;
        padding-top: 40px;
        padding-bottom: 38px;
    }

    .stationdash-hero-copy .home3-kicker {
        font-size: 14px;
    }

    .stationdash-hero-copy h1 {
        font-size: 36px;
        letter-spacing: -.5px;
    }

    .stationdash-hero-copy p {
        font-size: 17px;
        line-height: 1.5;
    }

    .stationdash-hero-status {
        flex-basis: auto;
        width: 100%;
        padding: 19px 0 0;
        border-left: 0;
        border-top: 1px solid var(--om-line);
    }


    /* ========================================================
       STATO STAZIONE SOTTO "DATI IN TEMPO REALE"
       ======================================================== */

    .stationdash-mobile-status-slot {
        display: block;
        width: 100%;
        margin-top: 2px;
    }

    .stationdash-mobile-status-slot .stationdash-hero-status {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 11px 0 14px;
        border-left: 0;
        border-top: 0;
        border-bottom: 1px solid var(--om-line);
        background: transparent;
    }

    .stationdash-mobile-status-slot .stationdash-hero-status small {
        font-size: 12px;
    }

    .stationdash-mobile-status-slot .stationdash-hero-status strong {
        margin-top: 3px;
        font-size: 21px;
    }

    .stationdash-mobile-status-slot
    .stationdash-hero-status > div > span {
        margin-top: 4px;
        font-size: 14px;
    }


    /* ========================================================
       SELETTORE
       ======================================================== */

    .stationdash-switch-section {
        padding-top: 22px;
    }

    .stationdash-switch {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .stationdash-switch a {
        padding: 16px 18px;
    }

    .stationdash-switch span {
        min-height: 0;
        font-size: 20px;
    }

    .stationdash-switch small {
        min-height: 0;
        margin-top: 3px;
        font-size: 14px;
    }


    /* ========================================================
       SEZIONE DATI
       ======================================================== */

    .stationdash-live-section {
        padding-top: 38px;
        padding-bottom: 48px;
    }

    .stationdash-section-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .stationdash-section-title p {
        max-width: none;
        font-size: 16px;
        text-align: left;
    }

    .stationdash-cockpit {
        gap: 18px;
    }

    .stationdash-mini-chart {
        min-height: 230px;
    }

    .stationdash-module .home3-temp-comfort-primary-v50 {
        margin-top: 12px;
        font-size: 25px;
    }

    .stationdash-ribbon {
        margin-top: 18px;
    }

    .stationdash-actions {
        justify-content: stretch;
    }

    .stationdash-btn {
        flex: 1 1 0;
    }
}


@media (max-width: 520px) {

    .stationdash-humidity-facts,
    .stationdash-rain-totals {
        grid-template-columns: 1fr;
    }

    .stationdash-humidity-facts span:first-child,
    .stationdash-rain-totals > div:first-child {
        padding-left: 0;
        padding-right: 0;
        border-right: 0;
        border-bottom: 1px solid var(--om-line);
    }

    .stationdash-humidity-facts span:last-child,
    .stationdash-rain-totals > div:last-child {
        padding-left: 0;
        padding-right: 0;
    }

    .stationdash-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}