/**
 * English (LTR) — theme JS used to force RTL on body; we skip that when html[dir=ltr].
 */
html[dir="ltr"] body {
    direction: ltr;
    text-align: start;
}

/* Profile / forms — theme .form-border forces text-align:right for Arabic */
html[dir="ltr"] .form-border input[type="text"],
html[dir="ltr"] .form-border input[type="email"],
html[dir="ltr"] .form-border input[type="password"],
html[dir="ltr"] .form-border input[type="tel"],
html[dir="ltr"] .form-border input[type="date"],
html[dir="ltr"] .form-border input[type="number"],
html[dir="ltr"] .form-border input[type="file"],
html[dir="ltr"] .form-border textarea,
html[dir="ltr"] .form-border select {
    text-align: start;
}

html[dir="ltr"] .form-border .field-set label,
html[dir="ltr"] .form-border h5 {
    text-align: start;
}

html[dir="ltr"] .switch-with-title.s2 {
    direction: ltr;
    display: flow-root;
}

html[dir="ltr"] body:not(.rtl) #wrapper {
    direction: ltr;
}

html[dir="ltr"] .booking-options .option-content {
    text-align: start !important;
}

html[dir="ltr"] .booking-options .form-check-label {
    text-align: start;
}

/* -------------------------------------------------------------------------
   Language switcher — circular pill, clear hover/focus (header + topbar)
   ------------------------------------------------------------------------- */
.lang-switch-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.07em;
    line-height: 1;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.lang-switch-pill:hover {
    transform: translateY(-2px);
}

.lang-switch-pill:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.lang-switch-pill__text {
    position: relative;
    top: 0.5px;
}

/* Optional compact / topbar variant — primary fill */
.lang-switch-pill--on-dark {
    color: #fff;
    background: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.35);
    backdrop-filter: none;
}

.lang-switch-pill--on-dark:hover {
    color: var(--primary-color);
    background: #fff;
    border-color: var(--primary-color);
    filter: none;
    box-shadow: 0 6px 18px rgba(var(--primary-color-rgb), 0.35);
}

.lang-switch-pill--compact {
    min-width: 2.35rem;
    min-height: 2.35rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
}

/* Nav row — theme primary */
.lang-switch-pill--nav {
    color: #fff;
    background: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: none;
    box-shadow: 0 2px 10px rgba(var(--primary-color-rgb), 0.35);
}

.lang-switch-pill--nav:hover {
    color: var(--primary-color);
    background: #fff;
    border-color: var(--primary-color);
    filter: none;
    box-shadow: 0 8px 22px rgba(var(--primary-color-rgb), 0.35);
}

/* After scroll — same primary (readable on light header) */
header.smaller.scroll-light .header-lang-switch .lang-switch-pill--nav {
    color: #fff;
    background: var(--primary-color);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(var(--primary-color-rgb), 0.3);
}

header.smaller.scroll-light .header-lang-switch .lang-switch-pill--nav:hover {
    color: var(--primary-color);
    background: #fff;
    border-color: var(--primary-color);
    filter: none;
    box-shadow: 0 6px 16px rgba(var(--primary-color-rgb), 0.35);
}

.topbar-lang-switch {
    display: inline-flex;
    align-items: center;
}

/* Branches map — title case instead of all caps from theme */
.map_location .dropup .btn-main,
.map_location .dropup .btn-main span {
    text-transform: capitalize;
}

/* -------------------------------------------------------------------------
   intl-tel-input — English / LTR (flag + dial + number align correctly)
   ------------------------------------------------------------------------- */
html[dir="ltr"] .iti {
    direction: ltr;
    width: 100%;
}

html[dir="ltr"] .iti--separate-dial-code .iti__selected-flag {
    flex-direction: row;
}

html[dir="ltr"] .iti__selected-dial-code {
    margin-block-start: 0;
    margin-inline-end: 4px;
}

html[dir="ltr"] #phone.form-control,
html[dir="ltr"] .iti input#phone.form-control {
    text-align: start;
    direction: ltr;
}

html[dir="ltr"] #phone.form-control::placeholder {
    text-align: start;
}

html[dir="ltr"] .iti__country-list {
    position: absolute;
    z-index: 10050;
}

/* -------------------------------------------------------------------------
   Header — mobile + desktop: toolbar (lang + account + hamburger), AR/EN
   ------------------------------------------------------------------------- */
.header-bar-row.de-flex {
    flex-wrap: nowrap;
    gap: 0.35rem;
}

/* Override theme .de-flex > .de-flex-col (center) — pin controls to the trailing edge */
.header-bar-row.de-flex > .header-actions.de-flex-col.d-flex {
    justify-content: flex-end !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    flex: 1 1 auto;
    min-width: 0;
}

@media (min-width: 992px) {
    .header-bar-row.de-flex > .header-actions.de-flex-col.d-flex {
        flex: 0 1 auto;
    }

    .header-bar-row.de-flex > .header-col-mid.de-flex-col {
        flex: 1 1 auto;
        justify-content: center !important;
        min-width: 0;
    }
}

.header-actions .header-lang-switch {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
}

.header-actions .menu_side_area.header-toolbar-item {
    width: auto !important;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    position: relative;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.header-actions .header-hamburger #menu-btn {
    float: none !important;
    position: relative !important;
    inset-inline-end: auto !important;
    inset-inline-start: auto !important;
    top: auto !important;
}

.de-menu-profile__avatar {
    width: 38px;
    height: 38px;
    object-fit: cover;
}

.de-menu-profile .de-menu-profile__name + .de-menu-profile__avatar {
    margin-inline-start: 0;
}

@media (min-width: 992px) {
    .de-menu-profile .de-menu-profile__name:not(.d-none) + .de-menu-profile__avatar {
        margin-inline-start: 0.5rem;
    }
}

/* Mobile: pin toolbar to the trailing edge (mid column stays for overlay #mainmenu) */
@media (max-width: 991.98px) {
    .header-bar-row.de-flex {
        justify-content: flex-start !important;
    }

    .header-bar-row.de-flex > .header-actions.de-flex-col.d-flex {
        flex: 0 1 auto !important;
        margin-inline-start: auto !important;
    }
}

/* Back to top — theme uses right: 15px; English (LTR) should sit bottom-left */
html[dir="ltr"] #back-to-top {
    right: auto;
    left: 15px;
}

/* About page — "Services you can trust" (box-icon.s2): fix icon + text padding in LTR */
html[dir="ltr"] section.about-discover-trust .box-icon.s2 {
    position: relative;
}

html[dir="ltr"] section.about-discover-trust .box-icon.s2 i {
    left: 0;
    right: auto;
    top: 0;
}

html[dir="ltr"] section.about-discover-trust .box-icon.s2 .d-inner {
    padding-left: 72px;
    padding-right: 0;
    text-align: start;
}

html[dir="ltr"] section.about-discover-trust .box-icon.s2 .d-inner h4 {
    text-align: start;
}
