/* Kündigungshilfe – Assistent */

.assistant-intro {
    background:
        radial-gradient(1200px 300px at 85% -40%, color-mix(in srgb, var(--kh-hero-to) 35%, transparent), transparent),
        linear-gradient(135deg, var(--kh-hero-from), var(--kh-hero-to));
    color: #fff;
    padding: 34px 0 74px;
}
.assistant-intro h1 { color: #fff; margin: 0; }
.assistant-lead { margin: .5em 0 0; color: rgba(255, 255, 255, .86); max-width: 680px; }

body.iframe .assistant-intro { padding: 18px 0 64px; }
body.iframe .assistant-intro h1 { font-size: 1.5rem; }
body.iframe .assistant-lead { display: none; }

#steps { position: relative; margin-top: -52px; }

/* ---------- Fortschritt ---------- */

.stepper {
    list-style: none;
    margin: 0 0 20px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius);
    box-shadow: var(--kh-shadow);
    counter-reset: step;
}
.stepper li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--kh-muted);
    font-weight: 600;
    font-size: .93rem;
    position: relative;
    min-width: 0;
}
.step-dot {
    flex: none;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .88rem; font-weight: 700;
    background: var(--kh-surface-3);
    color: var(--kh-muted);
    border: 2px solid transparent;
    transition: background .2s, color .2s;
}
.step-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper li.active { color: var(--kh-text); }
.stepper li.active .step-dot { background: var(--kh-primary); color: var(--kh-on-primary); }
.stepper li.done .step-dot { background: var(--kh-success); color: #fff; }
.stepper li[aria-current="step"] { background: var(--kh-primary-soft); }

@media (max-width: 640px) {
    .stepper { gap: 2px; padding: 8px; }
    .stepper li { flex-direction: column; gap: 4px; padding: 6px 4px; font-size: .74rem; text-align: center; }
    .step-label { white-space: normal; }
}

/* ---------- Raster ---------- */

.assistant-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
@media (min-width: 960px) {
    .assistant-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
    .assistant-aside { position: sticky; top: 88px; }
    body.iframe .assistant-aside { top: 16px; }
}

.step { animation: kh-fade-in .25s ease-out; }
.step-title {
    display: flex; align-items: center; gap: .5em;
    font-size: 1.3rem; margin: 0 0 18px;
}
.step-title svg { width: 24px; height: 24px; color: var(--kh-primary); }

.step-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.step-toolbar .step-title { margin: 0; justify-content: center; font-size: 1.15rem; }
@media (max-width: 560px) {
    .step-toolbar { grid-template-columns: auto 1fr; }
    .step-toolbar > :last-child { display: none; }
    .step-toolbar .step-title { justify-content: flex-end; }
}

.step-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}
.step-actions > .btn-primary { margin-left: auto; }
@media (max-width: 560px) {
    .step-actions > .btn-primary { width: 100%; }
}

.step .panel { margin-bottom: 16px; }
.panel-title svg { width: 20px; height: 20px; color: var(--kh-primary); vertical-align: -4px; margin-right: 4px; }

.step-hint {
    display: flex; align-items: center; gap: 8px;
    color: var(--kh-muted); font-size: .9rem; margin: 0 0 12px;
}
.step-hint svg { width: 16px; height: 16px; }

/* ---------- Schritt 1 ---------- */

