/* IntSuper Desk — RTL polish layered on top of the compiled Chatwoot CSS.
   Loaded from /brand/rtl.css (host: /var/www/desk-brand/rtl.css), so it can be
   edited without rebuilding or restarting anything. */

/* Latin-only fields read backwards under dir=rtl: an address becomes
   "com.intsuper@matan" to the eye and the caret jumps on every "." and "@".
   Keep the CONTENT ltr but the BOX aligned to the RTL start edge. */
[dir='rtl'] input[type='email'],
[dir='rtl'] input[name='email_address'],
[dir='rtl'] input[type='url'],
[dir='rtl'] input[type='tel'],
[dir='rtl'] input[name*='url' i],
[dir='rtl'] input[name*='domain' i],
[dir='rtl'] input[name*='webhook' i] {
  direction: ltr;
  text-align: right;
}

/* Secrets, tokens, ids and code blocks are Latin by definition. */
[dir='rtl'] code,
[dir='rtl'] pre,
[dir='rtl'] input[type='password'] {
  direction: ltr;
  text-align: right;
}

/* An email address or a URL inside Hebrew prose keeps its own direction so the
   punctuation does not migrate to the wrong end of the string. */
[dir='rtl'] a[href^='mailto:'],
[dir='rtl'] a[href^='http'] {
  unicode-bidi: isolate;
}
