/**
 * Super Duper Complete Forms – Sprechende Formulare (Conversational Mode)
 *
 * Eingebetteter Typeform-Stil. Erbt die Theme-Variablen aus .sdform-container
 * (frontend-base.css). Sichtbarkeit der Schritte wird per .sdform-cf-current
 * gesteuert (vom frontend-conversational.js gesetzt).
 *
 * @package SuperDuperForms
 * @since   1.0.111
 */

/* ── Sichtbarkeit: alle Schritte aus, nur der aktuelle an ──
 * Greift erst wenn das JS lief (.sdform-cf-ready) — ohne JS bleibt das Formular
 * als normales, vollständig sichtbares Formular nutzbar (Progressive Enhancement). */
.sdform-conversational.sdform-cf-ready .sdform-fields > .sdform-field { display: none; }
.sdform-conversational.sdform-cf-ready .sdform-field-gdpr,
.sdform-conversational.sdform-cf-ready .sdform-field-captcha-consent,
.sdform-conversational.sdform-cf-ready .sdform-submit { display: none; }

.sdform-conversational.sdform-cf-ready .sdform-fields > .sdform-field.sdform-cf-current,
.sdform-conversational.sdform-cf-ready .sdform-field-gdpr.sdform-cf-current,
.sdform-conversational.sdform-cf-ready .sdform-field-captcha-consent.sdform-cf-current,
.sdform-conversational.sdform-cf-ready .sdform-submit.sdform-cf-current {
    display: block;
    animation: sdform-cf-in 0.35s ease;
}

/* Die Abbruch-Einwilligung bleibt im Sprechenden Formular DURCHGEHEND sichtbar
 * (oben), weil der Abbruch waehrend des Ausfuellens passiert — nicht erst am Ende. */

@keyframes sdform-cf-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Der aktive Schritt darf grosszuegig atmen. */
.sdform-conversational.sdform-cf-ready .sdform-fields {
    min-height: 9em;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Grössere, ruhigere Beschriftung im Conversational-Modus. */
.sdform-conversational.sdform-cf-ready .sdform-fields > .sdform-field.sdform-cf-current .sdform-label {
    font-size: 1.35em;
    line-height: 1.35;
    margin-bottom: 0.6em;
}
.sdform-conversational.sdform-cf-ready .sdform-fields > .sdform-field.sdform-cf-current legend.sdform-label {
    margin-bottom: 0.6em;
}

/* ── Start-Screen ── */
.sdform-cf-start {
    text-align: center;
    padding: 1.5em 0 1em;
}
.sdform-cf-start-title {
    font-size: 1.7em;
    font-weight: 700;
    margin: 0 0 0.4em;
    color: var(--sdform-text);
}
.sdform-cf-start-desc {
    font-size: 1.05em;
    line-height: 1.6;
    color: var(--sdform-text-light);
    margin: 0 auto 1.2em;
    max-width: 36em;
}

/* ── Buttons / Tastatur-Hinweis ── */
.sdform-cf-btn-container,
.sdform-cf-step-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6em 0.9em;
    margin-top: 1.2em;
}
.sdform-cf-start .sdform-cf-btn-container { justify-content: center; }

.sdform-cf-btn-start,
.sdform-cf-btn-next {
    background: var(--sdform-accent);
    color: var(--wp--preset--color--base, #fff);
}
.sdform-cf-btn-start:hover,
.sdform-cf-btn-next:hover {
    background: var(--sdform-accent-hover);
    transform: translateY(-1px);
}

/* Zurueck-Button dezent. */
.sdform-cf-btn-back {
    background: transparent;
    color: var(--sdform-text-light);
    border: 1.5px solid var(--sdform-border);
    order: -1; /* links vom Weiter-Button */
}
.sdform-cf-btn-back:hover {
    border-color: var(--sdform-accent);
    color: var(--sdform-accent);
}
/* Auf dem ersten Schritt (Start-Screen ist Vorgaenger) bleibt Zurueck dezent
 * sichtbar; das schadet nicht und fuehrt zum Start-Screen zurueck. */

.sdform-cf-btn-hint {
    font-size: 0.8em;
    color: var(--sdform-text-light);
    opacity: 0.85;
}
.sdform-cf-btn-hint strong {
    font-weight: 700;
    color: var(--sdform-text);
}

/* ── Fortschrittsanzeige ── */
.sdform-cf-progress {
    margin-top: 1.5em;
    padding-top: 1em;
    border-top: 1px solid var(--sdform-border);
}
.sdform-cf-progress-status {
    font-size: 0.8em;
    color: var(--sdform-text-light);
    margin-bottom: 0.4em;
}
.sdform-cf-progress-bar {
    height: 6px;
    background: var(--sdform-bg, #f1f1f1);
    border-radius: 3px;
    overflow: hidden;
}
.sdform-cf-progress-fill {
    height: 100%;
    width: 0;
    background: var(--sdform-accent);
    border-radius: 3px;
    transition: width 0.35s ease;
}

/* Auf dem Abschluss-Schritt sollen DSGVO/Captcha/Submit zusammen erscheinen. */
.sdform-conversational.sdform-cf-ready .sdform-submit.sdform-cf-current { margin-top: 1.2em; }