.fragen .frage { animation: kh-fade-in .2s ease-out; }
.fragen .frage + .frage { padding-top: 4px; }
.frage-select { display: flex; gap: 8px; align-items: stretch; }
.frage-select .form-control { flex: 1 1 auto; min-width: 0; }
.frage-info {
    flex: none;
    width: 46px;
    border-radius: var(--kh-radius-sm);
    border: 1px solid var(--kh-border-strong);
    background: var(--kh-surface-2);
    color: var(--kh-primary);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.frage-info:hover { background: var(--kh-primary-soft); }
.frage-info svg { width: 20px; height: 20px; }
.frage-date { max-width: 280px; }

.combobox { position: relative; }
.combobox-field { position: relative; }
.combobox-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--kh-muted); pointer-events: none; }
.combobox .form-control { padding-left: 40px; }
.combobox-list {
    position: absolute;
    z-index: 20;
    left: 0; right: 0;
    top: calc(100% - 22px);
    max-height: 320px;
    overflow: auto;
    margin: 4px 0 0;
    padding: 6px;
    list-style: none;
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius-sm);
    box-shadow: var(--kh-shadow);
}
.combobox-list li {
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .96rem;
}
.combobox-list li mark { background: none; color: var(--kh-primary); font-weight: 700; }
.combobox-list li[aria-selected="true"], .combobox-list li:hover { background: var(--kh-primary-soft); }
.combobox-list li.dropdown-header { cursor: default; color: var(--kh-muted); font-style: italic; background: none; }

.info-panel .panel-body { font-size: .93rem; }
.info-panel .panel-body b, .info-panel .panel-body strong { display: block; margin: .8em 0 .3em; color: var(--kh-primary-strong); }
.info-panel .panel-body > b:first-child { margin-top: 0; }
.info-panel .panel-body p { margin: 0 0 .6em; }
.info-panel .panel-body ul, .info-panel .panel-body ol { padding-left: 1.2em; margin: .3em 0 .8em; }
.info-panel .panel-body li { margin-bottom: .35em; }

.trust-list { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; color: var(--kh-muted); }
.trust-list li { display: flex; gap: 8px; align-items: center; }
.trust-list svg { width: 18px; height: 18px; color: var(--kh-success); flex: none; }

.feedback-teaser {
    width: 100%;
    text-align: left;
    font: inherit;
    font-size: .92rem;
    cursor: pointer;
}
.feedback-teaser:hover { filter: brightness(.98); }

@media (max-width: 959px) {
    .assistant-aside .trust-list { display: none; }
}

/* ---------- Schritt 2 ---------- */

