/*
 * MeteoWiden Graphics
 * Version 1.0
 * 03.12.2026
 */

:root {
    color-scheme: dark;

    --background: #101822;
    --surface: #17222f;
    --text: #f3f7fb;
    --muted: #a0b0c4;
    --accent: #eac47b;
    --line: rgba(255, 255, 255, .10);

    --temperature: #eac47b;
    --dewpoint: #65b8df;

    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: 'Saira', sans-serif;
    font-size: 16px;
}

/* Hauptcontainer */

.graphics {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Kopfbereich */

.graphics-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.graphics-header h1 {
    margin: 0;
    color: var(--accent);
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 600;
}

.graphics-header p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 14px;
}

/* Navigation und Datumsauswahl */

.graphics-controls {
    position: sticky;
    top: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.date-navigation,
.range-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
}

button,
input[type="date"] {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--background);
    color: var(--text);
    font: inherit;
}

button {
    cursor: pointer;
    transition: background .2s, color .2s;
}

button:hover:not(:disabled),
button.active {
    background: var(--accent);
    color: var(--background);
    border-color: var(--accent);
}

button:disabled {
    opacity: .35;
    cursor: default;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

input[type="date"] {
    color: var(--accent);
    font-weight: 500;
}

/* API-Status */

#archive-status {
    padding: 12px 4px;
    color: var(--muted);
    font-size: 13px;
}

/* Widen Farbe im Header Brand*/

.brand h1 {
  color: #e8dfc9;   
}

.brand h1 span {
    color:#a5c63b;
  }

/* Grafikkarten */

.chart-card {
    margin-bottom: 20px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

#chart-temperature {
    width: 100%;
    height: 400px;
}

/* Footer */

.graphics-footer {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

/* Mobile Darstellung */

@media (max-width: 600px) {

    .graphics {
        padding: 12px;
    }

    .graphics-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .graphics-header p {
        font-size: 12px;
    }

    .graphics-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        gap: 12px;
    }

    .date-navigation,
    .range-navigation {
        justify-content: center;
    }

    .range-navigation button {
        flex: 1;
    }

    button,
    input[type="date"] {
        padding: 6px 10px;
        font-size: 14px;
    }

    .chart-card {
        padding: 8px;
    }

    #chart-temperature {
        height: 320px;
    }
}

/* Relative Luftfeuchtigkeit */

#chart-humidity {
    width: 100%;
    height: 300px;
}

@media (max-width: 600px) {
    #chart-humidity {
        height: 260px;
    }
}

/* Luftdruck */

#chart-pressure {
    width: 100%;
    height: 300px;
}

@media (max-width: 600px) {
    #chart-pressure {
        height: 260px;
    }
}

/* Windgeschwindigkeit und Windrichtung */

#chart-wind,
#chart-wind-direction {
    width: 100%;
    height: 350px;
}

@media (max-width: 600px) {
    #chart-wind,
    #chart-wind-direction {
        height: 300px;
    }
}

/* Solarstrahlung */

#chart-solar {
    width: 100%;
    height: 350px;
}

@media (max-width: 600px) {
    #chart-solar {
        height: 300px;
    }
}

/* Niederschlag */

#chart-rain {
    width: 100%;
    height: 350px;
}

@media (max-width: 600px) {
    #chart-rain {
        height: 300px;
    }
}