/* ==========================================================================
   Styles für den Energieausweis-Check
   ========================================================================== */

/* --- CSS VARIABLES & RESET --- */
:root {
    /* Farbpalette gemäß Vorgabe */
    --c-primary: #006B33;
    /* Hauptfarbe, Buttons */
    --c-primary-hover: #005227;
    /* Dunkleres Grün für Hover */
    --c-secondary: #32D94B;
    /* Akzent hellgrün */
    --c-accent: #B1D923;
    /* Helles Limettengrün */
    --c-warning: #FF5100;
    /* Warnungen/Wichtig */
    --c-bg-card: #E8E6D5;
    /* Karten-Hintergrund (Beige-Ton) */
    --c-bg-page: #F5F5F5;
    /* Seiten-Hintergrund */
    --c-white: #FFFFFF;
    --c-text: #212121;
    /* Fast Schwarz */
    --c-text-light: #757575;
    /* Grau für Beschreibungen */
    --c-border: #BDBDBD;
    /* Ränder */

    --font-stack: 'Roboto', 'Segoe UI', Arial, sans-serif;
    --radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Einfacher Reset für den isolierten Block */
.sofort-test-wrapper {
    font-family: var(--font-stack);
    color: var(--c-text);
    line-height: 1.6;
    box-sizing: border-box;
    background-color: var(--c-bg-page);
    padding: 20px 20px 300px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sofort-test-wrapper * {
    box-sizing: border-box;
}

/* --- HAUPTCONTAINER (.sofort-test) --- */
.sofort-test {
    background-color: var(--c-white);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    border-top: 6px solid var(--c-primary);
}

/* --- HEADER & PROGRESS --- */
.st-header {
    padding: 20px 30px;
    background-color: var(--c-white);
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.st-title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--c-primary);
    font-weight: 700;
}

.st-progress {
    font-size: 0.9rem;
    color: var(--c-text-light);
    font-weight: 600;
}

/* --- CONTENT AREA --- */
.st-content {
    padding: 30px;
    min-height: 300px;
    /* Verhindert Springen bei Inhaltswechsel */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- TYPOGRAPHY --- */
.st-question {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--c-text);
}

.st-description {
    margin-bottom: 2rem;
    color: var(--c-text-light);
}

/* --- BUTTONS & INTERACTION --- */
.st-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.st-btn {
    appearance: none;
    background-color: var(--c-bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: left;
    font-size: 1rem;
    font-family: inherit;
    color: var(--c-text);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    outline: none;
    width: 100%;
    text-decoration: none;
    /* Für Links, die wie Buttons aussehen */
    display: block;
}

.st-btn:hover {
    background-color: #dcdad0;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.st-btn:focus-visible {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 4px rgba(0, 107, 51, 0.2);
}

/* Aktiver Zustand (beim Klicken) */
.st-btn:active {
    transform: translateY(0);
}

/* Primärbutton (Start / Neustart) */
.st-btn-primary {
    background-color: var(--c-primary);
    color: var(--c-white);
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.st-btn-primary:hover {
    background-color: var(--c-primary-hover);
    color: var(--c-white);
    /* Sicherstellen, dass Text weiß bleibt */
}

/* CTA Button (Ergebnis Links) */
.st-btn-cta {
    background-color: var(--c-accent);
    color: var(--c-primary);
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.st-btn-cta:hover {
    background-color: var(--c-secondary);
    color: var(--c-primary);
}

/* Buttons – visited-Zustand neutralisieren für bessere Lesbarkeit */
.st-btn:visited,
.st-btn-primary:visited {
    color: var(--c-white) !important;
    /* behält definierte Button-Textfarbe bei */
    text-decoration-color: currentColor;
    /* keine abweichende Underline-Farbe */
}

.st-btn-cta:visited {
    color: var(--c-primary) !important;
    /* behält definierte Button-Textfarbe bei */
    text-decoration-color: currentColor;
    /* keine abweichende Underline-Farbe */
}

/* Button Secondary (Zurück) */
.st-btn-back {
    background: transparent;
    border: none;
    color: var(--c-text-light);
    padding: 10px 0;
    margin-top: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: auto;
    /* Nicht volle Breite */
    align-self: flex-start;
}

.st-btn-back:hover {
    color: var(--c-text);
    text-decoration: underline;
    transform: none;
    /* Kein Hover-Lift beim Zurück-Link */
    box-shadow: none;
    background: transparent;
}

/* --- RESULTS --- */
.st-result-card {
    background-color: #f0fdf4;
    /* Sehr helles grün */
    border: 1px solid var(--c-secondary);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.st-result-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
    color: var(--c-primary);
}

.st-result-title {
    font-size: 1.4rem;
    color: var(--c-primary);
    margin-bottom: 10px;
    font-weight: bold;
}

.st-badge {
    display: inline-block;
    background-color: var(--c-accent);
    color: var(--c-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* --- ANIMATIONS --- */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .sofort-test-wrapper {
        padding: 10px;
    }

    .st-header {
        padding: 15px 20px;
    }

    .st-content {
        padding: 20px;
    }

    .st-question {
        font-size: 1.3rem;
    }
}

/* ==========================================================================
   Dark Mode Overrides: Sofort Test
   An das Dateiende anhängen
   ========================================================================== */
@media (prefers-color-scheme: dark) {

    /* Variablen lokal am Wrapper überschreiben */
    .sofort-test-wrapper {
        --c-bg-page: #0b1f14;
        --c-white: #13281f;
        --c-bg-card: #10261c;

        --c-text: #e6f2ec;
        --c-text-light: #b7c7bf;
        --c-border: #2e4a3d;

        --shadow: 0 8px 24px rgba(0, 0, 0, .6);
        background-color: var(--c-bg-page);
    }

    .sofort-test {
        background-color: var(--c-white);
        box-shadow: var(--shadow);
    }

    .st-header {
        background-color: #0e2219;
        border-bottom-color: var(--c-border);
    }

    .st-title {
        color: #8ee4a0;
    }

    .st-progress {
        color: var(--c-text-light);
    }

    .st-question {
        color: var(--c-text);
    }

    .st-description {
        color: var(--c-text-light);
    }

    .st-btn {
        background-color: var(--c-bg-card);
        color: var(--c-text);
    }

    .st-btn:hover {
        background-color: #13281f;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .55);
    }

    .st-btn:focus-visible {
        border-color: rgba(142, 228, 160, .75);
        box-shadow: 0 0 0 4px rgba(142, 228, 160, .18);
    }

    .st-btn-back {
        color: var(--c-text-light);
    }

    .st-btn-back:hover,
    .st-btn-back:focus-visible {
        color: #b1f0c1;
    }

    .st-result-card {
        background-color: rgba(142, 228, 160, .10);
        border-color: rgba(142, 228, 160, .35);
    }

    .st-result-icon,
    .st-result-title {
        color: #8ee4a0;
    }

    .st-badge {
        background-color: rgba(177, 217, 35, .20);
        color: #b1f0c1;
    }

    @media (prefers-reduced-motion: reduce) {

        .st-btn,
        .fade-in {
            transition: none;
            animation: none;
        }

        .st-btn:hover {
            transform: none;
        }
    }
}
