.floating-language-switcher {
    position: fixed;
    right: max(22px, env(safe-area-inset-right));
    bottom: max(22px, env(safe-area-inset-bottom));
    z-index: 2000;
    font-family: "Source Sans 3", Arial, sans-serif;
}

.floating-language-switcher button,
.floating-language-switcher a {
    font: inherit;
}

.language-switcher-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 0 17px;
    color: #fff;
    background: #132d4b;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(8, 17, 28, .24);
    cursor: pointer;
    font-size: .76rem !important;
    font-weight: 700;
    letter-spacing: .11em;
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.language-switcher-toggle:hover {
    background: #1b3d62;
    box-shadow: 0 11px 32px rgba(8, 17, 28, .3);
    transform: translateY(-2px);
}

.language-switcher-toggle:focus-visible,
.language-switcher-menu a:focus-visible {
    outline: 3px solid #d5b98d;
    outline-offset: 3px;
}

.language-switcher-toggle .language-current-flag,
.language-switcher-menu img {
    display: block;
    width: 22px;
    height: 16px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.language-switcher-chevron {
    width: 7px;
    height: 7px;
    margin: -4px 0 0 2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform .18s ease;
}

.floating-language-switcher.is-open .language-switcher-chevron {
    margin-top: 4px;
    transform: rotate(225deg);
}

.language-switcher-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: 205px;
    padding: 7px;
    border: 1px solid rgba(18, 23, 28, .1);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 44px rgba(8, 17, 28, .2);
    animation: language-menu-in .16s ease-out both;
}

.language-switcher-menu[hidden] {
    display: none;
}

.language-switcher-menu a,
.language-switcher-menu .language-upcoming {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 8px 11px;
    color: #27323b;
    border-radius: 9px;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease;
}

.language-switcher-menu a:hover,
.language-switcher-menu a[aria-current="page"] {
    color: #132d4b;
    background: #f2eee6;
}

.language-switcher-menu a[aria-current="page"]::after {
    content: "✓";
    margin-left: auto;
    color: #8f6b3d;
    font-size: .85rem;
}

.language-switcher-menu .language-upcoming {
    color: #64707a;
    cursor: default;
}

.language-german-flag {
    display: block;
    width: 22px;
    height: 16px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.language-upcoming small {
    margin-left: auto;
    color: #8b9298;
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

@keyframes language-menu-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .floating-language-switcher { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
    .language-switcher-toggle { min-height: 48px; padding: 0 14px; }
    .language-switcher-menu { width: 194px; }
}

@media (prefers-reduced-motion: reduce) {
    .language-switcher-toggle, .language-switcher-chevron, .language-switcher-menu a { transition: none; }
    .language-switcher-menu { animation: none; }
}
