/* DUXSign — Arabic (right-to-left) adjustments. Loaded only on /ar/ pages. */

/* Arabic letters must join: no letter-spacing, no forced capitals. */
html[lang="ar"] *,
html[lang="ar"] *::before,
html[lang="ar"] *::after { letter-spacing: 0 !important; }

/* Arabic needs a little more line height than Latin display type. */
html[lang="ar"] body { line-height: 1.7; }
html[lang="ar"] h1, html[lang="ar"] h1 *,
html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { line-height: 1.32 !important; }
html[lang="ar"] p, html[lang="ar"] li { line-height: 1.8; }

/* Arrows and chevrons point the other way in Arabic. */
html[dir="rtl"] .ph-arrow-right,
html[dir="rtl"] .ph-arrow-up-right,
html[dir="rtl"] .ph-caret-right,
html[dir="rtl"] .ph-caret-left,
html[dir="rtl"] .ph-sign-in { display: inline-block; transform: scaleX(-1); }

/* Phone numbers, e-mails, IDs and codes stay left-to-right inside Arabic text. */
html[dir="rtl"] bdi, html[dir="rtl"] .dx-ltr { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] a[href^="tel:"], html[dir="rtl"] a[href^="mailto:"] { unicode-bidi: plaintext; }

/* Form fields: Arabic typing right-to-left, phone and e-mail fields left-to-right. */
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select { text-align: right; }
html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="email"], html[dir="rtl"] input[inputmode="tel"] { direction: ltr; text-align: right; }

/* Prose areas (guides, policy pages) */
html[dir="rtl"] .dx-prose ul, html[dir="rtl"] .dx-prose ol { padding-right: 1.3em; padding-left: 0; }

/* Language switch */
.dx-lang-switch:hover { border-color: #f59e0b !important; color: #fbbf24 !important; }
