/* ============================================================================
   RTL (Arabic) overrides — active only under <html dir="rtl"> (set by the language
   toggle + the pre-paint script in App.razor). The app is flexbox-heavy, so most row
   layouts and Bootstrap logical utilities (ms-/me-/text-start/float-start…) auto-flip
   under dir=rtl. This file fixes the explicit PHYSICAL-direction CSS (text-align,
   side padding/margins, side borders, absolute left/right) that doesn't flip itself,
   for the shared .erp-* / .portal-* components every page is built from.
   ========================================================================== */

/* ── Typography ─────────────────────────────────────────────────────────── */
[dir="rtl"] body,
[dir="rtl"] .erp-shell,
[dir="rtl"] .portal-shell { font-family: 'Noto Sans Arabic', 'IBM Plex Sans', 'Inter', sans-serif; }

/* ── Form controls read right-to-left (numbers/inputs keep LTR digits) ────── */
[dir="rtl"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
[dir="rtl"] textarea,
[dir="rtl"] select,
[dir="rtl"] .form-ctrl,
[dir="rtl"] .erp-input { text-align: right; }

/* ── Field label/value rows ───────────────────────────────────────────────── */
[dir="rtl"] .erp-field-label { text-align: right; padding-right: 0; padding-left: 4px; }
[dir="rtl"] .erp-field-input { text-align: right; }

/* ── Menus / dropdown & list items that were hard left-aligned ────────────── */
[dir="rtl"] .erp-actionmenu-item,
[dir="rtl"] .dd-views-item-main,
[dir="rtl"] .cmdk-item,
[dir="rtl"] .topnav-dd-item,
[dir="rtl"] .erp-tb-dropdown-item { text-align: right; }

/* ── Cards / sections / toolbars: align headings & content to the start ───── */
[dir="rtl"] .erp-card-title,
[dir="rtl"] .erp-card-header,
[dir="rtl"] .erp-field-section-label,
[dir="rtl"] .erp-field-separator-text { text-align: right; }

/* Active-tab / selected accents that used a physical left edge */
[dir="rtl"] .erp-tab.active::after { left: auto; right: 0; }

/* ── Tables / grids: cells read right-to-left ─────────────────────────────── */
[dir="rtl"] .erp-table th,
[dir="rtl"] .erp-table td { text-align: right; }
/* DevExpress grids/editors honour the inherited direction */
[dir="rtl"] .dxbl-grid,
[dir="rtl"] .dxbl-text-edit,
[dir="rtl"] .dxbl-combobox { direction: rtl; }

/* ── Portal building blocks ───────────────────────────────────────────────── */
[dir="rtl"] .portal-greeting,
[dir="rtl"] .portal-record-title,
[dir="rtl"] .portal-card-title,
[dir="rtl"] .portal-section-head,
[dir="rtl"] .portal-profile-main,
[dir="rtl"] .portal-balance-main { text-align: right; }
/* The "value" column of a record line sits at the opposite (start) edge */
[dir="rtl"] .portal-record-val { text-align: left; }
[dir="rtl"] .portal-record-for { flex-direction: row; }
/* Mobile bottom-action-bar icon button accents inherit direction via flex */
