/* core/static/core/css/rtl-pagination.css
   ============================================================
   Pagination arrows follow the reading direction.

   Templates write pagination icons the LTR way (angle-left = previous,
   angle-right = next). Bootstrap's RTL build reverses the page order, so on
   an RTL page "previous" sits on the right - and its icon must point right.
   This mirrors every icon inside a .page-link on RTL pages, whatever the icon
   set (Font Awesome, Bootstrap Icons, inline SVG), so no template has to
   choose icons per language.

   - core/css/l10n.css and css/rtl.css flip arrow/chevron glyphs (::before);
     that is neutralised here and the whole icon is flipped instead, so the
     arrow is flipped exactly once whatever the icon set.
   - Text arrows (‹ › « ») need nothing: they are Unicode mirrored glyphs.
   - Opt-out: add .pagination-bidi to a .pagination whose icons are already
     chosen per language.
   Loaded by every base layout.
   ============================================================ */

/* The theme floats page items left (assets/css/style.css) - that only shows when the list is not flex, e.g.
   "d-inline-block d-md-flex" on phones, where it kept the LTR page order on RTL pages: 1 2 3 ran left to right
   and the mirrored arrows then pointed the wrong way. */
:is(html[dir="rtl"], .rtl) .pagination .page-item { float: right; }

:is(html[dir="rtl"], .rtl) .pagination:not(.pagination-bidi) .page-link :is(i, svg, .bi, .fa, .fas, .far, .fa-solid) {
    display: inline-block;
    transform: scaleX(-1) !important;
}

:is(html[dir="rtl"], .rtl) .pagination:not(.pagination-bidi) .page-link :is(i, .bi, .fa, .fas, .far, .fa-solid)::before {
    transform: none !important;
}
