/* ==========================================================================
   statistiken.css
   Benzinpreise Statistiken – /de/statistiken
   ========================================================================== */

/* -----------------------------------------------------------------------
   Seiten-Wrapper
   ----------------------------------------------------------------------- */
.st-page {
    padding: 10px 0 40px;
}

/* -----------------------------------------------------------------------
   Sprung-Navigation (Anker-Links)
   ----------------------------------------------------------------------- */
.st-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
    padding: 10px 12px;
    background: #f4f8f0;
    border: 1px solid #c8dfb4;
    border-radius: 6px;
}

.st-nav__link {
    font-size: 0.78rem;
    color: #3a6e1a;
    text-decoration: none;
    padding: 3px 8px;
    border: 1px solid #b0d090;
    border-radius: 3px;
    background: #fff;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    font-family: inherit;
    line-height: inherit;
}

.st-nav__link:hover {
    background: #3a6e1a;
    color: #fff;
    border-color: #3a6e1a;
}

.st-nav__link.is-active {
    background: #3a6e1a;
    color: #fff;
    border-color: #2a5a0e;
    font-weight: 700;
}

/* -----------------------------------------------------------------------
   Einzelne Statistik-Sektion
   ----------------------------------------------------------------------- */
.st-section {
    margin-bottom: 36px;
    scroll-margin-top: 70px; /* Platz für ggf. sticky Header */
}

.st-section__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2a5a0e;
    border-left: 4px solid #6db33f;
    padding-left: 10px;
    margin: 0 0 12px;
}

/* -----------------------------------------------------------------------
   Grafik-Bild
   ----------------------------------------------------------------------- */
.st-chart {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* Zwei Grafiken nebeneinander (z.B. Tageszeit + Wochentag) */
.st-chart-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 680px) {
    .st-chart-pair {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------------------------------------------------
   Quellen-Hinweis
   ----------------------------------------------------------------------- */
.st-source {
    font-size: 0.78rem;
    color: #888;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.st-source a {
    color: #3a6e1a;
}

/* -----------------------------------------------------------------------
   Stündlich-Badge
   ----------------------------------------------------------------------- */
.st-badge {
    display: inline-block;
    font-size: 0.7rem;
    background: #e8f5d8;
    color: #2a5a0e;
    border: 1px solid #b0d090;
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 600;
}

/* -----------------------------------------------------------------------
   Zwei-Spalten-Layout: Niveau-Grafiken nebeneinander
   ----------------------------------------------------------------------- */
.st-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.st-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

@media (max-width: 900px) {
    .st-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 540px) {
    .st-grid-2,
    .st-grid-3 {
        grid-template-columns: 1fr;
    }
}

.st-grid-item__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

/* -----------------------------------------------------------------------
   Archiv-Widget (.sap = statistiken-archiv-panel)
   ----------------------------------------------------------------------- */

/* Wrapper jeder Grafik (für JS-Ziel) */
.st-chart-wrap {
    position: relative;
}

/* Panel direkt unterhalb der Grafik */
.sap {
    margin-top: 5px;
    margin-bottom: 4px;
}

/* Leiste: Toggle-Button + Info-Text */
.sap__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Archiv-Button */
.sap__toggle {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 10px;
    border: 1px solid #b0d090;
    border-radius: 4px;
    background: #f4f8f0;
    color: #2a5a0e;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.sap__toggle:hover,
.sap__toggle--open {
    background: #3a6e1a;
    color: #fff;
    border-color: #3a6e1a;
}

.sap__toggle:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Info-Text (z. B. "Archiv-Grafik vom ...") */
.sap__info {
    font-size: 0.76rem;
    color: #888;
}

.sap__info--active {
    color: #3a6e1a;
    font-weight: 600;
}

/* Formular-Bereich (via [hidden] ausgeblendet) */
.sap__form {
    margin-top: 7px;
    padding: 10px 12px;
    background: #f9fdf5;
    border: 1px solid #cde5b5;
    border-radius: 6px;
}

/* Select-Reihe */
.sap__selects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

/* Label + Select übereinander */
.sap__field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sap__field label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #555;
}

.sap__field select {
    font-size: 0.8rem;
    padding: 3px 6px;
    border: 1px solid #b0d090;
    border-radius: 4px;
    background: #fff;
    color: #333;
    min-width: 80px;
}

.sap__field select:disabled {
    background: #f0f0f0;
    color: #aaa;
    border-color: #ddd;
}

/* Aktionen (Zurücksetzen + Fehlertext) */
.sap__actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Zurücksetzen */
.sap__reset {
    font-size: 0.73rem;
    padding: 3px 10px;
    border: 1px solid #e0a0a0;
    border-radius: 4px;
    background: #fff5f5;
    color: #a02020;
    cursor: pointer;
    transition: background 0.15s;
}

.sap__reset:hover {
    background: #fde0e0;
}

/* Fehlertext */
.sap__error {
    font-size: 0.73rem;
    color: #c0392b;
    font-style: italic;
}
