/* Loaded only for Arabic, Farsi and Hebrew. Keep the shared Tailwind build intact. */

/* Follow text direction, including explicitly LTR regions. Preserve responsive centering. */
:where(html[dir="rtl"]) .text-left { text-align: start; }
:where(html[dir="rtl"]) .text-right { text-align: end; }
@media (min-width: 640px) {
  :where(html[dir="rtl"]) .sm\:text-left { text-align: start; }
  :where(html[dir="rtl"]) .sm\:text-right { text-align: end; }
  :where(html[dir="rtl"]) .sm\:text-center { text-align: center; }
}
@media (min-width: 768px) {
  :where(html[dir="rtl"]) .md\:text-left { text-align: start; }
  :where(html[dir="rtl"]) .md\:text-right { text-align: end; }
  :where(html[dir="rtl"]) .md\:text-center { text-align: center; }
}
@media (min-width: 1024px) {
  :where(html[dir="rtl"]) .lg\:text-left { text-align: start; }
  :where(html[dir="rtl"]) .lg\:text-right { text-align: end; }
  :where(html[dir="rtl"]) .lg\:text-center { text-align: center; }
}
@media (min-width: 1280px) {
  :where(html[dir="rtl"]) .xl\:text-left { text-align: start; }
  :where(html[dir="rtl"]) .xl\:text-right { text-align: end; }
  :where(html[dir="rtl"]) .xl\:text-center { text-align: center; }
}
@media (min-width: 1536px) {
  :where(html[dir="rtl"]) .\32xl\:text-left { text-align: start; }
  :where(html[dir="rtl"]) .\32xl\:text-right { text-align: end; }
  :where(html[dir="rtl"]) .\32xl\:text-center { text-align: center; }
}

/* Technical values keep their reading order; names and messages inherit RTL. */
html[dir="rtl"] input:is([type="email"], [type="password"], [type="url"], [type="tel"], [type="number"], [name="email"], [name="username"], [data-password-visible]),
html[dir="rtl"] :is(code, pre, a[href^="tel:"], a[href^="mailto:"]) {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}

/* Anchor menus beside their controls after the header/footer change direction. */
html[dir="rtl"] #langDropdown { right: auto; left: 0; }
html[dir="rtl"] #lgform { right: auto; left: 1rem; }
html[dir="rtl"] #footerLangDropdown { left: auto; right: 0; }
html[dir="rtl"] #footerLangToggle .ml-auto { margin-left: 0; margin-right: auto; }
@media (min-width: 640px) {
  html[dir="rtl"] #lgform { left: 2rem; }
}

/* Mirror navigation arrows, never screenshots, logos, or media controls. */
html[dir="rtl"] .sdbx-hero__start svg,
html[dir="rtl"] .sdbx-hero__catalog span,
html[dir="rtl"] .pricing-cta > svg,
html[dir="rtl"] .sdbx-contact-button > svg,
html[dir="rtl"] svg.group-hover\:translate-x-1 {
  transform: scaleX(-1);
}
html[dir="rtl"] .sdbx-hero__start:hover svg { transform: translateX(-3px) scaleX(-1); }

/* Avoid tracking intended for Latin lettering in joined Arabic/Persian scripts. */
html:is([lang="ar"], [lang="fa"]) :is(h1, h2, h3, .pricing-eyebrow, .sdbx-hero__promise) {
  letter-spacing: normal;
}
