/* Arabic mode. Activated by js/i18n.js setting dir=rtl + .lang-ar on <html>.
   English mode loads this file but matches nothing. */

html.lang-ar body {
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}
html.lang-ar .font-display,
html.lang-ar h1, html.lang-ar h2, html.lang-ar h3 {
  font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif !important;
}

/* Latin letter-spacing utilities look broken on Arabic glyphs. */
html.lang-ar [class*="tracking-"] { letter-spacing: 0 !important; }

/* Session ids, codes and numbers stay left-to-right inside RTL lines. */
html.lang-ar .font-mono { direction: ltr; unicode-bidi: embed; }

/* Tailwind's physical text alignment does not flip with dir. */
html.lang-ar .text-left { text-align: right; }
html.lang-ar .text-right { text-align: left; }

/* The auth split-screen: keep the form column readable in RTL. */
html.lang-ar .khda-auth-back { left: auto; right: 1.5rem; }
