/* =============================================================================
   KE Content Toggle Widget — v0.51.0
   Umschalter zwischen zwei Inhalten (Primär/Sekundär). Use-Case Monats-/
   Jahres-Pricing. Reines CSS für den Switch; JS tauscht nur die Klassen.
   ============================================================================= */

.ke-content-toggle__bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
}

.ke-content-toggle__switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.ke-content-toggle__switch:focus-visible {
    outline: 2px solid var(--ke-primary, #6366f1);
    outline-offset: 4px;
    border-radius: 6px;
}

.ke-content-toggle__label {
    font-weight: 600;
    color: var(--ke-text-light, #6b7280);
    transition: color 0.2s ease;
    line-height: 1.2;
}

.ke-content-toggle__label.is-active {
    color: var(--ke-text, #111827);
}

.ke-content-toggle__track {
    position: relative;
    flex: 0 0 auto;
    width: 52px;
    height: 28px;
    border-radius: 999px;
    background: var(--ke-border, #d1d5db);
    transition: background-color 0.2s ease;
}

.ke-content-toggle__knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-content-toggle.is-secondary .ke-content-toggle__knob {
    transform: translateX(24px);
}

.ke-content-toggle__badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    background: var(--ke-primary, #6366f1);
    color: #ffffff;
}

.ke-content-toggle__panel:not(.is-active) {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .ke-content-toggle__knob {
        transition: none;
    }
}

/* =============================================================================
   Tab-Stil (Segmented Control) — Switcher-Stil „tabs"
   Container wird zur Tab-Leiste, die zwei Labels zu Tabs; iOS-Track entfällt.
   ============================================================================= */
.ke-ct-style-tabs .ke-content-toggle__switch {
    gap: 4px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 12px;
}

.ke-ct-style-tabs .ke-content-toggle__track {
    display: none;
}

.ke-ct-style-tabs .ke-content-toggle__label {
    padding: 8px 20px;
    border-radius: 8px;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ke-ct-style-tabs .ke-content-toggle__label.is-active {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

@media (prefers-reduced-motion: reduce) {
    .ke-ct-style-tabs .ke-content-toggle__label {
        transition: none;
    }
}

/* ---- Tabs über volle Breite ---- */
.ke-ct-tabsfull-yes.ke-ct-style-tabs .ke-content-toggle__switch {
    display: flex;
    width: 100%;
}
.ke-ct-tabsfull-yes.ke-ct-style-tabs .ke-content-toggle__label {
    flex: 1 1 0;
    text-align: center;
}

/* ---- Icon in Label / Tab ---- */
.ke-content-toggle__icon {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    vertical-align: middle;
}
.ke-content-toggle__icon svg { width: 1em; height: 1em; fill: currentColor; }
.ke-content-toggle__icon i { font-size: 1em; }

/* ---- Badge am sekundären Label (inline) ---- */
.ke-content-toggle__badge--inline {
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 0.75em;
    vertical-align: middle;
}

/* ---- Panel-Übergang ---- */
.ke-ct-anim-fade .ke-content-toggle__panel.is-active {
    animation: ke-ct-fade-in 0.3s ease;
}
@keyframes ke-ct-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.ke-ct-anim-slide .ke-content-toggle__panel.is-active {
    animation: ke-ct-slide-in 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes ke-ct-slide-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .ke-ct-anim-fade .ke-content-toggle__panel.is-active,
    .ke-ct-anim-slide .ke-content-toggle__panel.is-active {
        animation: none;
    }
}
