.af-ui-language-menu { position: relative; flex: 0 0 auto; color: var(--my-shell-ink, #173052); }
.af-ui-language-trigger { list-style: none; width: auto; min-width: 42px; gap: 5px; padding-inline: 9px; }
.af-ui-language-trigger::-webkit-details-marker { display: none; }
.af-ui-language-trigger span { font-size: 10px; font-weight: 800; }
.af-ui-language-options { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-end: 0; z-index: 300600; min-width: 160px; padding: 6px; border: 1px solid var(--my-shell-line, #d8e4f2); border-radius: 12px; background: var(--my-shell-surface, #fff); box-shadow: var(--my-shell-shadow, 0 8px 24px #0002); }
.af-ui-language-options form { margin: 0; }
.af-ui-language-options button { display: flex; justify-content: space-between; align-items: center; gap: 15px; width: 100%; min-height: 38px; padding: 8px 12px; border: 0; border-radius: 8px; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.af-ui-language-options button:hover, .af-ui-language-options button:focus-visible { background: var(--my-shell-surface-soft, #f1f5f9); }
.af-ui-language-options button.is-active { color: var(--my-shell-primary, #1747a6); background: var(--my-shell-surface-soft, #f1f5f9); font-weight: 800; }
html[dir="ltr"] .invoice-location-balances-menu,
html[dir="ltr"] .my-document-discount-popover,
html[dir="ltr"] .erp-opr-invoice-shell .opr2-payment-dialog { direction: ltr; }
html[dir="ltr"] body .erp-opr-invoice-shell[data-invoice-payment-ui="premium"][data-document-kind][data-opr-typ] .opr2-payment-dialog .opr2-payment-party-field-shell { direction: ltr !important; }
html[dir="ltr"] body .erp-opr-invoice-shell[data-invoice-payment-ui="premium"][data-document-kind][data-opr-typ] .opr2-payment-dialog .opr2-payment-party-field > [data-opr2-payment-party-label] { right: auto !important; left: 90px !important; }
@media print { .af-ui-language-menu { display: none !important; } }

/* ERP UI containers follow the selected language. Data and print-document directions stay explicit. */
html[dir="ltr"] body .my-nav-clock,
html[dir="ltr"],
html[dir="ltr"] body,
html[dir="ltr"] body .opr-unit-row-details,
html[dir="ltr"] body .opr-unit-settings-menu,
html[dir="ltr"] body #OprItems_divSearch_items .erp-item-search-grid,
html[dir="ltr"] body .items-toast-host,
html[dir="ltr"] body #OprItems_Page .opr-unit-actions-menu,
html[dir="ltr"] body #OprItems_Page .opr-unit-row-details,
html[dir="ltr"] body #OprItems_Page .items-units-detail-table .opr-unit-row-anchor,
html[dir="ltr"] body #OprItems_Page .opr-unit-completion-backdrop,
html[dir="ltr"] body #OprItems_Page #OprItems_RawMaterialSearchModal,
html[dir="ltr"] body #OprAccounts_Page .items-toast-host,
html[dir="ltr"] body #OprAccounts_Page .accounts-reference-actions-menu,
html[dir="ltr"] body .options-page,
html[dir="ltr"] body .invoice-totals-actions-host,
html[dir="ltr"] body .invoice-summary-action-controls,
html[dir="ltr"] body .erp-opr-invoice-shell .my-document-totals-head,
html[dir="ltr"] body .erp-opr-invoice-shell .my-document-totals[data-placement="side"] .my-document-totals-head,
html[dir="ltr"] body .erp-opr-invoice-shell .my-document-totals[data-placement="side"] .my-document-totals-head > h2,
html[dir="ltr"] body .erp-opr-invoice-shell .pos2-legacy-stage .pos-official-commands > .my-document-zatca-status,
html[dir="ltr"] body .erp-opr-invoice-shell #BigModal_Search_items .erp-item-search-view-switch,
html[dir="ltr"] body .erp-opr-invoice-shell #BigModal_Search_items .erp-item-search-filter,
html[dir="ltr"] body .erp-opr-invoice-shell #BigModal_Search_items .erp-item-search-total,
html[dir="ltr"] body .erp-opr-invoice-shell #BigModal_Search_items .erp-item-search-toolbar,
html[dir="ltr"] body .erp-opr-sndat-shell #tblOprDetail td[data-column-key="idx"] .voucher-line-row-head,
html[dir="ltr"] body .erp-opr-sndat-shell #VoucherAccountSearchModal .erp-item-search-view-switch,
html[dir="ltr"] body .my-report-page,
html[dir="ltr"] body .my-report-result-title,
html[dir="ltr"] body .my-report-date-field,
html[dir="ltr"] body .my-report-columns-menu[data-af-floating-surface="true"],
html[dir="ltr"] body .my-report-data-table,
html[dir="ltr"] body .my-report-date-group,
html[dir="ltr"] body .pos2-legacy-stage .pos-cart,
html[dir="ltr"] body .pos2-legacy-stage .pos-main,
html[dir="ltr"] body .pos2-legacy-stage .pos-operation-button,
html[dir="ltr"] body .pos2-legacy-stage .pos-command-end-cluster,
html[dir="ltr"] body .pos2-legacy-stage .payment-toolbar,
html[dir="ltr"] body .pos2-restaurant-document .pos2-action-access-note,
html[dir="ltr"] body .pos2-legacy-stage .pos-party-lookup,
html[dir="ltr"] body .pos2-legacy-stage .category-strip-grid,
html[dir="ltr"] body .pos2-legacy-stage .category-strip button,
html[dir="ltr"] body .pos2-legacy-stage .product-grid,
html[dir="ltr"] body .pos2-legacy-stage .product-card,
html[dir="ltr"] body .pos2-restaurant-document .my-document-message,
html[dir="ltr"] body .erp-opr-invoice-shell.pos2-restaurant-document .pos2-legacy-stage .pos-party-lookup,
html[dir="ltr"] body #OprDocumentRoot.pos2-restaurant-document[data-pos2-keyboard-visible="false"] .cart-payment-dock .payment-grid,
html[dir="ltr"] body #OprDocumentRoot.pos2-restaurant-document .restaurant-cart-panel-shell,
html[dir="ltr"] body #OprDocumentRoot.pos2-restaurant-document .cart-payment-dock .payment-grid,
html[dir="ltr"][data-mobile-document-device="true"] #OprDocumentRoot.pos2-restaurant-document .restaurant-cart-panel-shell,
html[dir="ltr"][data-mobile-document-device="true"] #OprDocumentRoot.pos2-restaurant-document .cart-payment-dock .payment-grid,
html[dir="ltr"] body .auth-brand-panel,
html[dir="ltr"] body .auth-form-panel,
html[dir="ltr"] body .auth-attendance-menu-trigger,
html[dir="ltr"] body .auth-hr-qr-card,
html[dir="ltr"] body .auth-form-options,
html[dir="ltr"] body .auth-action-row,
html[dir="ltr"] body .auth-action-row > *,
html[dir="ltr"] body .auth-support-footer,
html[dir="ltr"] body .auth-mobile-brand,
html[dir="ltr"] body .dashboard-filter,
html[dir="ltr"] body .section-dashboard-filter__dates,
html[dir="ltr"] body .section-dashboard-filter__date-field,
html[dir="ltr"] body .dashboard-switcher,
html[dir="ltr"] body .section-dashboard,
html[dir="ltr"] body #VoucherAccountSearchModal#VoucherAccountSearchModal .erp-voucher-account-search-premium-box,
html[dir="ltr"] body #VoucherAccountSearchModal#VoucherAccountSearchModal .erp-item-search-toolbar,
html[dir="ltr"] body #VoucherAccountSearchModal#VoucherAccountSearchModal .erp-item-search-filter { direction: ltr !important; }
html[dir="ltr"] body .hr-visual-page.hr-visual-page { direction: ltr !important; text-align: start; }
html[dir="ltr"] body .hr-visual-page.hr-visual-page :is(.hr-visual-table, .hrw-table, .hrr-table, .hrp-table, .hri-table-wrap table) { direction: ltr !important; }
html[dir="ltr"] body.mysite-register-body,
html[dir="ltr"] body.mysite-register-body .register-existing-account-dialog { direction: ltr !important; }
html[dir="ltr"] body.mysite-register-body :is(.register-theme-menu button, .register-stepper button, .register-selected-plan, .register-existing-account-dialog) { text-align: start; }
html[dir="ltr"] body.mysite-register-body .register-phone-country :is(option, optgroup) { direction: ltr; }
body.mysite-register-body .af-ui-language-trigger { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; border: 1px solid var(--register-line, #d8e4f2); border-radius: 9px; background: var(--register-surface, #fff); color: var(--register-ink, #173052); cursor: pointer; }
body.mysite-register-body .af-ui-language-options { border-color: var(--register-line); background: var(--register-surface); color: var(--register-ink); }
