/* ============================================================
   LANGUAGE SWITCHER — shared component
   Used on the landing page (inline in the navbar) and on the
   Login / Register / Forgot Password / Confirm Email pages
   (as a floating button, via .lang-switcher-floating), so the
   styling lives in exactly one place rather than being copied
   into every page's own stylesheet.
   ============================================================ */

.lang-switcher {
    position: relative;
}

.lang-switcher-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid #d6dbe3;
    border-radius: 8px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

    .lang-switcher-toggle:hover {
        border-color: #9db8e4;
        background: #f8fafc;
    }

.lang-switcher-icon {
    font-size: 15px;
}

.lang-switcher-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 140px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 1000;
}

    .lang-switcher-menu.is-open {
        display: block;
    }

.lang-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 6px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}

    .lang-option:hover {
        background: #f1f5f9;
    }

    .lang-option.is-active {
        background: #eaf2ff;
        color: #1d4ed8;
        font-weight: 600;
    }

/* Fixed to the corner of the viewport — used on Login/Register/Forgot Password/Confirm Email, which
   (unlike the landing page) have no shared navbar to place the switcher inline into. */
.lang-switcher-floating {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
}


/* ---------- Right-to-left (Arabic) ---------- */

body.lang-rtl {
    direction: rtl;
}

    body.lang-rtl .lang-switcher-menu {
        right: auto;
        left: 0;
    }

    body.lang-rtl .lang-option {
        text-align: right;
    }

    body.lang-rtl .lang-switcher-floating {
        right: auto;
        left: 16px;
    }
