/* Right-to-left fixes for the homepage modules section
   (<section class="section mods2" id="modules">: seven tabs, seven panels, seven product scenes).
   Load after css/teradix-rtl.css. Every selector starts with [dir="rtl"] and is scoped to .mods2.

   What mirrors: the tab row (01 on the right), the panel grid (copy right, scene left), the solid
   offset block (falls to the bottom-left), lists, the agent callout, and the inside of each scene,
   which is drawn in HTML with Arabic labels and so reads as the Arabic product does.
   What stays physical: the live bid chart (a time axis), the countdown, every amount and reference
   number, and the ERP-to-Teradix sync diagram with its two arrows. */

/* ── tabs ───────────────────────────────────────────────────────────────── */
[dir="rtl"] .mods2 .m2-tab{text-align:right;line-height:1.45}
[dir="rtl"] .mods2 .m2-tab+.m2-tab::before{left:auto;right:-4px}
/* the lime timer bar fills in the reading direction, from the right */
[dir="rtl"] .mods2 .m2-bar{transform-origin:100% 50%}
@media(max-width:640px){
  [dir="rtl"] .mods2 .m2-tab{text-align:center}
}

/* ── panel copy ─────────────────────────────────────────────────────────── */
/* "01 / 07" is a counter: it keeps its Latin order, set against the right edge */
[dir="rtl"] .mods2 .m2-count{direction:ltr;justify-content:flex-end}
[dir="rtl"] .mods2 .m2-count .ico3{order:2}
[dir="rtl"] .mods2 .m2-head h3{line-height:var(--lh-ar-h3)}
[dir="rtl"] .mods2 .m2-head h3 a{padding-bottom:2px}
[dir="rtl"] .mods2 .m2-sum{line-height:1.7}
[dir="rtl"] .mods2 .m2-feats li{padding:13px 22px 13px 0;line-height:1.55}
[dir="rtl"] .mods2 .m2-feats li::before{left:auto;right:0;top:21px}
[dir="rtl"] .mods2 .m2-ai{border-left:0;border-right:4px solid var(--m-lime)}
[dir="rtl"] .mods2 .m2-ai--auto{border-right-color:var(--m-blue2)}
[dir="rtl"] .mods2 .m2-ai__k{line-height:var(--lh-ar-ui)}
[dir="rtl"] .mods2 .m2-ai__l{line-height:1.7}
[dir="rtl"] .mods2 .m2-ai__l b{line-height:1.5}
[dir="rtl"] .mods2 .m2-more{line-height:var(--lh-ar-ui)}
[dir="rtl"] .mods2 .m2-more:hover svg{transform:translateX(-4px)}

/* ── the scene window: the solid block falls to the bottom-left ─────────── */
[dir="rtl"] .mods2 .m2-fig{padding:0 0 0 var(--m-off)}
[dir="rtl"] .mods2 .m2-win::before{transform:translate(calc(var(--m-off) * -1),var(--m-off))}
[dir="rtl"] .mods2 .m2-beats li{line-height:1.5}
[dir="rtl"] .mods2 .m2-beats li::before{margin-right:0;margin-left:8px}
[dir="rtl"] .mods2 .m2-fig figcaption{line-height:1.6}

/* ── inside the scene: type ─────────────────────────────────────────────────
   The scene is set in tight Latin leading. Arabic needs room for its marks. */
[dir="rtl"] .mods2 .m2-app{line-height:1.5}
[dir="rtl"] .mods2 .m2-top b{line-height:1.4}
[dir="rtl"] .mods2 .m2-top span{margin-left:0;margin-right:.8em;padding-left:0;padding-right:1.1em;
  border-left:0;border-right:1px solid var(--m-rule)}
