/*
 * Leadwizard spacing:
 * - Prefer Bootstrap utilities in Fluid (mb-3/mb-4/mb-5, …) — $spacers in
 *   assets/kalo/src/scss/_bootstrap5/_variables.scss:
 *     2=0.5rem  3=1rem  4=1.5rem  5=3rem  6=40px
 * - Section rhythm: frame-inner-space-* / --frame-outer-spacing-variant-*
 * - APK "small" = 56px (same as .form-steps-wizard)
 */
.leadwizard {
    /* Match .form-steps-wizard so frame-*-small / mt-small use APK 56px */
    --frame-outer-spacing-variant-small: 56px;

    padding-top: var(--frame-outer-spacing-variant-small);
    padding-bottom: 3rem; /* BS spacer 5 */
}

/* Offer bands own vertical rhythm via frame-inner-space-* — no shell top gap */
.leadwizard--offer {
    padding-top: 0;
}

/*
 * APK: do not stack leadwizard padding-top on top of
 * frame-inner-space-before-extra-small + header frame-space-before-small (Alt).
 */
.leadwizard--content-max:not(.leadwizard--offer) {
    padding-top: 0;
    padding-bottom: 0;
}

/* Flow option contentMaxWidth — Alt: only .help-text is 620px */
.leadwizard--content-max:not(.leadwizard--offer) .leadwizard-text__help,
.leadwizard--content-max:not(.leadwizard--offer) .leadwizard-text__body {
    max-width: var(--lw-content-max);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/*
 * Layout owns text-align (not RTE text-center).
 * Offer card copy (addons intro etc.) is outside .leadwizard-text__* — stays left.
 */
.leadwizard:not(.leadwizard--offer) .leadwizard-text__header,
.leadwizard:not(.leadwizard--offer) .leadwizard-text__help,
.leadwizard:not(.leadwizard--offer) .leadwizard-text__body {
    text-align: center;
}

.leadwizard-text p {
    margin-bottom: 0.5rem;
}

.leadwizard-text ul {
    margin-bottom: 0.5rem;
}

.leadwizard-text.small p {
    font-size: 12px;
}

/* SH: back + headline share Alt APK header rhythm (page-link.prev) */
.leadwizard:not(.leadwizard--content-max) .leadwizard-sh-header {
    margin-top: 1rem;
}

.leadwizard:not(.leadwizard--content-max) .leadwizard-text__header {
    max-width: 732px;
    margin: 0 auto;
    padding: 1rem 0 3rem;
}

.leadwizard .form-wizard-nav .pagination {
    margin-bottom: 0;
}

.leadwizard .form-wizard-nav .page-item {
    margin: 0;
}

.leadwizard .form-wizard-nav .page-item .page-link .icon-line-arrow-left:before {
    font-size: 25px;
    font-weight: bold;
}

/* Stepbar mobile: keep circular page-link visible (not Alt absolute mobile-prev) */
.leadwizard--content-max .leadwizard-nav--stepbar .page-link.prev {
    position: relative;
    opacity: 1;
}

.leadwizard:not(.leadwizard--content-max) .leadwizard-text__header .text-large {
    font-size: 24px;
}

.leadwizard:not(.leadwizard--content-max) .leadwizard-text__help .text-large {
    font-size: 24px;
}

/* APK stepbar: progress always centered; back only beside it on mobile */
.leadwizard--content-max .leadwizard-stepbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0 1rem;
    min-height: 2rem;
}

.leadwizard--content-max .leadwizard-stepbar .leadwizard-nav--stepbar {
    flex-shrink: 0;
}

.leadwizard--content-max .leadwizard-stepbar .leadwizard-progress {
    padding-bottom: 0;
    max-width: none;
}

/* APK desktop back: Alt form-wizard-nav + page-link.prev (no leadwizard offsets) */

/* APK: ApkStepHeader is semantic h1 + .h4; size from Bootstrap h4, not overrides here */
.leadwizard--content-max .frame-header .element-header {
    color: #fff;
    margin-bottom: 0;
    line-height: 1;
}

.leadwizard--content-max .leadwizard-text__help {
    margin-top: 0;
    margin-bottom: var(--frame-outer-spacing-variant-small);
    color: #fff;
    line-height: var(--bs-body-line-height);
}

