/* Kippschalter Hell/Dunkel (component/ktp-farbmodus-umschalter.html.twig), Schalter dunkelModus. Klein und immer
   geladen, solange der Schalter zu sehen ist; die dunklen Farben selbst stehen in ktp-dunkel.css. */

.ktp-farbmodus {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    vertical-align: middle;
}

/* In der Kopfzeile nur der Schalter, der Text steht als aria-label/Tooltip am Knopf */
.ktp-farbmodus--kopf .ktp-farbmodus__text {
    display: none;
}

.ktp-farbmodus__schalter {
    position: relative;
    flex: none;
    width: 46px;
    height: 26px;
    padding: 0;
    border: 1px solid #E3E6EA;
    border-radius: 999px;
    background: #F1F4F7;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.ktp-farbmodus__knopf {
    position: absolute;
    top: 2px;
    left: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    color: #E8A317;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.ktp-farbmodus__mond {
    display: none;
}

.ktp-farbmodus__schalter[aria-checked="true"] {
    border-color: #2f4560;
    background: #0e1a27;
}

/* Dunkel = „Licht an“: der Knopf wird zum gelben Mond mit leichtem Schein (wie Logo-Flocke und Knöpfe) */
.ktp-farbmodus__schalter[aria-checked="true"] .ktp-farbmodus__knopf {
    transform: translateX(20px);
    background: #ffd54a;
    color: #0b1520;
    box-shadow: 0 0 10px rgba(255, 213, 74, .65);
}

.ktp-farbmodus__schalter[aria-checked="true"] .ktp-farbmodus__sonne {
    display: none;
}

.ktp-farbmodus__schalter[aria-checked="true"] .ktp-farbmodus__mond {
    display: block;
}

.ktp-farbmodus__schalter:focus-visible {
    outline: 2px solid #69C8F3;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .ktp-farbmodus__schalter,
    .ktp-farbmodus__knopf {
        transition: none;
    }
}

/* Handy-Menü: eigene Zeile unter MwSt., Sprache und Währung, Text links, Schalter rechts */
.ktp-farbmodus.ktp-farbmodus--menue {
    display: flex;
    justify-content: space-between;
    margin: 4px 16px 16px;
    font-size: 14px;
}