[dir="rtl"] .mods2 .m2-top span+i{margin-left:0;margin-right:auto}
[dir="rtl"] .mods2 .m2-lb{line-height:1.4}
[dir="rtl"] .mods2 .m2-t{line-height:1.45}
[dir="rtl"] .mods2 .m2-t--lg{line-height:1.4}
[dir="rtl"] .mods2 .m2-s{line-height:1.5}
[dir="rtl"] .mods2 .m2-chip{padding:.3em .7em .34em;line-height:1.4}
[dir="rtl"] .mods2 .m2-t .m2-chip{margin-left:0;margin-right:.7em}
[dir="rtl"] .mods2 .m2-ck{line-height:1.4}
[dir="rtl"] .mods2 .m2-btn{padding:.6em 1.3em .66em;line-height:1.4;box-shadow:-.4em .4em 0 var(--m-blue)}
[dir="rtl"] .mods2 .m2-tr--h{line-height:1.4}
[dir="rtl"] .mods2 .m2-ag b,
[dir="rtl"] .mods2 .m2-alert b{line-height:1.4}
[dir="rtl"] .mods2 .m2-ag span,
[dir="rtl"] .mods2 .m2-alert span,
[dir="rtl"] .mods2 .m2-fields dt,
[dir="rtl"] .mods2 .m2-fields dd,
[dir="rtl"] .mods2 .m2-trail span{line-height:1.5}
[dir="rtl"] .mods2 .m2-trail b,
[dir="rtl"] .mods2 .m2-rec,
[dir="rtl"] .mods2 .m2-sys__h b{line-height:1.45}
[dir="rtl"] .mods2 .m2-bc em{line-height:1.5}

/* amounts, totals and the countdown always read left to right */
[dir="rtl"] .mods2 .m2-num,
[dir="rtl"] .mods2 .m2-n,
[dir="rtl"] .mods2 .m2-clockbox b{direction:ltr;unicode-bidi:isolate}
[dir="rtl"] .mods2 .m2-n{text-align:right}

