/* =========================================================
   HOCHSCHEID – Belchertown Forecast Mobile Optimierung
   ========================================================= */

@media (max-width: 767px) {

    /* Forecast-Bereich */
    .forecastrow {
        margin-left: -5px;
        margin-right: -5px;
    }

    /* Überschrift */
    .forecast-title {
        width: 100%;
        padding: 8px 10px 4px 10px;
        font-size: 1.15em;
        text-align: left;
    }

    /* 1 / 3 / 24 Stunden Auswahl */
    .forecast-menu {
        width: 100%;
        padding: 4px 10px 10px 10px;
        text-align: left;
        white-space: nowrap;
    }

    .forecast-button {
        display: inline-block;
        min-width: 48px;
        margin: 0 4px 0 0;
        padding: 7px 10px;
        text-align: center;
        border-radius: 4px;
    }

    /* Forecast-Kacheln */
    .forecastrow .row-no-padding {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    /* Weniger Innenabstand auf kleinen Displays */
    .forecastrow [class*="col-"] {
        padding-left: 4px;
        padding-right: 4px;
    }

    /* Forecast-Inhalte nicht unnötig breit machen */
    .forecastrow img {
        max-width: 100%;
        height: auto;
    }

    /* Meteogramme */
    #chart1,
    #chart2,
    .highcharts-container {
        max-width: 100% !important;
    }

    /* Diagramm-Bereich */
    .graph {
        margin-left: 0;
        margin-right: 0;
    }

    /* Etwas mehr Platz zwischen den beiden Diagrammen */
    .graph-outer > div {
        margin-bottom: 12px;
    }

    /* Legenden auf dem Handy etwas kompakter */
    .highcharts-legend-item text {
        font-size: 11px !important;
    }

    /* Tooltip nicht zu groß */
    .highcharts-tooltip text {
        font-size: 11px !important;
    }
}


/* Sehr kleine Smartphones */
@media (max-width: 480px) {

    .forecast-title {
        font-size: 1.05em;
    }

    .forecast-menu {
        padding-left: 6px;
        padding-right: 6px;
    }

    .forecast-button {
        min-width: 44px;
        padding: 6px 8px;
        font-size: 0.9em;
    }

    .forecastrow [class*="col-"] {
        padding-left: 2px;
        padding-right: 2px;
    }

    .highcharts-legend-item text {
        font-size: 10px !important;
    }
}

/* =========================================================
   DWD Forecast – mobile Darstellung
   ========================================================= */

@media (max-width: 767px) {

    /* Desktop-Version auf Smartphones ausblenden */
    .dwdforecast-horizontal.hidden-xs {
        display: none !important;
    }

    /* Mobile-Version anzeigen */
    .dwdforecast-vertical.visible-xs-block {
        display: block !important;
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* DWD Tabellen auf kleinen Displays */
    .dwdforecast-vertical table {
        width: 100% !important;
        table-layout: fixed;
    }

    .dwdforecast-vertical th,
    .dwdforecast-vertical td {
        padding: 5px 3px;
        font-size: 12px;
    }

    /* Stundenprognose darf horizontal scrollen */
    .dwdforecast-hourly11 {
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dwdforecast-hourly11 .dwdforecasttable {
        min-width: 360px;
    }

    .dwdforecast-vertical img {
        max-width: 42px;
        height: auto;
    }
}


/* AQI - kompakte einspaltige Darstellung */
.aqi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 8px;
}

.aqi-cell {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    line-height: 1.2;
}

.aqi-cell-label {
    display: inline-block;
    color: #ffffff;
    opacity: 1;
    font-size: 0.9em;
    min-width: 45px;
    text-align: right;
}

.aqi-cell strong {
    font-size: 1.1em;
}

.aqi-cell .wx-aqi-category {
    font-size: 0.9em;
}

.aqi_location_outer {
    display: block;
    margin-top: 6px;
    font-size: 0.75em;
    opacity: 0.65;
}

/* ===== AQI Darstellung ===== */

/* Alle AQI-Einträge garantiert untereinander */
.aqi_outer .aqi-grid {
    display: block !important;
    width: 100%;
    margin-top: 8px;
}

/* Jede Zeile nimmt die komplette Breite ein */
.aqi_outer .aqi-cell {
    display: flex !important;
    width: 100%;
    min-width: 0;
    align-items: baseline;
    justify-content: flex-start;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

/* Beschriftungen immer weiß */
.aqi_outer .aqi-cell .aqi-cell-label {
    display: inline-block;
    width: 55px;
    min-width: 55px;
    color: #ffffff !important;
    opacity: 1 !important;
    text-align: right;
    margin-right: 8px;
    font-size: 0.9em;
}

/* Werte: KEINE Farbe hier setzen!
   Die Farben kommen weiterhin aus set_aqi_color() */
.aqi_outer .aqi-cell strong {
    font-size: 1.1em;
}

/* AQI-Kategorie ebenfalls NICHT einfärben:
   set_aqi_color() macht das weiterhin */
.aqi_outer .aqi-cell .wx-aqi-category {
    margin-left: 5px;
}

/* Standort */
.aqi_outer .aqi_location_outer {
    display: block;
    margin-top: 6px;
    font-size: 0.75em;
    opacity: 0.65;
}
