/* ============================================================================
   RTL baseline — Arabic / Hebrew / Persian / Urdu regional sites.
   Loaded (head.html) ONLY when is_rtl, AFTER the wp-* sheets so it overrides.
   dir="rtl" on <html> already flips text direction, inline flow, list markers,
   and default alignment; this sheet mirrors the PHYSICAL left/right rules that
   Bootstrap-4 utilities + the theme pin. Foundation, not final — do a visual QA
   pass on a live RTL page and add component-specific fixes as needed.
   ============================================================================ */

[dir="rtl"] body { text-align: right; }

/* ── Bootstrap 4 spacing utilities: swap left <-> right (scale 0/.25/.5/1/1.5/3) */
[dir="rtl"] .ml-0{margin-left:0!important;margin-right:0!important}
[dir="rtl"] .ml-1{margin-left:0!important;margin-right:.25rem!important}
[dir="rtl"] .ml-2{margin-left:0!important;margin-right:.5rem!important}
[dir="rtl"] .ml-3{margin-left:0!important;margin-right:1rem!important}
[dir="rtl"] .ml-4{margin-left:0!important;margin-right:1.5rem!important}
[dir="rtl"] .ml-5{margin-left:0!important;margin-right:3rem!important}
[dir="rtl"] .mr-0{margin-right:0!important;margin-left:0!important}
[dir="rtl"] .mr-1{margin-right:0!important;margin-left:.25rem!important}
[dir="rtl"] .mr-2{margin-right:0!important;margin-left:.5rem!important}
[dir="rtl"] .mr-3{margin-right:0!important;margin-left:1rem!important}
[dir="rtl"] .mr-4{margin-right:0!important;margin-left:1.5rem!important}
[dir="rtl"] .mr-5{margin-right:0!important;margin-left:3rem!important}
[dir="rtl"] .pl-0{padding-left:0!important;padding-right:0!important}
[dir="rtl"] .pl-1{padding-left:0!important;padding-right:.25rem!important}
[dir="rtl"] .pl-2{padding-left:0!important;padding-right:.5rem!important}
[dir="rtl"] .pl-3{padding-left:0!important;padding-right:1rem!important}
[dir="rtl"] .pl-4{padding-left:0!important;padding-right:1.5rem!important}
[dir="rtl"] .pl-5{padding-left:0!important;padding-right:3rem!important}
[dir="rtl"] .pr-0{padding-right:0!important;padding-left:0!important}
[dir="rtl"] .pr-1{padding-right:0!important;padding-left:.25rem!important}
[dir="rtl"] .pr-2{padding-right:0!important;padding-left:.5rem!important}
[dir="rtl"] .pr-3{padding-right:0!important;padding-left:1rem!important}
[dir="rtl"] .pr-4{padding-right:0!important;padding-left:1.5rem!important}
[dir="rtl"] .pr-5{padding-right:0!important;padding-left:3rem!important}
[dir="rtl"] .ml-auto{margin-left:0!important;margin-right:auto!important}
[dir="rtl"] .mr-auto{margin-right:0!important;margin-left:auto!important}

/* ── Text alignment + floats */
[dir="rtl"] .text-left{text-align:right!important}
[dir="rtl"] .text-right{text-align:left!important}
[dir="rtl"] .float-left{float:right!important}
[dir="rtl"] .float-right{float:left!important}
[dir="rtl"] .pull-left{float:right!important}
[dir="rtl"] .pull-right{float:left!important}

/* ── Flex helpers */
[dir="rtl"] .justify-content-start{justify-content:flex-end!important}
[dir="rtl"] .justify-content-end{justify-content:flex-start!important}
[dir="rtl"] .mr-auto.d-flex,[dir="rtl"] .flex-row{flex-direction:row-reverse}

/* ── Dropdowns / menus / lists */
[dir="rtl"] .dropdown-menu{left:auto!important;right:0!important;text-align:right}
[dir="rtl"] .dropdown-menu-right{right:auto!important;left:0!important}
[dir="rtl"] ul,[dir="rtl"] ol{padding-left:0;padding-right:1.25rem}

/* ── Nav / header: brand to the right, actions mirror */
[dir="rtl"] .navbar-brand{margin-right:0;margin-left:1rem}
[dir="rtl"] .navbar-nav{padding-right:0}

/* ── Input groups + search (icon/addon swaps sides) */
[dir="rtl"] .input-group-append{margin-left:0;margin-right:-1px}
[dir="rtl"] .input-group-prepend{margin-right:0;margin-left:-1px}
[dir="rtl"] .input-group>.form-control{text-align:right}

/* ── Cards / borders that pin a side */
[dir="rtl"] .border-left{border-left:0!important;border-right:1px solid #dee2e6!important}
[dir="rtl"] .border-right{border-right:0!important;border-left:1px solid #dee2e6!important}

/* ── Breadcrumb separators flip visually with dir; keep spacing sane */
[dir="rtl"] .breadcrumb-item+.breadcrumb-item{padding-left:0;padding-right:.5rem}
[dir="rtl"] .breadcrumb-item+.breadcrumb-item::before{padding-left:.5rem;padding-right:0;float:right}

/* ── Directional icons (chevrons/arrows) — flip horizontally */
[dir="rtl"] .fa-chevron-left::before{content:"\f054"} /* -> right */
[dir="rtl"] .fa-chevron-right::before{content:"\f053"} /* -> left */
[dir="rtl"] .icon-arrow,[dir="rtl"] .arrow-ltr{transform:scaleX(-1)}

/* Numbers/latin runs inside RTL text stay LTR automatically via the browser's
   bidi algorithm; force it on known-latin bits if needed with .ltr-embed. */
[dir="rtl"] .ltr-embed{direction:ltr;unicode-bidi:embed;display:inline-block}
