/*
 * ROYI internationalization readiness layer.
 *
 * English is the only published locale today. The future locale selectors
 * below are inert until a generated page explicitly sets the matching lang and
 * dir attributes. No language is loaded or redirected by JavaScript.
 */

html[lang="vi"],
html[lang="id"] {
  --ds-font-body: var(--ds-font-body-latin);
  --ds-font-display: var(--ds-font-display-latin);
}

html[lang="ar"][dir="rtl"] {
  --ds-font-body: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  --ds-font-display: "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  direction: rtl;
}

/* New components should use logical properties and these small utilities. */
.i18n-text-start {
  text-align: start;
}

.i18n-text-end {
  text-align: end;
}

.i18n-ltr-isolate {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Mirror only directional UI glyphs that explicitly opt in. */
html[dir="rtl"] [data-mirror-rtl] {
  transform: scaleX(-1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
