/*
 * lang.css - language switcher UI + Arabic typography.
 *
 * Loaded on every page, in both directions. This file is one of the sources
 * for tools/build-rtl-css.py, so its directional rules get mirrored into
 * rtl.css automatically - do not hand write [dir="rtl"] rules here.
 */

/* --------------------------------------------------------------------------
 * Desktop language switcher (primary nav)
 * ----------------------------------------------------------------------- */

.primary-nav ul li a.p-link.language-switcher {
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.primary-nav ul li a.p-link.language-switcher .language-switcher-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 2px;
}

.primary-nav ul li a.p-link.language-switcher .language-switcher-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentcolor;
    fill: none;
    vertical-align: middle;
}

.primary-nav ul li a.p-link.language-switcher .language-switcher-label {
    font-weight: 600;
    line-height: 1;
}

.primary-nav ul li a.p-link.language-switcher:hover {
    color: var(--link-primary);
}

/* --------------------------------------------------------------------------
 * Compact switcher shown in the mobile header bar
 * ----------------------------------------------------------------------- */

.mobile-nav-lines-box.mobile-language-switcher-box {
    display: none;
    width: auto;
    height: auto;
}

.mobile-language-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 28px;
    padding-left: 8px;
    padding-right: 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--nav-link-color);
    text-decoration: none;
}

.mobile-language-switcher:hover,
.mobile-language-switcher:focus {
    color: var(--link-primary);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
 * Language row inside the mobile menu popup
 * ----------------------------------------------------------------------- */

#MobileMenuPopup .item.mobile-menu-language .item-flex {
    align-items: center;
}

.mobile-menu-language-options {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.mobile-menu-language-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 30px;
    padding-left: 10px;
    padding-right: 10px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: #000;
    text-decoration: none;
}

.mobile-menu-language-option.active {
    background-color: var(--btn-primary-color);
    border-color: var(--btn-primary-color);
    color: #fff;
}

.mobile-menu-language-option:hover,
.mobile-menu-language-option:focus {
    text-decoration: none;
}

@media (max-width: 768px) {
    .mobile-nav-lines-box.mobile-language-switcher-box {
        display: flex;
        align-items: center;
    }
}

/* --------------------------------------------------------------------------
 * Arabic typography
 *
 * :lang(ar) rather than [dir="rtl"] so it survives the RTL generator and so
 * isolated Arabic fragments inside an English page still pick up the face.
 * ----------------------------------------------------------------------- */

/*
html:lang(ar),
html:lang(ar) body,
html:lang(ar) button,
html:lang(ar) input,
html:lang(ar) select,
html:lang(ar) textarea,
html:lang(ar) .primary-nav,
:lang(ar) {
    font-family: "Cairo", "Montserrat", Arial, Helvetica, sans-serif;
}
*/

/* Latin runs (phone numbers, emails, booking refs, prices) inside Arabic text
 * keep their own direction so they are not visually reordered. */
html:lang(ar) bdi,
html:lang(ar) .ltr-text {
    direction: ltr /* rtl:ignore */;
    unicode-bidi: isolate;
}

html:lang(ar) .ltr-text {
    display: inline-block;
}
