/**
 * RTL overrides — load only when html[dir="rtl"]. Scoped to avoid affecting LTR.
 * Complements Bootstrap 3 directional utilities.
 */

[dir="rtl"] .pull-left {
  float: right !important;
}
[dir="rtl"] .pull-right {
  float: left !important;
}
[dir="rtl"] .text-left {
  text-align: right !important;
}
[dir="rtl"] .text-right {
  text-align: left !important;
}
[dir="rtl"] .text-center {
  text-align: center !important;
}

/*
 * Listing tables (.listing-table): logical alignment so column headers align with cell
 * text under RTL—browser default + physical floats often make Arabic look “off-column” vs thead.
 */
[dir="rtl"] .listing-table th,
[dir="rtl"] .listing-table td {
  text-align: start;
}

[dir="rtl"] .listing-table thead th:empty {
  text-align: center;
}

[dir="rtl"] .sidr {
  border-right: 1px solid #e5e5e5;
  border-left: 1px solid #e5e5e5;
}

[dir="rtl"] .sidebar .sidebar-header .close-sidebar {
  float: left;
}

[dir="rtl"] .navbar-mobile .dropdown-menu a {
  padding: 20px 40px 16px 20px !important;
}

/* Form fields: follow RTL text; keep phone/email/numeric inputs LTR */
[dir="rtl"] .form-control:not([type="email"]):not([type="tel"]):not([type="number"]):not([name*="phone"]):not([name*="whatsapp"]):not(.iti__search-input) {
  text-align: right;
}
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="number"],
[dir="rtl"] input[name*="phone"],
[dir="rtl"] input[name*="whatsapp"],
[dir="rtl"] .iti input[type="tel"],
[dir="rtl"] .iti__selected-flag {
  direction: ltr;
  text-align: left;
}

/* intl-tel-input: keep country names + dial codes in stable LTR runs inside RTL pages */
[dir="rtl"] .iti__country-list {
  direction: ltr;
  text-align: left;
}
[dir="rtl"] .iti__country {
  unicode-bidi: isolate;
  direction: ltr;
  text-align: left;
}
[dir="rtl"] .iti__dial-code {
  unicode-bidi: isolate;
  direction: ltr;
}

[dir="rtl"] .align-middle form input[type="text"] {
  text-align: right;
}

/* Storefront: phone display in sidebar / contact */
[dir="rtl"] .store-phone-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* “See more” & similar: point arrow in reading direction */
[dir="rtl"] a.vertudo .lni-arrow-right,
[dir="rtl"] .vertudo .lni-arrow-right {
  display: inline-block;
  transform: scaleX(-1);
}

/* Toggle switch knob slides to logical “end” under RTL */
[dir="rtl"] .toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(-22px);
}
