/* ============================================================
 * user_ui — Language options (shared).
 * ============================================================
 *
 * The option rows of the LanguageSwitch Component, rendered by
 * templates/user_ui/shared/_language_options.html in two places:
 * the header dropdown panel (`.lang-switch-menu`, header.css) and
 * the left mobile drawer (`.mobile-drawer-lang`,
 * mobile_menus.css). Only the rows live here; each host lays out
 * its own container.
 *
 * The current option is marked by `aria-current="true"`: a filled
 * row AND a drawn check mark, so the state never rests on colour
 * alone. Flags are 3:2 SVGs (img/user_ui/flags/), drawn at 21×14.
 *
 * Classes:
 *   - .lang-switch-list   the option list
 *   - .lang-option        one option button
 *   - .lang-flag          its flag
 *   - .lang-option-label  its short label (EN)
 *   - .lang-option-name   its own-language name (Español)
 *   - .lang-switch-error  the alert line under the list
 *
 * Loaded by templates/user_ui/shared/base.html in the shared part
 * of the cascade, before the chrome sheets.
 * ============================================================ */

.lang-switch-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: color 120ms ease-out, background-color 120ms ease-out;
}
.lang-option:hover,
.lang-option:focus-visible {
    background: var(--surface-2);
    color: var(--orange);
}
.lang-option:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: -2px;
}
.lang-option[aria-current="true"] {
    background: var(--surface-2);
}
/* Check mark after the current option — drawn, not a glyph. */
.lang-option[aria-current="true"]::after {
    content: "";
    flex: none;
    margin-left: auto;
    width: 5px;
    height: 10px;
    border: solid var(--orange);
    border-width: 0 2px 2px 0;
    transform: translateY(-2px) rotate(45deg);
}
.lang-option:disabled {
    cursor: progress;
    opacity: 0.6;
}
.lang-flag {
    display: block;
    flex: none;
    width: 21px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px var(--line);
}
.lang-option-label {
    min-width: 2.2em;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
}
.lang-option-name {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dim);
}
.lang-option:hover .lang-option-name,
.lang-option:focus-visible .lang-option-name {
    color: inherit;
}
.lang-switch-error {
    margin: 6px 4px 2px;
    padding: 6px 8px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.4;
    color: #E0533B;
    background: color-mix(in srgb, #E0533B 12%, transparent);
}
.lang-switch-error[hidden] {
    display: none;
}
