/* Vollständiger Ersatz der beschädigten Datei.
   Konfigurator: native Radios/Select und natives Dialog mit CSS-Animationen. */
.configurator {
    --cfg-blue: #0072ce;
    --cfg-navy: #243c4b;
    --cfg-muted: #536874;
    --cfg-line: #bfd7e7;
    --cfg-bg: #f4f8fb;
    --cfg-shadow: 0 18px 55px rgba(18, 54, 75, .18);
    --plan-blue: #0072ce;
    --plan-blue-hover: #005fae;
    --hover-blue: #dceefa;
    --ink: #243c4b;
    --radio-card-selected: #eaf6fd;
    --focus-ring: rgba(0, 114, 206, .42);
    --control-ease: cubic-bezier(.2, .75, .25, 1);
    position: relative;
    color: var(--cfg-navy);
}
/* Zentrale Button-Typografie (inkl. font-weight: 700) nicht zurücksetzen. */
.configurator button:not(.btn):not(.m5-btn-primary),
.configurator select {
    font: inherit;
}
.configurator button {
    cursor: pointer;
}
.configurator button:focus-visible {
    outline: 4px solid rgba(0, 114, 206, .25);
    outline-offset: 2px;
}
.configurator .choice-input,
.configurator .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.configurator fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.configurator .field-label {
    float: none;
    width: auto;
    display: block;
    color: var(--plan-blue);
    font-family: "Poppins", Arial, sans-serif;
    font-weight: 700;
    font-size: 19px;
    margin-bottom: 11px;
}
/* ---------- Desktop ---------- */
.configurator-stage {
    position: relative;
    z-index: 3;
    padding: 0 24px 80px;
}
.configurator-stage .desktop-grid {
    width: 100%;
    max-width: 1296px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(310px, 1fr);
    gap: 32px;
    align-items: start;
}
.configurator .panel,
.configurator .conversion {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
}
.configurator-stage .panel,
.configurator-stage .conversion {
    box-shadow: 0 12px 35px rgba(36, 60, 75, .14), 0 2px 6px rgba(36, 60, 75, .05);
    transition: box-shadow .3s ease, opacity .25s ease, transform .35s ease;
}
.configurator .conversion {
    position: sticky;
    top: 110px;
}
/* ---------- Modus-Auswahl ---------- */
.configurator .mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.configurator .mode-wrap {
    min-width: 0;
}
.configurator .mode-card {
    position: relative;
    display: block;
    min-height: 198px;
    padding: 1rem;
    border: 2px solid #bfd9ec;
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-weight: 400;
    transition:
        background-color 190ms var(--control-ease),
        border-color 190ms var(--control-ease),
        box-shadow 190ms var(--control-ease),
        transform 160ms var(--control-ease);
}
.configurator .mode-card .eyebrow {
    color: var(--plan-blue);

    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.configurator .mode-card .title {
    display: block;
    font: 700 24px "Poppins", Arial, sans-serif;
    margin: 0 0 1rem;
    color: var(--ink);
}
.configurator .mode-card .copy {
    display: block;
    color: var(--ink);
    line-height: 1.5;
    font-weight: 400;
    font-size: 18px;
    font-family: Arial, sans-serif;
}
.configurator .radio-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    transition: background-color 190ms var(--control-ease);
}
.configurator .radio-dot ion-icon {
    width: 36px;
    height: 36px;
    transition: color 190ms var(--control-ease);
}
.configurator .radio-dot ion-icon[name="ellipse-outline"] {
    color: var(--cfg-line);
}
.configurator .radio-dot ion-icon[name="checkmark-circle"] {
    display: none;
}
.configurator .mode-card:hover {
    background: var(--hover-blue);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(0, 114, 206, .14);
    transform: translateY(-1px);
}
.configurator .choice-input:checked + .mode-card {
    background: var(--radio-card-selected);
    border-color: var(--plan-blue);
    box-shadow: none;
}
.configurator .choice-input:checked + .mode-card .radio-dot ion-icon[name="ellipse-outline"] {
    display: none;
}
.configurator .choice-input:checked + .mode-card .radio-dot ion-icon[name="checkmark-circle"] {
    display: block;
    fill: #0072ce;
}
.configurator .choice-input:checked + .mode-card:hover {
    background: #d9edf9;
    border-color: var(--plan-blue-hover);
    box-shadow: 0 8px 20px rgba(0, 82, 148, .15);
}
.configurator .choice-input:focus-visible + .mode-card {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}
.configurator .mode-card:active {
    transform: translateY(1px) scale(.99);
    transition-duration: 80ms;
}
/* ---------- Auswahl-Controls ---------- */
.configurator .custom-options {
    margin-top: 30px;
}
.configurator .panel:has(input[name="cfg-path"][value="recommended"]:checked) .custom-options,
.configurator .sheet:not(.is-custom) .custom-options {
    display: none;
}
.configurator .field {
    margin: 0 0 22px;
}
.configurator .mode-field {
    margin: 0;
}
.configurator .segmented {
    display: grid;
    gap: 1rem;
}
.configurator .segmented.cols-2 { grid-template-columns: repeat(2, 1fr); }
.configurator .segmented.cols-3 { grid-template-columns: repeat(3, 1fr); }
.configurator .segmented.cols-4 { grid-template-columns: repeat(4, 1fr); }
.configurator .option-wrap {
    position: relative;
    min-width: 0;
}
.configurator .option-label {
    display: grid;
    place-items: center;
    height: 100%;
    padding: 1rem;
    border: 0;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(18, 53, 78, .055);
    color: var(--ink);
    cursor: pointer;
    font-family: "Poppins", Arial, sans-serif;
    font-weight: 400;
    text-align: center;
    transition:
        background-color 190ms var(--control-ease),
        color 190ms var(--control-ease),
        box-shadow 190ms var(--control-ease),
        transform 160ms var(--control-ease);
}
.configurator .option-label:hover {
    background: var(--hover-blue);
    box-shadow: 0 8px 20px rgba(0, 114, 206, .14);
    transform: translateY(-1px);
}
.configurator .choice-input:checked + .option-label {
    background: var(--plan-blue);
    color: #fff;
    box-shadow: none;
    font-weight: 700;
}
.configurator .choice-input:checked + .option-label:hover {
    background: var(--plan-blue-hover);
    box-shadow: 0 7px 18px rgba(0, 82, 148, .20);
}
.configurator .choice-input:focus-visible + .option-label {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}
.configurator .option-label:active {
    transform: translateY(1px) scale(.99);
    transition-duration: 80ms;
}
/* ---------- Land-Select ---------- */
.configurator .select-wrap {
    position: relative;
}
.configurator .select-wrap select {
    appearance: none;
    width: 100%;
    min-height: 58px;
    padding: 0 46px 0 14px;
    border: 1px solid #9ecbed;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-family: "Poppins", Arial, sans-serif;
    font-weight: 400;
    transition:
        background-color 190ms var(--control-ease),
        border-color 190ms var(--control-ease),
        box-shadow 190ms var(--control-ease);
}
.configurator .select-wrap select:hover {
    background: var(--hover-blue);
    border-color: var(--plan-blue-hover);
    box-shadow: 0 7px 18px rgba(0, 114, 206, .12);
}
.configurator .select-wrap select:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}
.configurator .select-wrap ion-icon {
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--plan-blue);
    pointer-events: none;
    transition: color 190ms var(--control-ease);
}
.configurator .select-wrap:has(option:checked) select {
    background: var(--plan-blue);
    color: #fff;
    border-color: transparent;
    box-shadow: none;
    font-weight: 700;
}
.configurator .select-wrap:has(option:checked) select:hover {
    background: var(--plan-blue-hover);
    box-shadow: 0 7px 18px rgba(0, 82, 148, .20);
}
.configurator .select-wrap:has(option:checked) ion-icon {
    color: #fff;
}
.configurator .select-wrap select:open,
.configurator .select-wrap:has(option:checked) select:open {
    background: #fff;
    color: var(--ink);
    font-weight: 400;
}
.configurator .select-wrap select:open ~ ion-icon,
.configurator .select-wrap:has(option:checked) select:open ~ ion-icon {
    color: var(--plan-blue);
}
.configurator .select-wrap select option,
.configurator .select-wrap select:open option {
    background: #fff;
    color: var(--ink);
}
.configurator .select-wrap select option:checked,
.configurator .select-wrap select:open option:checked {
    background: #fff;
    color: var(--ink);
    font-weight: 700;
}
/* ---------- Conversion ---------- */
.configurator .summary-title {
    font: 700 22px "Poppins", Arial, sans-serif;
    margin: 0 0 22px;
    color:var(--plan-blue);
}
.configurator .price {
    font: 700 54px "Poppins", Arial, sans-serif;
    margin: 5px 0 22px;
    color: var(--cfg-muted);
}
.configurator .price span {
    font-size: 2rem;
    color: var(--ink);
}
.configurator .price .price-amount {
    font-size: inherit;
    color: var(--cfg-blue);
}
.configurator .trust {
    display: grid;
    gap: 15px;
    margin: 22px 0 28px;

    color: var(--ink);
    line-height: 1.5;
    font-weight: 400;
    font-size: 1rem;
    font-family: "Poppins", Arial, sans-serif;
}
.configurator .trust div:before {
    color: var(--cfg-blue);
    font-weight: bold;
    margin-right: 10px;
}