.leadwizard--content-max .leadwizard-text__help.help-text {
    max-width: var(--lw-content-max, 620px);
    margin-left: auto;
    margin-right: auto;
}

.leadwizard--content-max .leadwizard-card-radio-form {
    max-width: none;
    width: 100%;
}

/*
 * Contact card sits inside .frame-background-tertiary (color: white).
 * Reset to petrol / body color so legends like "Ihre persönlichen Informationen"
 * are readable on the white card (same pattern as Powermail in _form.scss).
 */
.leadwizard-contact-wrapper,
.leadwizard-contact {
    --frame-color: #004a5a;
    color: #004a5a;
}

.leadwizard-contact fieldset {
    border: 0;
    padding: 0;
}

.leadwizard-contact legend {
    float: none;
    width: auto;
    color: #004a5a;
}

/* form-floating labels must stay inside the control; long copy belongs in headline/description */
.leadwizard-contact .form-floating > label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.leadwizard-contact .leadwizard-field-feedback--error {
    text-align: left;
}

.leadwizard-option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.leadwizard-option__icon {
    width: auto;
    height: 80px;
    line-height: 0;
    margin-bottom: 24px;
}

.leadwizard-option__icon img {
    display: block;
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
}

.leadwizard-option__icon--sm {
    width: 48px;
    height: 48px;
    transition: all .15s ease-in-out;
}

.leadwizard-option__text {
    min-width: 0;
}

/* progressbar */
.leadwizard-progress {
    padding-bottom: 3rem;
}

.leadwizard-progress__dot {
    width: 64px;
    height: 3px;
    border-radius: 8px;
    background-color: #fff;
    transition: background-color 0.2s ease;
}

.leadwizard-progress__dot--active {
    background-color: #64DCA0;
    height: 16px;
}

.leadwizard-card-radio-form {
    border-radius: 8px;
    margin-bottom: 3rem;
}

/* SH (no contentMaxWidth): keep previous cap; APK width comes from frame-indent-8 */
.leadwizard-card-radio-form.col-10 {
    max-width: 853px;
}

.leadwizard-card-radio-form.compact {
    margin-bottom: 0;
}

/* cardradio */
.leadwizard-card-radio-option-wrapper .form-check-input {
    margin-left: 0;
    margin-top: 0;
}

.leadwizard-card-radio-option-wrapper .form-check-label {
    margin-top: 24px;
    transform: none;
    text-align: center;
}

.leadwizard-submit {
    text-align: center;
    padding-bottom: 40px;
}

.leadwizard-card-radio {
    padding-top: 1.5rem;
    justify-content: center;
}

.leadwizard-card-radio .leadwizard-card-radio-option-wrapper {
    margin-top: 0;
}

.leadwizard-card-radio .leadwizard-card-radio-option-wrapper .form-check {
    justify-content: flex-start;
    padding: 16px;
}

