/* ==========================================================================
   Faseeh Recitation Lab — RTL adjustments (/ar/recitation-lab/ only).
   Loaded after pages/recitation-lab.css and rtl.css. Every rule is scoped to .fsh-rtl.
   ========================================================================== */

/* Taxonomy: on Arabic pages the error-type / category names are already printed in Arabic
   (the reviewer app's own Arabic labels), so the duplicate Arabic line is not repeated. */
.fsh-rtl .rl-note__ar,
.fsh-rtl .rl-cat__ar,
.fsh-rtl .rl-recent__ar { display: none; }

/* Media, waveforms, speed toggles and timestamps keep their left-to-right order. */
.fsh-rtl .rl-wave,
.fsh-rtl .rl-speed,
.fsh-rtl .rl-player,
.fsh-rtl .rl-player__times,
.fsh-rtl .rl-ws__player,
.fsh-rtl .rl-note__dur,
.fsh-rtl .rl-area__count,
.fsh-rtl .rl-film__frame,
.fsh-rtl .rl-hero__screen { direction: ltr; }

/* Workspace window: a cropped replica of the desktop reviewer app. Its geometry (main column cropped
   at the window edge, side panel next to the steps) is kept exactly as in English; only the panel
   copy and the hint read right to left. The Qur'anic verse and word cards already carry dir="rtl". */
.fsh-rtl .rl-ws__window { direction: ltr; }
.fsh-rtl .rl-ws__side,
.fsh-rtl .rl-ws__hint { direction: rtl; }

/* Dark workspace panel: the notch moves to the top-left, mirroring the composition
   (the intro text now starts on the right). */
.fsh-rtl .rl-ws__panel::before,
.fsh-rtl .rl-ws__panel::after { border-top-right-radius: 0; border-top-left-radius: var(--r-xl); }
.fsh-rtl .rl-ws__panel::before { left: auto; right: 0; }
.fsh-rtl .rl-ws__nc {
  left: auto; right: calc(100% - var(--notch-w));
  background: radial-gradient(circle at top left, transparent var(--r-xl), var(--c-dark) calc(var(--r-xl) + 0.5px));
}

/* Typing caret sits after the text, on its left in Arabic. */
.fsh-rtl .rl-caret { margin-left: 0; margin-right: 1px; }

/* 02 · verdict fragment: inner padding mirrored. */
.fsh-rtl .rl-frag--verdict { padding: 20px 18px 0 12px; }

/* Annotation cards (workspace panel + "One structured annotation"). */
.fsh-rtl .rl-note__idx { margin-right: 0; margin-left: 8px; }
.fsh-rtl .rl-note--lg .rl-note__idx { margin-right: 0; margin-left: 6px; }
.fsh-rtl .rl-note__acts { margin-left: 0; margin-right: auto; }
.fsh-rtl .rl-note__cls { padding-left: 0; padding-right: 36px; }
.fsh-rtl .rl-note--lg .rl-note__cls { padding-left: 0; padding-right: 37px; }
.fsh-rtl .rl-note__bar { left: auto; right: 0; transform-origin: 100% 50%; }
.fsh-rtl .rl-note.is-live:not(.s2) .rl-note__in,
.fsh-rtl .rl-note.is-live:not(.s2) .rl-note__word,
.fsh-rtl .rl-note.is-live:not(.s2) .rl-note__pos { transform: translateX(6px); }
.fsh-rtl .rl-frag--verdict.is-live .rl-verdict__t:not(.is-on),
.fsh-rtl .rl-frag--verdict.is-live .rl-verdict__s:not(.is-on) { transform: translateX(4px); }

/* Independent review diagram: the grid already runs right to left (recording on the right),
   so the decorative connector curves are mirrored to fan out from it. */
.fsh-rtl .rl-ind__lines { transform: scaleX(-1); }
.fsh-rtl .rl-lane__count { margin-left: 0; margin-right: auto; }

/* Research flow: timeline on the start (right) side of the cards. */
.fsh-rtl .rl-res__flow::before,
.fsh-rtl .rl-res__flow::after { left: auto; right: -33px; }
.fsh-rtl .rl-res__dot { left: auto; right: -38px; }
.fsh-rtl .rl-res__ill { margin-left: 0; margin-right: auto; }
.fsh-rtl .rl-res__ill--doc i { transform-origin: 100% 50%; }

/* Reviewer journey: the progress line fills from the first step, on the right. */
.fsh-rtl .rl-join__steps::after { transform-origin: 100% 50%; }

@media (max-width: 1180px) {
  .fsh-rtl .rl-ind__play { margin: 0 auto 0 0; }
}
@media (max-width: 860px) {
  .fsh-rtl .rl-res__flow { margin-left: 0; margin-right: 33px; }
}
@media (max-width: 520px) {
  .fsh-rtl .rl-take__txt { margin-right: 0; margin-left: auto; }
  .fsh-rtl .rl-note--lg .rl-note__cls { padding-right: 0; }
  .fsh-rtl .rl-res__flow { margin-left: 0; margin-right: 24px; }
  .fsh-rtl .rl-res__flow::before,
  .fsh-rtl .rl-res__flow::after { left: auto; right: -24px; }
  .fsh-rtl .rl-res__dot { left: auto; right: -29px; }
  .fsh-rtl .rl-res__ill { margin-right: 0; }
}
