/* Minimal Arabic RTL overrides.
   Current Rise exports already contain extensive [dir=rtl] component rules. */

html[dir="rtl"],
html[dir="rtl"] body {
  direction: rtl;
}

/* Form text should follow RTL while allowing the browser to handle mixed content. */
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  direction: rtl;
  text-align: start;
}

/* Keep media playback controls in their normal left-to-right time direction.
   Rise already renders the play/timer housing LTR, but the custom seek slider
   can inherit dir=rtl from the course root. Explicitly keeping the slider LTR
   prevents the playhead and filled seeker track from moving in opposite directions. */
html[dir="rtl"] video,
html[dir="rtl"] audio,
html[dir="rtl"] .audio-player__play-timer-housing,
html[dir="rtl"] .audio-player__seek-slider,
html[dir="rtl"] .audio-player-volume__slider {
  direction: ltr !important;
}

/* Keep the seek track's visual progress increasing from left to right,
   matching Rise's own --seek-slider-gradient definition. */
html[dir="rtl"] .audio-player__seek-slider {
  unicode-bidi: isolate;
}