.tx-lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tx-lang-switcher__trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    color: inherit;
    font: inherit;
    line-height: 1;
}

/* Issue #1660: gleiches Hover/Farb-Verhalten wie die ausgeloggten Menüpunkte
   (tx-loggedout-nav__link): Ruhezustand schwarz, Hover heller lila Hintergrund
   + lila Text. Keine eigenen Sonderfarben mehr. */
.tx-lang-switcher__trigger:hover,
.tx-lang-switcher__trigger:focus-visible {
    background: rgba(35, 3, 106, 0.06);
    color: var(--primary, #23036A);
    outline: none;
}

/* Globus- + Caret-Icon: im Ruhezustand schwarz wie die übrigen Menüpunkte
   (Issue #897: nicht weiß-auf-weiß; Issue #1660: nicht lila). */
.tx-lang-switcher__trigger .material-symbols-outlined {
    color: var(--text-primary, #1A1A1A);
}

.tx-lang-switcher__trigger:hover .material-symbols-outlined,
.tx-lang-switcher__trigger:focus-visible .material-symbols-outlined {
    color: var(--primary, #23036A);
}

.tx-lang-switcher__current {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
    color: var(--text-primary, #1A1A1A);
}

.tx-lang-switcher__trigger:hover .tx-lang-switcher__current,
.tx-lang-switcher__trigger:focus-visible .tx-lang-switcher__current {
    color: var(--primary, #23036A);
}

.tx-lang-switcher__caret {
    font-size: 1.125rem !important;
    transition: transform 120ms ease;
}

.tx-lang-switcher[data-open="true"] .tx-lang-switcher__caret {
    transform: rotate(180deg);
}

.tx-lang-switcher__menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 120px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    /* Explizite dunkle Textfarbe: sonst erben die <li>-Optionen die (teils
       weiße) Nav-Textfarbe des Headers → weiß auf weiß (Issue #897). */
    color: #1a1a1a;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.tx-lang-switcher__option {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.875rem;
    text-transform: uppercase;
    color: #1a1a1a;
}

.tx-lang-switcher__option:hover {
    background: rgba(35, 3, 106, 0.06);
    color: var(--primary, #23036A);
}

.tx-lang-switcher__option.is-active {
    font-weight: 700;
    color: var(--primary, #23036A);
    background: rgba(35, 3, 106, 0.06);
}