/* compact styles */
.leadwizard-card-radio--compact {
    gap: 24px;
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper {
    display: flex;
    flex-direction: column-reverse;
    flex-grow: 0;
    position: relative;
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .form-check {
    padding: 0;
    background-color: transparent;
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper input {
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    position: absolute;
    left: 0;
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper input:hover +.label-wrapper {
    background-color: #64dca0;
    transform: translateY(-4px);
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper input:checked +.label-wrapper {
    background-color: #64dca0;
    transform: translateY(-4px);
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .label-wrapper {
    display: flex;
    /*
     * Long labels (Immobilienverwalter:in ≈186px at 16px/700) must stay inside.
     * 240 − 2×20 pad = 200px content → clear inset, no overflow.
     */
    width: 240px;
    min-height: 159px;
    height: auto;
    flex-grow: 1;
    box-sizing: border-box;
    transition: all .15s ease-in-out;
    background-color: #fff;
    border-radius: 8px;
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .label-wrapper label {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 24px 20px;
    margin: 0;
    /* Same size as .withIcon / tablet / mobile — was 22px (too large for long labels) */
    font-size: 16px;
    line-height: 1.25;
    text-align: center;
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper input:hover +.label-wrapper label {
    cursor: pointer;
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .label-wrapper.large-text label {
    font-size: 22px;
    font-weight: normal;
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .label-wrapper .leadwizard-option__text {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: center;
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .label-wrapper label p {
    margin: 0;
    max-width: 100%;
    text-align: center;
    /* Prefer break after spaces ("Haus- &" / …); no mid-word hyphen clutter */
    hyphens: manual;
    -webkit-hyphens: manual;
    overflow-wrap: break-word;
    word-break: normal;
}

/* compact with icon styles */
.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .withIcon input:hover +.label-wrapper +.leadwizard-option__icon {
    transform: translateY(-4px);
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .withIcon input:checked +.label-wrapper +.leadwizard-option__icon {
    transform: translateY(-4px);
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .withIcon .leadwizard-option__icon {
    position: absolute;
    z-index: 1;
    top: 32px;
    /* Icon overlays the card; let clicks reach the radio/label underneath. */
    pointer-events: none;
}

.leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .withIcon .label-wrapper label {
    padding-top: 96px;
    font-size: 16px;
    justify-content: flex-start;
}

/*
 * Mobile compact radios: full-width stacked list
 * Radio (visual) · label · icon — equal side inset via parent frame / form.
 */
@media (max-width: 767.98px) {
    .leadwizard-card-radio--compact {
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
        gap: 12px;
        padding-top: 8px;
        margin-left: 0;
        margin-right: 0;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        margin-bottom: 0 !important;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .form-check {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        width: 100%;
        min-height: 64px;
        padding: 14px 16px;
        background-color: #fff;
        border-radius: 8px;
        position: relative;
    }

    /* Keep full-card hit target; show a decorative radio instead of the hidden input. */
    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .form-check::before {
        content: "";
        box-sizing: border-box;
        width: 1.5rem;
        height: 1.5rem;
        flex-shrink: 0;
        border: 2px solid #4fbeef;
        border-radius: 50%;
        background-color: #fff;
        pointer-events: none;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .form-check:has(input:checked) {
        background-color: #64dca0;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .form-check:has(input:checked)::before {
        border-color: #004a5a;
        background: radial-gradient(circle, #004a5a 0 38%, #fff 42%);
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper input {
        opacity: 0;
        width: 100%;
        height: 100%;
        inset: 0;
        position: absolute;
        z-index: 2;
        margin: 0;
        cursor: pointer;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper input:hover +.label-wrapper,
    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper input:checked +.label-wrapper {
        background-color: transparent;
        transform: none;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .label-wrapper {
        width: auto;
        height: auto;
        min-height: 0;
        flex: 1 1 auto;
        min-width: 0;
        background-color: transparent;
        border-radius: 0;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .label-wrapper label {
        justify-content: flex-start;
        align-items: center;
        flex-direction: row;
        padding: 0;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.25;
        text-align: left;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .label-wrapper .leadwizard-option__text,
    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .label-wrapper label p {
        text-align: left;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .withIcon input:hover +.label-wrapper +.leadwizard-option__icon,
    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .withIcon input:checked +.label-wrapper +.leadwizard-option__icon {
        transform: none;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .withIcon .leadwizard-option__icon {
        position: static;
        top: auto;
        z-index: 1;
        width: 40px;
        height: 40px;
        margin: 0;
        flex-shrink: 0;
        pointer-events: none;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .withIcon .leadwizard-option__icon img {
        margin: 0;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .withIcon .label-wrapper label {
        padding-top: 0;
        font-size: 16px;
        font-weight: 700;
        justify-content: flex-start;
    }

    /* Equal horizontal inset for help + option list */
    .leadwizard--content-max .leadwizard-text__help.help-text,
    .leadwizard-card-radio-form.compact {
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }
}

/* Number stepper */
.leadwizard-numberstepper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 24px 48px;
    gap: 16px;
}

.leadwizard-numberstepper__btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    /* Align with input (min-height 3.5rem), not with feedback below. */
    margin-top: calc((3.5rem - 40px) / 2);
    border-radius: 50%;
    border: 0;
    background-color: #4fbeef;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.leadwizard-numberstepper__input-wrapper {
    flex-grow: 1;
    max-width: 320px;
}

.leadwizard-numberstepper__input::-webkit-outer-spin-button,
.leadwizard-numberstepper__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/*
 * Contact form: spacing via Bootstrap utilities in Fluid
 * (py-5, px-3/px-md-5, mb-4, mt-4). CSS keeps validation + section rules.
 */
.leadwizard-contact .form-check-input.is-valid {
    background-color: revert;
    border-color: revert;
    box-shadow: revert;
}

.leadwizard-contact .form-check-input.is-valid ~.form-check-label {
    color: revert;
}

.leadwizard-conditional-field textarea,
.leadwizard-conditional-field input {
    max-width: 550px;
}

/* Section rules — spacing via spacer 6 (=40px) matches former token */
.leadwizard-contact .leadwizard-conditional-field.separator {
    border-top: 1px solid #d6e2e4;
    margin-top: 40px; /* BS spacer 6 */
    padding-top: 40px;
}

/*
 * APK only (.leadwizard--content-max): no 40+40 above first section
 * ("Ihre persönlichen Informationen"). Smart-Heizen keeps default above.
 */
.leadwizard--content-max .leadwizard-contact .leadwizard-conditional-field.separator {
    margin-top: 0;
    padding-top: 0;
}

.leadwizard--content-max .leadwizard-contact .leadwizard-conditional-field.separator ~ .leadwizard-conditional-field.separator {
    margin-top: 40px;
    padding-top: 40px;
}

.leadwizard-contact .leadwizard-conditional-field.separator.label-separator {
    border-top: 0 none;
}

.leadwizard-contact .leadwizard-conditional-field.separator.label-separator ~ .leadwizard-conditional-field.separator.label-separator {
    border-top: 1px solid #d6e2e4;
}

.leadwizard-field__headline {
    font-size: 24px;
    font-weight: 700;
    line-height: 28px;
}

.leadwizard-field__description {
    padding-top: 1rem; /* BS spacer 3 — keep until description has a utility hook */
    margin-bottom: -0.5rem;
    max-width: 550px;
}

.leadwizard-field__description a {
    color: var(--bs-secondary, #3f98bf);
    text-decoration: underline;
}

@media(max-width: 1199px) {
    .leadwizard >.frame-container >.no-progressbar-placeholder {
        /* height: 88px; */
    }

    .leadwizard-progress__dot {
        width: 32px;
    }   

    .leadwizard-progress__dot--active {
        height: 8px;
    }

}

/* Tablet: keep compact tiles, but not the mobile full-width list */
@media (min-width: 768px) and (max-width: 1199px) {
    .leadwizard-card-radio--compact {
        gap: 16px;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .label-wrapper {
        /* Was 140px — long role labels overflowed; match desktop rhythm scaled down */
        width: 200px;
        min-height: 140px;
        height: auto;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .label-wrapper label {
        font-size: 14px;
        font-weight: 700;
        padding: 20px 16px;
    }

    .leadwizard-card-radio--compact .leadwizard-card-radio-option-wrapper .withIcon .label-wrapper label {
        padding-right: 12px;
        padding-left: 12px;
    }
}

@media(max-width: 767px) {
    .leadwizard-progress {
        max-width: 340px;
        flex-wrap: wrap;
    }

    .leadwizard--content-max .leadwizard-text__help {
        margin-bottom: 40px;
    }
}

@media(max-width: 575px) {
    .leadwizard-progress {
        max-width: 230px;
    }

    .leadwizard-numberstepper {
        padding: 3rem 0.5rem 1.5rem;
        gap: 10px;
    }

    .leadwizard-numberstepper__btn {
        width: 32px;
        height: 32px;
        margin-top: calc((3.5rem - 32px) / 2);
    }

    .leadwizard-field__headline {
        padding: 0.5rem 0 1.5rem;
    }
}

/* —— Additive APK components (do not restyle shared SH chrome above) —— */
.leadwizard-zip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 16px 32px;
}

.leadwizard-zip .leadwizard-floating {
    width: 100%;
    max-width: 280px;
}

.leadwizard-zip__input {
    width: 100%;
    text-align: center;
    min-height: 3.5rem;
}

.leadwizard-numberstepper__input-wrapper .leadwizard-floating {
    width: 100%;
    /* Parent already has large padding-top; keep input on one line with +/-. */
    margin-top: 0;
}

.leadwizard-numberstepper__input {
    width: 100%;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #004a5a;
    min-height: 3.5rem;

    /* hide native number spinners since custom buttons replace them */
    -moz-appearance: textfield;
}

.leadwizard-floating .form-control.is-valid {
    padding-right: 12px;
}

/*
 * Custom floating label (not Bootstrap .form-floating):
 * Empty: label is the centered empty-state text (placeholder is transparent).
 * Filled: label floats above — driven by :placeholder-shown (no JS required).
 * .has-value remains as fallback when field-live-validation.js toggles it.
 */
.leadwizard-floating {
    position: relative;
    margin-top: 2.5rem;
}

.leadwizard-floating > .form-control::placeholder {
    color: transparent;
}

.leadwizard-floating > label {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 0.75rem;
    border: 0;
    color: #004a5a;
    opacity: 0.55;
    text-align: center;
    pointer-events: none;
    transform-origin: center top;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

.leadwizard-floating > .form-control:not(:placeholder-shown) + label,
[data-lw-field].has-value > .leadwizard-floating > label,
[data-lw-field].has-value .leadwizard-floating > label {
    inset: auto 0 auto 0;
    bottom: calc(100% - 0.15rem);
    height: auto;
    display: block;
    opacity: 0.85;
    transform: scale(0.75);
}

.leadwizard-field-feedback {
    width: 100%;
    max-width: 320px;
    margin-top: 0.5rem;
    text-align: center;
}

.leadwizard-zip .leadwizard-field-feedback,
.leadwizard-numberstepper__input-wrapper .leadwizard-field-feedback {
    max-width: 100%;
}

.leadwizard-field-feedback--success {
    color: #1aa800;
}

.leadwizard-field-feedback--error {
    display: none;
    color: #e52f2f;
    font-size: 12px;
}

.leadwizard-field-feedback--error:before {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='13' viewBox='0 0 3 13'%3E%3Cdesc%3EGenerated with Avocode.%3C/desc%3E%3Ctitle%3ERechteck 806%3C/title%3E%3Cpath fill='%23e52f2f' d='M1 12.2a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1z'/%3E%3Ctitle%3EPfad 1138%3C/title%3E%3Cpath fill='%23e52f2f' d='M.5 0h2c.276 0 .5.269.5.6l-.195 6c0 .331-.224.6-.5.6H.691c-.276 0-.5-.269-.5-.6L0 .6C0 .269.224 0 .5 0'/%3E%3Ctitle%3Ealtert-icn%3C/title%3E%3Ctitle%3EPfad 1138%3C/title%3E%3Cpath fill='%23e52f2f' d='M.5 0h2c.276 0 .5.269.5.6l-.195 6c0 .331-.224.6-.5.6H.691c-.276 0-.5-.269-.5-.6L0 .6C0 .269.224 0 .5 0'/%3E%3Ctitle%3ERechteck 806%3C/title%3E%3Cpath fill='%23e52f2f' d='M1 12.2a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1z'/%3E%3C/svg%3E");
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: contain;
    content: "";
    display: inline-block;
    height: 13px;
    width: 16px;
    vertical-align: middle;
}

.leadwizard-summary__list {
    margin: 0;
}

.leadwizard-summary__row {
    display: grid;
    grid-template-columns: minmax(8rem, 40%) 1fr;
    gap: 0.35rem 1rem;
    padding: 0.4rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.leadwizard-summary__row:first-child {
    border-top: 0;
    padding-top: 0;
}

.leadwizard-summary__row dt {
    margin: 0;
    font-weight: 500;
}

.leadwizard-summary__row dd {
    margin: 0;
    font-weight: 600;
}

/* Spacing: mb-4 / mt-n3 on legends in Fluid. Typography only here. */
.leadwizard-fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.leadwizard-fieldset__legend {
    float: none;
    width: auto;
    max-width: 100%;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #004a5a;
}

.leadwizard-fieldset__help {
    display: block;
    /* Pull up under legend — negative margin utilities disabled in theme */
    margin-top: -1rem;
    font-size: 16px;
    font-weight: 400;
    color: #004a5a;
}

@media (max-width: 767.98px) {
    .leadwizard-fieldset__legend {
        font-size: 18px;
    }
}

.leadwizard-contact input[readonly] {
    background-color: #eef3f4;
    cursor: not-allowed;
}

/* —— Offer page bands (Alt stepSix frame stack) ——
   Markup: Partials/StepType/OfferSummary.html
   List/card chrome: site _abform.scss (.form-steps-abwizard)
   Outer tertiary shell: Wizard/Step.html (.leadwizard.frame-background-tertiary)
*/
.leadwizard-offer-shell {
    max-width: none;
}

.leadwizard-offer-page {
    width: 100%;
    /* Sticky is position:fixed — clear it so back sits like other steps under progress */
    padding-top: 4.5rem;
}

@media (min-width: 1182px) {
    .leadwizard-offer-page {
        padding-top: 96px;
    }
}

.leadwizard-offer-hero {
    padding: 0;
}

/* Sticky: Alt abform (.calculated-price-header) — always fixed, no slide-in */
.leadwizard-offer-page > .calculated-price-header {
    pointer-events: auto;
    visibility: visible;
    transform: none;
    /* Parent .frame-background-tertiary sets color:#fff — reset for white sticky bar */
    color: #004a5a;
}

.leadwizard-offer-page > .calculated-price-header .element-header {
    color: #004a5a;
}

/*
 * Alt shows .calculated-price-info only from project-lg (1182px). On typical
 * laptop widths that hides the Liegenschafts-Satz — keep it from 992px up.
 */
@media (min-width: 992px) {
    .form-steps-abwizard.leadwizard-offer-page > .calculated-price-header .calculated-price-text {
        display: flex;
        align-items: center;
        flex: 1 1 auto;
        min-width: 0;
    }

    .form-steps-abwizard.leadwizard-offer-page > .calculated-price-header .calculated-price-info {
        display: block;
        flex: 1 1 auto;
        font-size: 12px;
        max-width: 400px;
        margin-left: 100px;
        margin-right: 16px;
        text-align: left;
        color: #004a5a;
    }
}

/* Offer: no wizard progress/nav — tighten tertiary shell top */
.leadwizard--offer > .frame-container {
    padding-top: 0;
}

/*
 * Same top rhythm as other APK steps (extra-small only), without stacking
 * offer topnav/hero padding on top. Sticky bar is fixed — clear it here.
 */
.leadwizard--offer .leadwizard-offer-frame-inner {
    padding-top: 0;
}

.leadwizard--offer .leadwizard-offer-shell {
    margin-top: 0;
}

.leadwizard-offer-page .calculated-price-scroll-to-services {
    margin-top: 60px;
    text-align: center;
}

.leadwizard-offer-page .carousel-scroll-arrow {
    color: var(--bs-secondary, #3f98bf);
    display: inline-block;
}

.leadwizard-offer-band {
    /* Full-bleed out of .frame-container / bootstrap column */
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    /* Vertical rhythm via .frame-inner-space-* (Alt parity), not extra padding */
    padding: 0;
}

.leadwizard-offer-band .frame-container {
    width: 100%;
    max-width: var(--bs-breakpoint-xl, 1140px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.leadwizard-offer-topnav {
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    padding-top: 0;
}

/* Back + title: frame-indent-8; spacing via mb-* in Fluid */
.leadwizard-offer-page--range .leadwizard-offer-range-header .element-header {
    line-height: 1.25;
}

/* Service icons top-aligned with headline (flex default stretch → tall icon box) */
.leadwizard-offer-page .list-group-services .form-group-item-inner {
    align-items: flex-start;
}

.leadwizard-offer-page .list-group-services .list-group-item > .row {
    align-items: flex-start;
}

/* Included services: light band (Alt: frame without tertiary) */
.leadwizard-offer-band--light {
    background: #fff;
    color: var(--bs-body-color, #212529);
}

/* Beat .form-steps-abwizard .element-header { color: white } so non-primary
   headline parts (e.g. "auf einem Blick") stay visible on the white band. */
.form-steps-abwizard .leadwizard-offer-band--light .element-header,
.form-steps-abwizard .leadwizard-offer-band--light .list-group-headline,
.form-steps-abwizard .leadwizard-offer-band--light .list-group-description {
    color: var(--bs-body-color, #212529);
}

.form-steps-abwizard .leadwizard-offer-band--light .element-header .text-primary {
    color: var(--bs-primary, #64dca0);
}

/* Optionals: keep tertiary look (Alt: #optionalCosts.frame-background-tertiary) */
.leadwizard-offer-band--tertiary {
    background: var(--frame-background, #005e7a);
    color: #fff;
}

.leadwizard-offer-band--tertiary .element-header,
.leadwizard-offer-band--tertiary .list-group-headline,
.leadwizard-offer-band--tertiary .list-group-description,
.leadwizard-offer-band--tertiary h4 {
    color: #fff;
}

/* Modals stay in DOM under the tertiary band → would inherit white text on
   white .modal-content. Reset body/close; keep address header on tertiary.
   Also beat `.leadwizard-offer-band--tertiary h4 { color:#fff }` (h4 in modal body). */
.leadwizard-offer-page .modal-content {
    color: var(--bs-body-color, #212529);
}

/*
 * Site .modal-content-address uses 64px vertical padding below lg — fine with
 * icon+title, oversized for our title-only header. Keep desktop 40px, tighten mobile.
 * Clear absolute .btn-close (40×40) with side padding — not huge padding-top.
 */
@media (max-width: 991.98px) {
    .leadwizard-offer-page .modal-content-address .modal-header,
    .leadwizard-offer-page .modal-content-address .modal-body {
        padding: 1.5rem 1.5rem;
    }

    .leadwizard-offer-page .modal-content-address .modal-header .modal-title {
        /* Beat compat _modal.scss sm: padding-top 2.5rem / padding-right 0 */
        padding-top: 0;
        padding-right: calc(2.5rem + 1rem); /* clear absolute close */
        padding-left: 0;
        font-size: 1.25rem; /* ~20px — h4 is 32 and dominates the small sheet */
        line-height: 1.3;
        text-align: left;
    }
}

.leadwizard-offer-page .modal-body,
.leadwizard-offer-page .modal-body h1,
.leadwizard-offer-page .modal-body h2,
.leadwizard-offer-page .modal-body h3,
.leadwizard-offer-page .modal-body h4,
.leadwizard-offer-page .modal-body h5,
.leadwizard-offer-page .modal-body h6,
.leadwizard-offer-page .modal-body p,
.leadwizard-offer-page .modal-body li,
.leadwizard-offer-page .modal-body strong {
    color: var(--bs-body-color, #212529);
}

.leadwizard-offer-page .modal-body .text-primary {
    color: var(--bs-primary, #64dca0);
}

/*
 * Info “i” + service modals: prefer Alt classes
 * (.icon-info-modal / .service-info-modal-trigger / .modal-content-address /
 *  .btn-close-white). Size comes from .form-steps-abwizard … svg { 24px }.
 * Only align the price-row trigger (outside list-group-headline).
 */
.leadwizard-offer-page .leadwizard-offer-range-card__price-row .icon-info-modal {
    display: inline-flex;
    vertical-align: baseline;
}

.leadwizard-offer-page .leadwizard-offer-range-card__price-row .service-info-modal-trigger {
    display: inline-flex;
    align-items: center;
    /* Outside .text-primary — inherit card dark (#004a5a), not green */
    color: inherit;
    line-height: 1;
}

.leadwizard-offer-page .leadwizard-offer-range-card__price-row .icon-info-modal svg {
    /* Match .list-group-headline .icon-info-modal svg in _abform.scss */
    width: 1.5rem;
    height: 1.5rem;
    margin-bottom: 0;
    fill: currentColor;
}

.calculated-price-scroll-to-services a {
    color: inherit;
    text-decoration: underline;
}

/* Preisspanne card: look + type. Spacing via p-* mb-* in Fluid. */
.leadwizard-offer-page--range .leadwizard-offer-range-title .element-header {
    color: #fff;
    line-height: 1.25;
}

.leadwizard-offer-page--range .leadwizard-offer-range-intro {
    color: rgba(255, 255, 255, 0.9);
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
    line-height: 1.55;
    text-align: center;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card {
    background: #fff;
    color: #004a5a;
    border-radius: 0.75rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__price {
    text-align: left;
    border-bottom: 1px solid rgba(0, 74, 90, 0.12);
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__price-label {
    font-size: 1rem;
    font-weight: 600;
    color: #004a5a;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__price-value {
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.15;
    text-align: left;
}

@media (min-width: 768px) {
    .leadwizard-offer-page--range .leadwizard-offer-range-card__price-value {
        font-size: 2.25rem;
    }
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__price-row {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: nowrap;
    max-width: 100%;
    letter-spacing: -0.02em;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__price-sep {
    margin: 0 0.2em;
    letter-spacing: 0;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__price-currency {
    margin-left: 0.2em;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__onetime {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #004a5a;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__onetime strong {
    font-weight: 700;
    color: #004a5a;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__scope-heading {
    font-size: 1.5rem; /* Design: larger than body / badge (≈24px) */
    font-weight: 400;
    line-height: 1.35;
    color: #004a5a;
}

/* Site list markers: .list-check → --list-check-marker, .list-chevron → --list-chevron-marker */

.leadwizard-offer-page--range .leadwizard-offer-range-card__scope-badge > li {
    margin-bottom: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    color: #004a5a;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__scope-badge > li:before {
    top: 50%;
    transform: translateY(-50%);
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__scope-intro {
    padding-left: 0;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    color: #004a5a;
}

/* Same .list-check layout as scope-badge; plus marker matches check geometry (44×44, stroke 2) */

.leadwizard-offer-page--range .leadwizard-offer-range-card__optional-badge > li {
    margin-bottom: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    color: #004a5a;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__optional-badge > li:before {
    top: 50%;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M0.99986,22.00011c0,-11.59798 9.40202,-21 21,-21c11.59798,0 21,9.40202 21,21c0,11.59798 -9.40202,21 -21,21c-11.59798,0 -21,-9.40202 -21,-21z' fill='none' stroke='%2364dca0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M22 14v16M14 22h16' fill='none' stroke='%2364dca0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__divider {
    border: 0;
    border-top: 1px solid rgba(0, 74, 90, 0.16);
    opacity: 1;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__scope-list,
.leadwizard-offer-page--range .leadwizard-offer-range-card__optional-list {
    font-size: 0.95rem;
    line-height: 1.45;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__scope-list > li,
.leadwizard-offer-page--range .leadwizard-offer-range-card__optional-list > li {
    margin-bottom: 0.5rem;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__optional-list > li {
    font-weight: 700;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__scope-list > li:last-child,
.leadwizard-offer-page--range .leadwizard-offer-range-card__optional-list > li:last-child {
    margin-bottom: 0;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__link {
    margin: 0;
    font-size: 0.95rem;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__link a {
    color: var(--bs-secondary, #3f98bf);
    text-decoration: underline;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__optional {
    border: 0;
    background: transparent;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__optional-intro {
    font-size: 0.95rem;
    line-height: 1.4;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__optional-note {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.45;
    color: #004a5a;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__cta {
    text-align: left;
}

.leadwizard-offer-page--range .leadwizard-offer-range-card__cta .btn {
    width: auto;
    max-width: none;
    white-space: nowrap;
}

.leadwizard-offer-page--range .leadwizard-offer-range-optional-intro {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

/*
 * Offer band headers: mb-5 in Fluid. Beat .frame-header { md: 32px }.
 */
@media (max-width: 767.98px) {
    .leadwizard-offer-page .leadwizard-offer-band .frame-header.mb-5 {
        margin-bottom: 3rem;
    }
}

.leadwizard-offer-page--range .leadwizard-offer-included-header {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
}

.leadwizard-offer-page--range .leadwizard-offer-included-header__sub {
    color: var(--bs-body-color, #212529);
}

/* Offer range — mobile overflow / full-width CTA */
@media (max-width: 767.98px) {
    .leadwizard-offer-page--range .leadwizard-offer-range-card__scope-badge > li,
    .leadwizard-offer-page--range .leadwizard-offer-range-title .element-header {
        overflow-wrap: anywhere;
        hyphens: manual;
    }

    .leadwizard-offer-page--range .leadwizard-offer-range-card__cta .btn {
        display: block;
        width: 100%;
        max-width: 100%;
        white-space: normal;
        line-height: 1.3;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .leadwizard-offer-page--range .leadwizard-offer-band .frame-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .leadwizard-offer-page--range .list-group-inclusitivy-mobile-wrapper {
        padding-left: 0;
        padding-right: 0;
    }

    .leadwizard-offer-page--range .leadwizard-offer-cta .btn {
        display: block;
        width: 100%;
        max-width: 100%;
        white-space: normal;
        line-height: 1.3;
    }
}
