/*
 * Loaded last (footerjs) so it beats Settings → Theme → CSS Style.
 * That field still holds a pasted RTL v4, injected at the end of <head>,
 * which sets .modal { direction: rtl } and shoves the centred dialog to
 * the right. Clicks then miss the switch and hit إغلاق.
 *
 * Overlay stays LTR (Bootstrap geometry). The dialog inside is RTL.
 * Applies to every GrowCRM add/edit modal (commonModal, actionsModal,
 * plainModal, createModal) — they all use class `modal`.
 */
html[dir="rtl"] body.loggedin .modal {
    direction: ltr;
    text-align: left;
    overflow-x: hidden;
}

html[dir="rtl"] body.loggedin .modal .modal-dialog {
    direction: rtl;
    text-align: right;
    margin-left: auto;
    margin-right: auto;
}

html[dir="rtl"] body.loggedin .modal .modal-dialog .modal-header button.close,
html[dir="rtl"] body.loggedin .modal .modal-content .x-extra-close-icon {
    right: auto;
    left: 20px;
    margin: 0;
}
