/* Language switcher — syndesi_language_switcher() / [language_switcher]
   Added 2026-09-28. In the header it sits top-right of the menu bar
   (top-left on mobile, opposite the hamburger). */
.lang-switcher {
    display: flex;
    gap: 0.75em;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: calc(0.85rem * var(--lang-font-scale));
    justify-content: center;
}
.lang-switcher li { margin: 0; }
.lang-switcher a {
    color: inherit;
    text-decoration: none;
}
.lang-switcher a:hover,
.lang-switcher a:focus-visible {
    opacity: 1;
    text-decoration: underline;
}
.lang-switcher .is-current span {
    font-weight: 600;
    color: var(--color-primary);
}

/* Flags (2026-09-30): the switcher shows one flag per language. */
.lang-switcher { align-items: center; gap: 0.6em; }
.lang-switcher a,
.lang-switcher .is-current span { display: inline-flex; line-height: 0; }
.lang-switcher .lang-flag {
    display: block;
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.lang-switcher a .lang-flag { opacity: 0.8; }
.lang-switcher a:hover,
.lang-switcher a:focus-visible { text-decoration: none; }
.lang-switcher a:hover .lang-flag,
.lang-switcher a:focus-visible .lang-flag { opacity: 1; transform: scale(1.12); }
.lang-switcher a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 3px; }
/* The flag of the language being viewed: full colour, underlined. */
.lang-switcher .is-current .lang-flag {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 3px 0 -1px var(--color-primary);
}

.header-menu-container { position: relative; }
.header-menu-container .lang-switcher {
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
}
@media (max-width: 768px) {
    .header-menu-container .lang-switcher {
        right: auto;
        left: 1rem;
        top: 1.4rem;
        transform: none;
    }
}