.configurator .conversion .trust > div {
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: start;
}
.configurator .conversion .trust > div::before {
    content: none;
}
.configurator .conversion .trust > div > ion-icon {
    grid-column: 1;
    font-size: 24px;
    color: var(--cfg-blue);
}
.configurator .conversion .trust > div > span {
    grid-column: 2;
    font-size: 18px;
    font-family: Arial, sans-serif;
}
.configurator .cta {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 55px;
    border: 0;
    border-radius: 999px;
    background: #ffd400;
    color: #263c49;
    cursor: pointer;
    font-family: "Poppins", Arial, sans-serif;
    font-weight: 700;
    text-decoration: none;
    transition:
        background-color 190ms var(--control-ease),
        box-shadow 190ms var(--control-ease),
        transform 160ms var(--control-ease);
}
.configurator .cta:hover {
    background: #ffdc1b;
    box-shadow: 0 8px 20px rgba(173, 139, 0, .22);
    transform: translateY(-1px);
}
.configurator .cta:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}
.configurator .cta:active {
    transform: translateY(1px) scale(.99);
    transition-duration: 80ms;
}
.configurator .mobile-bar .cta {
    min-height: 66px;
    font-size: 23px;
}
.configurator .sheet-footer .cta {
    min-height: 58px;
    font-size: 20px;
}
.configurator .support {
    color: var(--cfg-muted);
    text-align: center;
    margin: 16px 0 0;
}
.configurator .conversion-cta {
    transition: opacity .25s ease, transform .25s ease, box-shadow .2s;
}
.configurator .conversion-cta.is-hidden {
    opacity: 0;
    transform: scale(.92);
    pointer-events: none;
}
.configurator .mobile-bar {
    display: none;
}
/* ---------- Natives Dialog: Desktop zentriert, Mobile als Bottom Sheet ---------- */
.configurator .sheet {
    --sheet-position: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: var(--sheet-position);
    width: min(640px, calc(100vw - 48px));
    max-height: min(86dvh, 900px);
    margin: 0;
    background: #fff;
    border: 0;
    border-radius: 34px;
    box-shadow: var(--cfg-shadow);
    overflow: hidden;
    padding: 0;
}
.configurator .sheet[open] {
    display: flex;
    animation:
        cfg-sheet-fade-in 340ms ease-out both,
        cfg-sheet-rise 340ms cubic-bezier(.22, 1, .36, 1) both;
}
/* JS setzt nur den Exit-State und ruft close() nach dem Animationsende auf. */
.configurator .sheet[open].is-closing {
    pointer-events: none;
    animation:
        cfg-sheet-fade-out 220ms ease-in both,
        cfg-sheet-lower 260ms cubic-bezier(.4, 0, 1, 1) both;
}
.configurator .sheet::backdrop {
    background: rgba(23, 56, 75, .48);
}
.configurator .sheet[open]::backdrop {
    animation: cfg-sheet-fade-in 340ms ease-out both;
}
.configurator .sheet[open].is-closing::backdrop {
    animation: cfg-sheet-fade-out 260ms ease-in both;
}
@keyframes cfg-sheet-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes cfg-sheet-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}
@keyframes cfg-sheet-rise {
    from { transform: var(--sheet-position) translateY(32px); }
    to { transform: var(--sheet-position) translateY(0); }
}
@keyframes cfg-sheet-lower {
    from { transform: var(--sheet-position) translateY(0); }
    to { transform: var(--sheet-position) translateY(32px); }
}
.configurator .sheet-head {
    flex: 0 0 auto;
    padding: 15px 20px 8px;
    box-shadow: 0 12px 35px rgba(36, 60, 75, .14), 0 2px 6px rgba(36, 60, 75, .05);
    transition: box-shadow .3s ease, opacity .25s ease, transform .35s ease;
}
.configurator .handle {
    width: 70px;
    height: 7px;
    border-radius: 9px;
    background: #d4dde5;
    margin: 0 auto 12px;
}
.configurator .sheet-close {
    float: right;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #243c4b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.configurator .sheet-close ion-icon {
    font-size: 24px;
}
.configurator .sheet-title {
    font: 700 2rem "Poppins", Arial, sans-serif;
    color: var(--plan-blue);
    line-height: 1;
    letter-spacing: -0.75px;
}
.configurator .sheet-subtitle {
    color: var(--cfg-muted);
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
}
.configurator .sheet-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 14px 20px 28px;
}
.configurator .sheet .mode-card {
    min-height: max-content;
    padding: 1rem;
}
.configurator .sheet .mode-card .copy {
    font-size: 1rem;
}
.configurator .sheet .mode-grid {
    grid-template-columns: 1fr;
}
.configurator .sheet .field {
    margin-bottom: 18px;
}
.configurator .sheet .field-label {
    font-size: 18px;
}
.configurator .sheet .option-label {
    min-height: 56px;
    padding: 1rem;
    font-size: 14px;
}
.configurator .sheet .field:has(input[name="cfg-gender-sheet"]) .segmented {
    grid-template-columns: 1fr 1fr;
}
.configurator .sheet .field:has(input[name="cfg-continent-sheet"]) .segmented {
    grid-template-columns: 1fr 1fr 1fr;
}
.configurator .sheet .field:has(input[name="cfg-gender-sheet"]) .segmented .option-wrap:first-child,
.configurator .sheet .field:has(input[name="cfg-continent-sheet"]) .segmented .option-wrap:first-child {
    grid-row: 1;
    grid-column: 1 / -1;
}
.configurator .sheet .field:has(input[name="cfg-gender-sheet"]) .segmented .option-wrap:not(:first-child),
.configurator .sheet .field:has(input[name="cfg-continent-sheet"]) .segmented .option-wrap:not(:first-child) {
    grid-row: 2;
}
.configurator .sheet-footer {
    flex: 0 0 auto;
    border-top: 1px solid var(--cfg-line);
    background: #fff;
    padding: 16px 20px calc(15px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(23, 56, 75, .07);
}
.configurator .sheet-footer .footer-line {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 13px;
}
.configurator .sheet-footer .summary-title {
    font-size: 17px;
    margin: 0;
    max-width: 55%;
}
.configurator .sheet-footer .price {
    font-size: 2rem;
    margin: 0;
    color: var(--plan-blue);
}
.configurator .sheet-footer .price span {
    font-size: 1rem;
    color: var(--ink);
}
.configurator .sheet-footer .price .price-amount {
    font-size: inherit;
    color: inherit;
}
.configurator .sheet-footer .trust {
    color: var(--ink);
    gap: 16px;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    margin: 0 0 1rem;

    ion-icon {
        color:var(--plan-blue);
        font-size: 24px;
    }
}

.configurator .sheet-footer .trust > div {
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: start;
}
.configurator .sheet-footer .cta {
    min-height: 58px;
    font-size: 20px;
}
.configurator .sheet-footer .support {
    font-size: 13px;
    margin-top: 9px;
}
/* ---------- Reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
    .configurator .sheet[open],
    .configurator .sheet[open].is-closing,
    .configurator .sheet[open]::backdrop,
    .configurator .sheet[open].is-closing::backdrop {
        animation: none;
    }
    .configurator .mode-card,
    .configurator .option-label,
    .configurator .select-wrap select,
    .configurator .cta {
        transition: none;
    }
    .configurator .mode-card:hover,
    .configurator .option-label:hover,
    .configurator .cta:hover {
        transform: none;
    }
}
/* ---------- Mobile ---------- */
.configurator .mobile-bar [data-open-configurator][hidden] {
    display: none;
}
@media (max-width: 1099.98px) {
    body {
        padding-bottom: 140px;
    }
    .configurator-stage {
        display: none;
    }
    .configurator .mobile-bar {
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        z-index: 1030;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        border-top: 1px solid var(--cfg-line);
        padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
        box-shadow: 0 -12px 35px rgba(18, 54, 75, .12);
        transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
    }
    .configurator .mobile-bar.is-visible {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition-delay: 0s;
    }
    /* Die einmalige Erst-Einblendung bleibt unabhängig vom Scroll-State. */
    .configurator .mobile-bar.is-visible.is-scroll-hidden {
        opacity: 0;
        transform: translateY(12px);
        visibility: hidden;
        pointer-events: none;
        transition-delay: 0s, 0s, .2s;
    }
    @media (prefers-reduced-motion: reduce) {
        .configurator .mobile-bar {
            transition: none;
        }
        .configurator .mobile-bar.is-visible.is-scroll-hidden {
            transform: none;
        }
    }
    .configurator .sheet {
        --sheet-position: translate(0, 0);
        inset: auto 0 0 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 90svh;
        border-radius: 34px 34px 0 0;
    }
    .configurator .sheet.is-custom {
        height: 100svh;
        max-height: 100svh;
    }
    /* Auf niedrigen mobilen Viewports mehr Platz fuer die Auswahl lassen. */
    @media (max-height: 699.98px) {
        .configurator .sheet-footer .trust {
            display: none;
        }
    }
    .configurator .bar-row {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: baseline;
        gap: 12px;
        margin-bottom: 8px;

        .c-headline {
            color:var(--plan-blue);
        }
    }
    .configurator .bar-summary {
        border: 0;
        background: transparent;
        text-align: left;
        color: var(--cfg-navy);
        padding: 0;
    }
    .configurator .bar-summary strong {
        display: block;
    }
    .configurator .bar-summary span {
        font-size: 14px;
        color: var(--cfg-muted);
    }
    .configurator .adjust {
        border: 0;
        background: transparent;
        color: var(--cfg-blue);
        font-weight: 700;
    }
}
