/*
 * HaloClean i18n — RTL Overrides
 * Applied when an RTL language (e.g. Arabic) is active.
 *
 * IMPORTANT: the plugin now forces is_rtl() = true on RTL requests
 * (HaloClean_I18n_Frontend::force_rtl_text_direction), so Elementor and the
 * Moppers theme apply their OWN native RTL rendering. This file therefore only
 * patches theme chrome that native RTL does not cover. Do NOT re-add
 * .elementor-* flips here — Elementor handles its widgets/columns in RTL and a
 * second flip would cancel it back to LTR.
 */

/* Base direction (reinforces the theme/Elementor RTL). */
body {
    direction: rtl;
    text-align: right;
}

/* Phone / WhatsApp numbers (and other LTR runs) must render left-to-right even
 * inside RTL text. Without this the bidi algorithm reorders the space-separated
 * groups, e.g. "054 175 4256" displays as "4256 175 054". unicode-bidi: isolate
 * lays the content out LTR and isolates it from the surrounding RTL run. */
a[href^="tel:"],
a[href*="wa.me"],
a[href^="https://wa.me"],
a[href^="https://api.whatsapp"],
.inner-link,
.haloclean-ltr,
.haloclean-phone,
.haloclean-whatsapp {
    direction: ltr;
    unicode-bidi: isolate;
}

/* ── Moppers theme navigation (the theme ships no RTL stylesheet) ── */

/* Top-level nav item spacing: flip the right margin to the left and tighten it
 * so the longer Arabic labels don't wrap onto a second line. */
.nav__main .nav__list .nav__item {
    margin-right: 0;
    margin-left: 14px;
}
.nav__second .nav__list .nav__item {
    margin-right: 0;
    margin-left: 5px;
}

/* Top bar (email / hours / phone) is LTR contact info — keep it LTR so every
 * icon sits on the same side of its text (the WhatsApp icon was flipping). */
.top-bar-content,
.top-bar-content li {
    direction: ltr;
}

/* Dropdown panels: right-align and lay out RTL, anchored to the parent's right. */
.submenu__dropdown {
    text-align: right;
    direction: rtl;
    left: auto;
    right: 0;
}
.submenu__dropdown .dropdown__item,
.submenu__dropdown .dropdown__item a,
.submenu__dropdown li a,
.submenu__dropdown .make__title {
    text-align: right;
    direction: rtl;
}

/* Nested / second-level flyouts open to the LEFT in RTL. */
.submenu__dropdown .submenu__dropdown,
.submenu__dropdown.child.repell__left,
.dropdown__item .submenu__dropdown {
    left: auto;
    right: 100%;
}

/* Dropdown caret/arrow spacing flip. */
.nav__item .nav__arrow,
.dropdown__item .nav__arrow {
    margin-left: 0;
    margin-right: 6px;
}

/* Logo + tagline aligned to the right-hand side in RTL. */
.nav__logo,
.nav__logo a,
.nav__logo img,
.main__logo,
.nav__logo .nav__logo-tagline {
    text-align: right;
}
.nav__logo {
    justify-content: flex-end;
}
.nav__logo-tagline {
    display: block;
    text-align: right;
}

/* Section / hero eyebrow sub-headings: right-align (keep explicitly-centered). */
.sub-heading {
    text-align: right;
}
.sub-heading.center {
    text-align: center;
}

/* Legacy/fallback nav classes (in case a widget uses them). */
.main-navigation ul { text-align: right; }
.main-navigation ul ul { left: auto; right: 0; }
.main-navigation li { float: right; }

/* Breadcrumbs */
.breadcrumb-wrapper {
    direction: rtl;
}

/* Content lists */
ul, ol {
    padding-left: 0;
    padding-right: 2em;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
    text-align: right;
}

/* Physical float utilities do not auto-flip with direction:rtl. */
.float-left {
    float: right !important;
}

.float-right {
    float: left !important;
}

.mr-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

.ml-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Footer widgets */
.footer-widget {
    text-align: right;
}

/* Search form */
.search-form .search-field {
    text-align: right;
    padding-left: 40px;
    padding-right: 15px;
}

.search-form .search-submit {
    left: 0;
    right: auto;
}

/* Contact Form 7 */
.wpcf7 .wpcf7-form-control-wrap {
    text-align: right;
}

/* HaloClean Booking shortcode cards */
.haloclean-service-card {
    text-align: right;
}

.haloclean-service-card .service-price {
    text-align: left;
}

/* Sidebar layout (float-based theme layout) */
.sidebar {
    float: left;
}

.content-area {
    float: right;
}
