/* B27 L1 (2026-10-25): right-to-left for Urdu and Arabic. LanguageService sets <html dir="rtl" lang="ur|ar"> and swaps
   bootstrap.min.css for bootstrap.rtl.min.css; this file mirrors the app's own layout (the template's sidebar / main offsets and
   the three menu layouts) and gives each script its font. Everything is under [dir=rtl] / [lang], so English is untouched.
   Codes and numbers stay in Geist (first in the list); Urdu / Arabic letters fall through to their Noto font. */

html[lang="ur"] { --app-font: 'Geist', 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', Arial, sans-serif; }
html[lang="ar"] { --app-font: 'Geist', 'Noto Naskh Arabic', Arial, sans-serif; }
/* Nastaliq sits higher and deeper than Latin letters: a little more room so nothing is clipped */
html[lang="ur"] body { line-height: 1.75; }

html[dir="rtl"] body { text-align: right; }

/* the template's sidebar: fixed on the right, the page beside it on the left */
html[dir="rtl"] .sidebar { left: auto; right: 0; }
@media (max-width: 1199px) {
  html[dir="rtl"] .sidebar { left: auto; right: -300px; }
  html[dir="rtl"] .toggle-sidebar .sidebar { right: 0; }
}
@media (min-width: 1200px) {
  html[dir="rtl"] #main { margin-left: 0; margin-right: 260px; }
  html[dir="rtl"] .toggle-sidebar #main, html[dir="rtl"] .toggle-sidebar #footer { margin-right: 0; }
  html[dir="rtl"] .toggle-sidebar .sidebar { right: -300px; }
  html[dir="rtl"] body.nav-vertical #main { margin-left: 0; margin-right: 260px; }
  html[dir="rtl"] body.nav-collapsed #main { margin-left: 0; margin-right: 72px; }
  html[dir="rtl"] body.nav-horizontal #main { margin-left: 0; margin-right: 0; }
  html[dir="rtl"] body.nav-horizontal .sidebar { right: -300px; }
}

/* numbers, codes, e-mails and dates keep reading left to right inside right-to-left text */
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="number"], html[dir="rtl"] input[type="date"] { direction: ltr; text-align: right; }
/* toasts on the left, as the page's end side */
html[dir="rtl"] .toast-top-right { right: auto; left: 12px; }
