/* ── comp_lang_select.css ─────────────────────────────────────────────────────
   Unified language selector component — shared across all pages:
   login, signup, dashboard, edara, public links.

   Structure:
     .lang-select                  — outer wrapper, data-value attribute
       .lang-select-current        — display button (shows selected language)
         .lang-flag                — flag SVG image
         .lang-iso                 — language label text (native name)
       .lang-select-list           — dropdown panel (fixed or absolute positioned)
         .lang-option              — individual language option
           .lang-flag              — flag image
           .lang-iso               — native name text

   Requires CSS variables: --border, --white, --navy, --accent, --muted, --input-bg
   ────────────────────────────────────────────────────────────────────────────── */

/* ── Base wrapper ──────────────────────────────────────────────────────────── */
.lang-select {
    position: relative;
    user-select: none;
}

/* ── Current selection button ──────────────────────────────────────────────── */
.lang-select-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 28px 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy);
    box-shadow: 0 2px 8px rgba(27, 42, 74, 0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.lang-select-current:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(58, 130, 196, 0.12);
}

/* Dropdown arrow indicator */
.lang-select-current::after {
    content: '▾';
    margin-left: auto;
    padding-left: 6px;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1;
}

/* ── Dropdown list panel ───────────────────────────────────────────────────── */
.lang-select-list {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(27, 42, 74, 0.16);
    max-height: 280px;
    overflow-y: auto;
}

.lang-select-list.open {
    display: block;
}

/* ── Individual language option ────────────────────────────────────────────── */
.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy);
    transition: background 0.15s;
    white-space: nowrap;
}

.lang-option:hover {
    background: #f0f4f9;
}

/* Active (currently selected) language highlight */
.lang-option.active {
    background: rgba(58, 130, 196, 0.08);
    color: var(--accent);
}

/* ── Flag images ───────────────────────────────────────────────────────────── */
.lang-flag {
    height: 18px;
    width: 26px;
    object-fit: contain;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Smaller flag inside the current-selection button */
.lang-select-current .lang-flag {
    height: 14px;
    width: 20px;
}

/* ── Native name text ──────────────────────────────────────────────────────── */
.lang-iso {
    font-weight: 600;
    font-size: 0.82rem;
}