.segmented { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.anschrift_auswahl .panel-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.anschrift_auswahl .label { margin: 0; }

.field-wrap { position: relative; }
.mail-override { margin-top: 8px; }

.savedata { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- Schritt 3: Brief ---------- */

.letter-paper {
    --kh-letter-bg: #ffffff;
    background: var(--kh-letter-bg);
    color: #1b1b1b;
    font-family: var(--kh-font-letter);
    font-size: 15px;
    line-height: 1.5;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 12px 32px rgba(16, 36, 56, .14);
    padding: clamp(22px, 6vw, 64px) clamp(18px, 7vw, 72px) clamp(28px, 6vw, 56px);
    position: relative;
    margin-bottom: 20px;
}
.letter-paper p { margin: 0 0 1em; }
.letter-sender { display: flex; flex-direction: column; font-size: 13px; color: #333; margin-bottom: 28px; }
.letter-sender-address { white-space: pre-line; }
.page_adresse_kunde {
    font-size: 11px;
    color: #555;
    text-decoration: underline;
    margin-bottom: 6px !important;
}
.page_adresse_gesellschaft { min-height: 7.5em; }
.page_datum { text-align: right; }
.page_betreff { font-weight: 700; }

.letter-input {
    width: 100%;
    font: inherit;
    color: inherit;
    background: transparent;
    border: 1px dashed transparent;
    border-radius: 6px;
    padding: 4px 6px;
    margin: -5px -7px;
    transition: border-color .15s, background .15s;
    resize: none;
    overflow: hidden;
}
.page_betreff .letter-input { font-weight: 700; }
.letter-input:hover { border-color: #c9d3dd; background: #fbfcfd; }
.letter-input:focus { outline: none; border-color: var(--kh-primary); background: #fff; box-shadow: var(--kh-focus); }

.page_signature { margin-top: 1.5em; }
.page_signature a.signatur {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(320px, 100%);
    min-height: 92px;
    margin: 6px 0 4px;
    border: 2px dashed color-mix(in srgb, var(--kh-primary) 55%, #fff);
    border-radius: 12px;
    background: color-mix(in srgb, var(--kh-primary) 5%, #fff);
    color: var(--kh-primary);
    text-decoration: none;
    font-family: var(--kh-font);
    font-weight: 600;
    font-size: .95rem;
    transition: background .15s, border-color .15s;
}
.page_signature a.signatur:hover { background: color-mix(in srgb, var(--kh-primary) 10%, #fff); }
.page_signature a.signatur.signed { border-color: transparent; background: transparent; min-height: 0; justify-content: flex-start; }
.page_signature a.signatur img { max-height: 90px; width: auto; display: block; }
.signatur-placeholder { display: inline-flex; align-items: center; gap: 8px; }
.signatur-placeholder svg { width: 22px; height: 22px; }
.signatur_text { display: block; }
.signatureActions { display: flex; gap: 4px; flex-wrap: wrap; margin: 2px 0 6px; }
.signatureActions .btn { font-family: var(--kh-font); }

.page_readonly { font-size: 14px; }
.page_readonly table { max-width: 100%; }

.actions, .sendPDF {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) {
    .actions { grid-template-columns: 1fr 1fr; }
    .actions > #generatePDF { grid-column: 1 / -1; }
    .actions > .btn:only-child { grid-column: 1 / -1; }
}

/* ---------- Dialoge des Assistenten ---------- */

.result-hero { text-align: center; padding: 8px 0 16px; }
.result-hero .result-icon {
    width: 64px; height: 64px; margin: 0 auto 10px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--kh-success-soft); color: var(--kh-success);
}
.result-hero .result-icon svg { width: 32px; height: 32px; }
.result-hero h4 { margin: 0 0 4px; font-size: 1.15rem; }
.result-hero p { margin: 0; color: var(--kh-muted); }

.choice-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .choice-grid { grid-template-columns: 1fr 1fr; } }
.choice {
    border: 1px solid var(--kh-border);
    border-radius: 12px;
    padding: 16px;
    background: var(--kh-surface-2);
    display: flex; flex-direction: column; gap: 10px;
}
.choice h5 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.choice h5 svg { width: 20px; height: 20px; color: var(--kh-primary); }
.choice p { margin: 0; font-size: .88rem; color: var(--kh-muted); }
.choice .btn { margin-top: auto; }

.share-link { display: flex; gap: 8px; }
.share-link .form-control { font-size: .9rem; }
.qr-box { display: flex; justify-content: center; margin: 12px 0; }
.qr-box img { width: 180px; height: 180px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--kh-border); }

.info-list > div + div { margin-top: 14px; }
.info-list b { display: block; color: var(--kh-primary-strong); margin-bottom: 4px; }

blockquote.hinweis {
    margin: 10px 0 16px;
    padding: 12px 16px;
    border-left: 4px solid var(--kh-primary);
    background: var(--kh-surface-2);
    border-radius: 0 10px 10px 0;
}

/* ---------- Promo ---------- */

.promo { margin-top: 40px; }
.promo-inner {
    display: grid; gap: 24px; align-items: center;
    grid-template-columns: 1fr;
}
@media (min-width: 800px) { .promo-inner { grid-template-columns: 2fr 1fr; } }
.promo-video { position: relative; display: block; border-radius: var(--kh-radius); overflow: hidden; box-shadow: var(--kh-shadow); }
.promo-video img { display: block; width: 100%; }
.promo-play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(220, 0, 0, .9); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.promo-play svg { width: 28px; height: 28px; fill: currentColor; margin-left: 4px; }

.vergleich-cta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    padding: 14px 16px;
}
.kh-footer .kh-footer-extra { grid-column: 1 / -1; }

/* Durch sparten_optionen.hide_elements ausgeblendete Bereiche */
.kh-hidden-by-option { display: none !important; }
