/*
 * Shared language switcher for Q315-generated pages.
 *
 * The button list (`.lang-selector` / `.lang-btn`) is theme-adaptive: it draws
 * its colour from the surrounding text via `currentColor` and `inherit`, so it
 * fits whatever palette the hosting page uses without needing per-page
 * variables. The current language (`.lang-btn.active`) is distinguished by a
 * solid fill, a heavier border and an underline rather than a fixed colour, so
 * the highlight also survives on any theme.
 */

.lang-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
}

.lang-btn {
    padding: 0.5rem 1.1rem;
    border: 2px solid currentColor;
    border-radius: 12px;
    color: inherit;
    background: transparent;
    font-weight: 600;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-btn:hover,
.lang-btn:focus-visible {
    opacity: 1;
    transform: translateY(-2px);
}

.lang-btn.active {
    opacity: 1;
    border-width: 3px;
    text-decoration: underline;
    text-underline-offset: 3px;
    /* A faint fill using the inherited colour, kept legible on any theme. */
    background: color-mix(in srgb, currentColor 12%, transparent);
}
