/* Loaded only when wc_is_rtl() is true (ar, ur). Layout mirrors itself from the
   logical properties used everywhere else; what is left here is the residue —
   glyphs and transforms that carry their own direction, and Latin runs the bidi
   algorithm reorders. Physical properties are meaningful in this file: it only
   ever applies under dir="rtl". */

/* '›' points along the reading direction. The resting/hover nudge lives in the
   same transform, so the mirrored rules have to restate it; scaleX(-1) first
   flips the axis, which is why the pixel values are unchanged. */
[dir="rtl"] .nm-item-arrow { transform: scaleX(-1) translateX(-2px); }
[dir="rtl"] .nav-mobile-item:hover .nm-item-arrow { transform: scaleX(-1) translateX(2px); }

/* Bullet arrow on the custom-work lists (index, support). */
[dir="rtl"] .custom-list li::before { content: '←'; }

/* Trailing arrow on the portfolio cards' detail link. */
[dir="rtl"] .pf-link::after { content: '←'; }

/* The mobile drawer's closed position is a transform, so it does not follow
   justify-content: flex-end across to the left edge — left alone it parks
   itself mid-screen and slides in over the page. Its shadow falls the other
   way for the same reason. */
[dir="rtl"] .nav-mobile-panel {
  transform: translateX(calc(-100% - 28px));
  box-shadow: 20px 0 60px rgba(0, 0, 0, .5);
}
[dir="rtl"] .nav-mobile-overlay.open .nav-mobile-panel { transform: translateX(0); }

/* Latin runs inside RTL prose. Isolation alone is not enough — the run also
   needs its own base direction, or the trailing '+' in "40+" lands in front of
   the digits and the leading '<' in "< 24h" is mirrored into '>'. */
[dir="rtl"] .stat-num { direction: ltr; unicode-bidi: isolate; }

/* Same for the @handle, but it is a flex item in a column that is otherwise
   end-aligned, so the box has to stay on the right while its text runs LTR. */
[dir="rtl"] .review-author a {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}

/* Portal's mobile sidebar drawer, same story as .nav-mobile-panel above: the
   closed position is a transform, so it does not follow inset-inline-start
   across to the right edge and would otherwise slide in over the page. */
@media (max-width: 768px) {
  [dir="rtl"] .portal-sidebar { transform: translateX(calc(100% + 24px)); }
  [dir="rtl"] .portal-sidebar.sidebar-open { transform: translateX(0); }
}