/* ── inside the scene: mirrored parts ───────────────────────────────────── */
[dir="rtl"] .mods2 .m2-row--new{box-shadow:-.5em .5em 0 #DDE0FB}
/* the tick sits over its box, now on the right of the label */
[dir="rtl"] .mods2 .m2-ck i{margin-right:0;margin-left:-1.6em}
[dir="rtl"] .mods2 .m2-ag,
[dir="rtl"] .mods2 .m2-alert{border-left:0;border-right:.5em solid var(--m-lime)}
/* the renewal alert flies in from the outer edge of its column (inline --fx is 2em) */
[dir="rtl"] .mods2 .m2-alert{--fx:-2em!important}
[dir="rtl"] .mods2 .m2-fields dd{text-align:left}
[dir="rtl"] .mods2 .m2-tr--h span:last-child{text-align:left}
[dir="rtl"] .mods2 .m2-best{left:auto;right:-1px}
/* meters and the savings rule fill from the right */
[dir="rtl"] .mods2 .m2-meter i,
[dir="rtl"] .mods2 .m2-kline{transform-origin:100% 50%}
[dir="rtl"] .mods2 .m2-trail li{padding:.6em 2em .9em 0;border-left:0;border-right:1px solid #A9AFD0;margin-left:0;margin-right:.5em}
[dir="rtl"] .mods2 .m2-trail li:last-child{padding-bottom:.2em}
[dir="rtl"] .mods2 .m2-trail li::before{left:auto;right:-.5em;top:1em}
[dir="rtl"] .mods2 .m2-chain li .m2-s{flex-basis:6.4em}
[dir="rtl"] .mods2 .m2-chain li .m2-chip{margin-left:0;margin-right:auto}
[dir="rtl"] .mods2 .m2-chain li+li::before{left:auto;right:2em}
[dir="rtl"] .mods2 .m2-rec{padding:.6em 2.3em .6em .9em}
[dir="rtl"] .mods2 .m2-rec::before{left:auto;right:.85em}

/* ── inside the scene: kept physical ────────────────────────────────────────
   The live bid chart has a time axis: its marks are placed with inline left:%
   and stay where they were drawn. The sync diagram keeps the ERP on the left and
   Teradix on the right so its two arrows still point the way the records move;
   only the words inside each box read right to left. */
[dir="rtl"] .mods2 .m2-steps{direction:ltr}
[dir="rtl"] .mods2 .m2-sync{direction:ltr}
[dir="rtl"] .mods2 .m2-sys,
[dir="rtl"] .mods2 .m2-lane{direction:rtl}
[dir="rtl"] .mods2 .m2-lane .m2-s{line-height:1.4}
/* a reference number never breaks at its hyphen */
[dir="rtl"] .mods2 .m2-scene bdi{white-space:nowrap}

/* request rows in panel 1: the Arabic status chips are wider than the English ones,
   so the row gives the title back some room and "PR-1042 · حواسيب محمولة" stays on one line */
@media(min-width:641px){
  [dir="rtl"] .mods2 .m2-app--1 .m2-row{gap:.6em;padding-inline:1em}
}

/* ── phone ──────────────────────────────────────────────────────────────── */
@media(max-width:640px){
  /* three totals side by side: the figures keep inside their boxes */
  [dir="rtl"] .mods2 .m2-kpi{padding-inline:1em}
  [dir="rtl"] .mods2 .m2-kpi .m2-n{font-size:2.3em}
}


/* ── rebuilt section (value card, open column, status bar, product windows) ─────────────── */
/* the animated cursor's path is measured on the English layout: on Arabic the in-place animations tell the story */
[dir="rtl"] .mods2 .m2-cur{display:none}
[dir="rtl"] .mods2 .m2-cd b,[dir="rtl"] .mods2 .m2-dl b{direction:ltr;unicode-bidi:isolate}
[dir="rtl"] .mods2 .m2-xa{direction:ltr}
[dir="rtl"] .mods2 .m2-top .m2-user,[dir="rtl"] .mods2 .m2-top .m2-av{margin:0;padding:0;border:0}
[dir="rtl"] .mods2 .m2-top .m2-srch{margin-left:0;margin-right:auto;border:1px solid var(--m-rule);padding-inline:.7em}
[dir="rtl"] .mods2 .m2-tl__m{direction:ltr}
[dir="rtl"] .mods2 .m2-trail li{padding:0 1.9em 1em 0;margin:0;border:0}
[dir="rtl"] .mods2 .m2-trail li::before{display:none}
[dir="rtl"] .mods2 .m2-trail .m2-nd{left:auto;right:0}
[dir="rtl"] .mods2 .m2-trail .m2-ln{left:auto;right:.4em}
[dir="rtl"] .mods2 .m2-sync p,[dir="rtl"] .mods2 .m2-sync b,[dir="rtl"] .mods2 .m2-sync span{unicode-bidi:plaintext}
[dir="rtl"] .section.mods2 .m2-head{text-align:right}
[dir="rtl"] .section.mods2 .m2-more svg,[dir="rtl"] .section.mods2 .m2-run__btn svg{transform:scaleX(-1)}
[dir="rtl"] .section.mods2 .m2-more:hover svg,[dir="rtl"] .section.mods2 .m2-run__btn:hover svg{transform:scaleX(-1) translateX(3px)}
[dir="rtl"] .section.mods2 .m2-fig{padding:0 0 0 var(--m-off)}
[dir="rtl"] .section.mods2 .m2-win::before{transform:translate(calc(var(--m-off) * -1),var(--m-off))}
[dir="rtl"] .section.mods2 .m2-val__k,[dir="rtl"] .section.mods2 .m2-run__n,[dir="rtl"] .section.mods2 .m2-no{letter-spacing:0}
[dir="rtl"] .section.mods2 .m2-val__k{font-size:12px;line-height:1.4}
[dir="rtl"] .section.mods2 .m2-val__n b{line-height:1.15;letter-spacing:0}
[dir="rtl"] .section.mods2 .m2-val__t{line-height:1.5}
[dir="rtl"] .section.mods2 .m2-run__n{direction:ltr;unicode-bidi:isolate}
[dir="rtl"] .section.mods2 .m2-feats li{padding-inline:18px 10px;padding-left:10px;padding-right:18px}
[dir="rtl"] .section.mods2 .m2-feats li::before{left:auto;right:0}
[dir="rtl"] .section.mods2 .m2-ai__l b::before{content:"الذكاء الاصطناعي من تيرادكس";letter-spacing:0;font-size:12px;line-height:1.4}
[dir="rtl"] .section.mods2 .m2-ai--auto .m2-ai__l b::before{content:"الأتمتة"}
[dir="rtl"] .section.mods2 .m2-ai__l+.m2-ai__l b::before{display:none}
[dir="rtl"] .section.mods2 .m2-proof__logo{margin:0 0 6px 6px}
[dir="rtl"] .section.mods2 .m2-proof__logo::before{transform:translate(-6px,6px)}
[dir="rtl"] .section.mods2 .m2-proof__logo--tx{text-transform:none;font-size:14px;line-height:1.3}
[dir="rtl"] .mods2 .m2-cur{display:none}
