/* ============================================================
   FLAVOR THEME v2 — rtl.css  (Point #32)
   Right-to-Left refinements for ar/he/fa/ur/ps/dv.
   Layout/spacing already use LOGICAL properties (margin/padding/
   border-inline, inset-inline, text-align:start/end) and mirror
   automatically. This sheet only handles what logical properties
   cannot: mirrored transforms, directional icons, directional
   shadows and directional gradients. All rules are scoped to
   [dir="rtl"] and are inert in LTR. Loaded last (see ThemeService).
   ============================================================ */

/* ----- Directional Font Awesome icons (self-contained for the theme) ----- */
html[dir="rtl"] .fa-arrow-left,
html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-arrow-left-long,
html[dir="rtl"] .fa-arrow-right-long,
html[dir="rtl"] .fa-long-arrow-alt-left,
html[dir="rtl"] .fa-long-arrow-alt-right,
html[dir="rtl"] .fa-chevron-left,
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-circle-chevron-left,
html[dir="rtl"] .fa-circle-chevron-right,
html[dir="rtl"] .fa-angle-left,
html[dir="rtl"] .fa-angle-right,
html[dir="rtl"] .fa-angles-left,
html[dir="rtl"] .fa-angles-right,
html[dir="rtl"] .fa-caret-left,
html[dir="rtl"] .fa-caret-right,
html[dir="rtl"] .fa-arrow-right-from-bracket,
html[dir="rtl"] .fa-arrow-left-from-bracket {
  transform: scaleX(-1);
}

/* ----- Mobile drawer ----- 
   Anchored to inline-end (inset-inline-end) which is the LEFT edge in RTL;
   flip the off-canvas translate and the drop-shadow direction. */
html[dir="rtl"] .mobile-drawer {
  transform: translateX(-100%);
  box-shadow: 8px 0 30px var(--t-shadow-hover);
}
html[dir="rtl"] .mobile-drawer.is-open {
  transform: translateX(0);
}

/* ----- Header nav underline ----- 
   The animated underline is anchored at inline-start; flip the gradient so the
   primary colour leads from the start edge. */
html[dir="rtl"] .nav-desktop a::after {
  background: linear-gradient(270deg, var(--t-primary), var(--t-accent));
}

/* ----- Prose blockquote ----- 
   Accent border is on inline-start; mirror the rounded (inline-end) corners. */
html[dir="rtl"] .prose blockquote {
  border-radius: var(--t-radius-sm) 0 0 var(--t-radius-sm);
}

/* ----- Article TOC accent (theme) — mirror the rounded corners if present ----- */
html[dir="rtl"] .toc-link {
  border-radius: var(--t-radius-xs) 0 0 var(--t-radius-xs);
}
