/* === Patientenseiten (Startseite, Fragebogen, Abschluss, Hinweisseiten) ===
   Die Klinikfarben setzt _LayoutCore.cshtml als --element-color, --element-text und --survey-bg. */
:root {
    --element-color: #000000;
    --element-text: #ffffff;
    --survey-bg: #ffffff;
    /* Hellere/dunklere Varianten via color-mix() */
    --element-color-light: color-mix(in srgb, var(--element-color), white 35%);
    --element-color-dark: color-mix(in srgb, var(--element-color), black 25%);
    --survey-text: #1f2430;
    --survey-text-muted: #6b7280;
    --survey-line: #e9ecef;
    --survey-line-strong: #c5ccd6;
    --survey-hover: #f6f7f9;
    --survey-track: #e9edf2;
    --survey-radius: 12px;
    --survey-radius-sm: 10px;
    --survey-transition: 150ms ease;
}

/* Weiches Überblenden beim Wechsel zwischen den Seiten. Browser ohne Unterstützung wechseln wie bisher. */
@view-transition {
    navigation: auto;
}

::view-transition-group(root) {
    animation-duration: 180ms;
}

@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }
}

html, body {
    background-color: var(--survey-bg);
    height: auto;
    min-height: 100%;
}

body.survey-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-bottom: 0;
}

.survey-page {
    flex: 1 0 auto;
}

.questionnaire {
    max-width: 1000px;
    color: var(--survey-text);
}

/* Logo skaliert auf kleinen Geräten mit */
.survey-brand {
    display: flex;
    justify-content: flex-end;
    min-height: 1rem;
    margin-bottom: 10px;
    margin-right: 20px;
}

.survey-logo {
    width: min(300px, 55vw);
    height: auto;
}

/* Kopfbereich: Fragebogenname, Trennlinie, Abschnitts-Überschrift */
.survey-head {
    margin-bottom: clamp(1.5rem, 4.5vw, 2.25rem);
}

    .survey-head h1 {
        margin: 0;
        font-size: clamp(1.65rem, 4.8vw, 2.15rem);
        font-weight: 700;
        letter-spacing: -0.01em;
        color: var(--survey-text);
    }

    .survey-head .survey-head-rule {
        margin: 0.85rem 0 0.95rem 0;
        border: none;
        border-top: 1px solid var(--survey-line);
    }

    .survey-head h2 {
        margin: 0;
        font-size: clamp(1.15rem, 3.2vw, 1.3rem);
        font-weight: 600;
        color: var(--element-color-dark);
    }

/* Frage-Bereich: schlicht, ohne Fläche */
.survey-question {
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
}

.survey-question-text {
    margin: 0 0 0.3rem 0;
    font-size: clamp(1.15rem, 2.8vw, 1.32rem);
    font-weight: 600;
    line-height: 1.45;
    color: var(--survey-text);
}

.survey-hint {
    margin: 0;
    font-size: 1rem;
    font-weight: 300;
    color: var(--survey-text-muted);
}

    .survey-hint:empty {
        display: none;
    }

.survey-input-wrap {
    margin-top: 0.9rem;
}

/* Antwort-Optionen: schlichte Zeilen, kein Kasten */
.survey-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.survey-option {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0;
    padding: 4px 0;
    font-size: 1.05rem;
    line-height: 1.4;
    cursor: pointer;
}

    .survey-option input {
        flex: 0 0 auto;
        width: 1.25rem;
        height: 1.25rem;
        margin: 0.05rem 0 0 0;
        accent-color: var(--element-color);
        cursor: pointer;
    }

        .survey-option input:checked + span {
            font-weight: 600;
        }

        .survey-option input:focus-visible {
            outline: 2px solid var(--element-color);
            outline-offset: 2px;
        }

/* Text-, Zahl-, Datums- und Auswahlfelder */
.survey-field {
    display: block;
    width: 100%;
    min-height: 45px;
    padding: 0.5rem 0.8rem;
    font: inherit;
    font-size: 1.05rem;
    color: var(--survey-text);
    background-color: #fff;
    border: 1px solid var(--survey-line-strong);
    border-radius: var(--survey-radius-sm);
    transition: border-color var(--survey-transition), box-shadow var(--survey-transition);
}

    .survey-field:focus {
        outline: none;
        border-color: var(--element-color);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--element-color), transparent 80%);
    }

.survey-field-short {
    max-width: 16rem;
}

/* Buttons */
.survey-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.survey-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    padding: 0 1rem;
    font: inherit;
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--element-text);
    background-color: var(--element-color);
    border: none;
    border-radius: var(--survey-radius-sm);
    cursor: pointer;
    transition: background-color var(--survey-transition), border-color var(--survey-transition);
}

    .survey-btn:hover {
        background-color: var(--element-color-dark);
    }

    .survey-btn:focus-visible {
        outline: 2px solid var(--element-color-dark);
        outline-offset: 2px;
    }

    .survey-btn:disabled {
        opacity: 0.6;
        cursor: default;
    }

.survey-btn-next {
    width: 150px;
}

/* Zurück-Button als Outline-Variante, nur Pfeil; steht im Markup hinter Weiter und wird links angezeigt */
.survey-btn.survey-btn-back {
    order: -1;
    width: 50px;
    padding: 0;
    color: var(--element-color-dark);
    background-color: #fff;
    border: 1.5px solid var(--survey-line-strong);
}

    .survey-btn.survey-btn-back:hover {
        background-color: var(--survey-hover);
        border-color: var(--element-color);
    }

/* Fortschrittsanzeige */
.survey-progress {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.survey-progress-track {
    flex: 1 1 auto;
    height: 7px;
    background: var(--survey-track);
    border-radius: 999px;
    overflow: hidden;
}

.survey-progress-bar {
    height: 100%;
    border-radius: 999px;
    background-color: var(--element-color);
    transition: width 0.45s ease;
}

.survey-progress-label {
    min-width: 3ch;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    color: var(--element-color-dark);
}

/* Startseite, Abschluss und Hinweisseiten: zentrierter Textblock */
.survey-message {
    margin-top: clamp(1rem, 4vw, 2rem);
    text-align: center;
    color: var(--survey-text);
}

    .survey-message h1,
    .survey-message h2,
    .survey-message h3 {
        font-size: clamp(1.35rem, 3.8vw, 1.75rem);
        font-weight: 600;
        line-height: 1.35;
    }

    .survey-message p,
    .survey-message h5 {
        font-size: clamp(1.05rem, 2.6vw, 1.2rem);
        font-weight: 400;
        line-height: 1.5;
    }

.survey-message-text {
    margin-top: 0.75rem;
    color: var(--survey-text-muted);
}

.survey-start-action {
    margin-top: 1.75rem;
}

.survey-btn.survey-btn-start {
    width: 240px;
    height: 60px;
    font-size: 1.1rem;
}

/* Fußzeile mit Impressum */
.survey-footer {
    flex-shrink: 0;
    padding: 1.25rem 1rem;
    font-size: 0.9rem;
    text-align: center;
}

    .survey-footer a {
        color: var(--survey-text-muted);
        text-decoration: underline;
    }
