/* Arabic (right to left) extras. Loaded only when the user's language is Arabic (lang_lib.php tt_lang_head).
   Inline <style> and style="" are mirrored on the server; Bootstrap comes as bootstrap.rtl.min.css. */
html[dir=rtl] body,
html[dir=rtl] input, html[dir=rtl] select, html[dir=rtl] textarea, html[dir=rtl] button,
html[dir=rtl] .btn, html[dir=rtl] .form-control, html[dir=rtl] .form-select, html[dir=rtl] .dropdown-menu,
html[dir=rtl] h1, html[dir=rtl] h2, html[dir=rtl] h3, html[dir=rtl] h4, html[dir=rtl] h5, html[dir=rtl] h6 {
  font-family: 'IBM Plex Sans Arabic', Inter, 'Segoe UI', Tahoma, sans-serif !important;
}
/* letter-spacing breaks joined Arabic letters */
html[dir=rtl] body *:not(.fa):not([class^="fa-"]):not(.notranslate) { letter-spacing: 0 !important; }
html[dir=rtl] .text-uppercase { text-transform: none !important; }

/* arrows point the other way */
html[dir=rtl] .fa-arrow-right, html[dir=rtl] .fa-arrow-left, html[dir=rtl] .fa-chevron-right, html[dir=rtl] .fa-chevron-left,
html[dir=rtl] .fa-angle-right, html[dir=rtl] .fa-angle-left, html[dir=rtl] .fa-angle-double-right, html[dir=rtl] .fa-angle-double-left,
html[dir=rtl] .fa-long-arrow-alt-right, html[dir=rtl] .fa-long-arrow-alt-left, html[dir=rtl] .fa-arrow-circle-right,
html[dir=rtl] .fa-caret-right, html[dir=rtl] .fa-caret-left, html[dir=rtl] .fa-reply, html[dir=rtl] .fa-share,
html[dir=rtl] .fa-sign-out-alt, html[dir=rtl] .fa-sign-in-alt, html[dir=rtl] .fa-right-from-bracket, html[dir=rtl] .fa-paper-plane {
  transform: scaleX(-1);
}

/* customer documents stay English, left to right */
html[dir=rtl] .invoice-paper, html[dir=rtl] .rd-ltr { direction: ltr; text-align: left; }

/* codes, emails, phones, links read left to right inside Arabic */
html[dir=rtl] input[type=email], html[dir=rtl] input[type=url], html[dir=rtl] input[type=tel],
html[dir=rtl] input[name=user], html[dir=rtl] input[type=password] { direction: ltr; text-align: right; }
html[dir=rtl] input[type=email]::placeholder, html[dir=rtl] input[type=url]::placeholder, html[dir=rtl] input[type=tel]::placeholder { text-align: right; }

/* language switch button */
.rd-lang-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; }
