/* ══════════════════════════════════════════════════════════════════════
   القوايم المنسدلة فى كل الشاشات (2026-11-08)
   Radzen (الشكل كامل + fs-dropdown.js) · DevExpress · select العادى (وهو مقفول بس)
   ══════════════════════════════════════════════════════════════════════ */
html body { --dd-line: #DCE6E9; --dd-ink: #0B2A33; --dd-ink2: #3F5C64; --dd-mute: #8AA0A7; }

/* ═══ Radzen مقفولة ═══ */
html body .rz-dropdown:not(#_) { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 6px; min-height: 38px; padding: 0 8px 0 8px !important; background: #fff !important; border: 1px solid var(--dd-line) !important; border-radius: 11px !important; box-shadow: none !important; transition: border-color .15s, box-shadow .15s; }
html body .rz-dropdown:not(#_):hover { border-color: #A9C6CE !important; }
html body .rz-dropdown:not(#_):focus-within, html body .rz-dropdown.rz-state-focus:not(#_) { border-color: var(--fs-primary) !important; box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .14) !important; }
html body .rz-dropdown.rz-state-disabled:not(#_) { background: #F4F7F8 !important; }
html body .rz-dropdown .rz-helper-hidden-accessible:not(#_) { position: absolute !important; width: 0 !important; height: 0 !important; overflow: hidden; }
html body .rz-dropdown .rz-dropdown-label:not(#_) { flex: 1 1 0 !important; order: 0; min-width: 0; min-height: 0 !important; width: auto !important; height: auto !important; margin: 0 !important; padding: 0 4px !important; background: none !important; border: 0 !important; box-shadow: none !important; font-family: inherit; font-size: 14.5px !important; font-weight: 700 !important; line-height: 1.3 !important; color: var(--dd-ink) !important; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .rz-dropdown .rz-dropdown-label.rz-placeholder:not(#_) { color: var(--dd-mute) !important; font-weight: 500 !important; }
html body .rz-dropdown.rz-state-disabled .rz-dropdown-label:not(#_) { color: var(--dd-mute) !important; }
html body .rz-dropdown .rz-dropdown-label[data-fs-split]:not(#_) { font-size: 0 !important; }
html body .fs-dd-v { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; font-size: 14.5px; vertical-align: middle; }
html body .fs-dd-v b { flex: none; padding: 1px 7px; border-radius: 6px; background: var(--fs-tint-3); color: var(--fs-primary-ink); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
html body .fs-dd-v span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

html body .rz-dropdown .rz-dropdown-trigger:not(#_) { flex: none; order: 2; position: static !important; width: 22px !important; height: 22px !important; display: grid !important; place-items: center; margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; }
html body .rz-dropdown .rz-dropdown-trigger-icon:not(#_) { font-size: 0 !important; width: auto !important; height: auto !important; margin: 0 !important; position: static !important; color: var(--fs-primary) !important; }
html body .rz-dropdown .rz-dropdown-trigger-icon:not(#_)::before { content: "\ea5f"; font-family: "tabler-icons" !important; font-size: 18px; line-height: 1; color: var(--fs-primary); }
html body .rz-dropdown .rz-dropdown-clear-icon:not(#_) { flex: none; order: 1; position: static !important; width: 22px !important; height: 22px !important; display: grid; place-items: center; margin: 0 !important; border-radius: 50%; background: #EEF3F5; color: var(--dd-ink2) !important; font-size: 0 !important; cursor: pointer; }
html body .rz-dropdown .rz-dropdown-clear-icon:not(#_)::before { content: "\eb55"; font-family: "tabler-icons" !important; font-size: 13px; line-height: 1; }
html body .rz-dropdown .rz-dropdown-clear-icon:not(#_):hover { background: #FDE3DE; color: #B42318 !important; }
html body .rz-dropdown:has(.rz-dropdown-label.rz-placeholder) .rz-dropdown-clear-icon:not(#_) { display: none !important; }
html body .rz-dropdown[data-fs-blank] .rz-dropdown-clear-icon:not(#_) { display: none !important; }

/* المندوب فى رأس الفواتير: بنفس ارتفاع باقى الخانات */
html body .inv-rz.rz-dropdown:not(#_) { height: 34px; min-height: 34px; padding: 0 6px !important; border-radius: 9px !important; }
html body .inv-rz .rz-dropdown-label:not(#_) { font-size: 13.5px !important; text-align: center; }

/* ═══ Radzen مفتوحة ═══ */
html body .rz-dropdown-panel:not(#_) { margin-top: 6px; padding: 0 !important; background: #fff !important; border: 1px solid var(--dd-line) !important; border-radius: 14px !important; box-shadow: 0 16px 40px rgba(4, 37, 45, .2) !important; overflow: hidden; font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif; color: var(--dd-ink); }
html body .fs-dd-sh { display: none; }
html body .rz-dropdown-filter-container:not(#_) { position: relative; display: flex; flex-wrap: wrap; align-items: center; margin: 0 !important; padding: 8px !important; background: none !important; border: 0 !important; }
html body .rz-dropdown-filter:not(#_) { flex: 1; width: 100% !important; height: 40px !important; margin: 0 !important; padding-block: 0 !important; padding-inline: 36px 70px !important; background: #F4F8F9 !important; border: 1px solid transparent !important; border-radius: 10px !important; box-shadow: none !important; font-family: inherit; font-size: 14px !important; font-weight: 700; color: var(--dd-ink) !important; }
html body .rz-dropdown-filter:not(#_)::placeholder { color: var(--dd-mute); font-weight: 500; }
html body .rz-dropdown-filter:not(#_):focus { background: #fff !important; border-color: var(--fs-primary) !important; outline: 0; }
html body .rz-dropdown-filter-icon:not(#_) { position: absolute !important; inset-inline-start: 18px !important; inset-inline-end: auto !important; top: 50% !important; translate: 0 -50%; margin: 0 !important; font-size: 0 !important; color: var(--fs-primary) !important; }
html body .rz-dropdown-filter-icon:not(#_)::before { content: "\eb1c"; font-family: "tabler-icons" !important; font-size: 18px; line-height: 1; }
html body .fs-dd-count { position: absolute; inset-inline-end: 18px; top: 50%; translate: 0 -50%; font-size: 12px; font-weight: 700; color: #6A838A; pointer-events: none; }
html body .rz-dropdown-items-wrapper:not(#_) { width: auto !important; margin: 0 !important; max-height: 268px !important; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #C6D6DB transparent; }
html body .rz-dropdown-items-wrapper::-webkit-scrollbar { width: 6px; }
html body .rz-dropdown-items-wrapper::-webkit-scrollbar-button { display: none; }
html body .rz-dropdown-items-wrapper::-webkit-scrollbar-thumb { background: #C6D6DB; border-radius: 3px; }
html body .rz-dropdown-items:not(#_) { margin: 0 !important; padding: 0 6px 6px !important; list-style: none; }
html body .rz-dropdown-panel .rz-dropdown-item:not(#_) { display: flex !important; align-items: center; gap: 8px; min-height: 42px; margin: 0 !important; padding: 4px 10px !important; border-radius: 9px !important; background: none !important; font-size: 14px !important; font-weight: 600 !important; color: var(--dd-ink) !important; }
html body .rz-dropdown-panel .rz-dropdown-item:not(#_):hover { background: var(--fs-tint-1) !important; }
html body .rz-dropdown-panel .rz-dropdown-item > span:not(.fs-dd-row) { display: none; }
html body .fs-dd-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
html body .fs-dd-row > b { flex: none; min-width: 48px; padding: 2px 6px; border-radius: 6px; background: #F0F4F6; color: var(--dd-ink2); font-size: 12px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
html body .fs-dd-row > span { flex: 1; min-width: 0; white-space: normal; }
html body .fs-dd-row mark { padding: 0 1px; border-radius: 3px; background: #FFE7BD; color: inherit; }
html body .rz-dropdown-panel .rz-dropdown-item.rz-state-highlight:not(#_) { background: var(--fs-tint-3) !important; color: var(--fs-primary-ink) !important; font-weight: 800 !important; }
html body .rz-dropdown-item.rz-state-highlight .fs-dd-row > b { background: var(--fs-primary); color: #fff; }
html body .rz-dropdown-panel .rz-dropdown-item.rz-state-highlight:not(#_)::after { content: "\ea5e"; flex: none; font-family: "tabler-icons" !important; font-size: 18px; color: var(--fs-primary); }
html body .fs-dd-all { width: calc(100% - 12px); min-height: 42px; display: flex; align-items: center; gap: 8px; margin: 0 6px 4px; padding: 4px 10px; border: 0; border-bottom: 1px solid #EBF1F3; background: none; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--dd-ink2); text-align: start; cursor: pointer; }
html body .fs-dd-all:hover { background: var(--fs-tint-1); border-radius: 9px 9px 0 0; }
html body .fs-dd-all i { font-size: 17px; color: var(--fs-primary); }
html body .fs-dd-none { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px; font-size: 13.5px; font-weight: 600; color: #6A838A; }
html body .fs-dd-none i { font-size: 30px; color: var(--fs-tint-4); }

/* موبيل: لوحة من تحت */
@media (max-width: 768px) {
    html body .rz-dropdown-panel:not(#_) { position: fixed !important; inset: auto 0 0 0 !important; z-index: 99990 !important; width: 100% !important; min-width: 0 !important; max-height: 82dvh; margin: 0; padding: 10px 6px calc(12px + env(safe-area-inset-bottom, 0px)) !important; border: 0 !important; border-radius: 22px 22px 0 0 !important; box-shadow: 0 0 0 100vmax rgba(4, 37, 45, .45) !important; animation: fs-dd-up .22s cubic-bezier(.22, 1, .36, 1); }
    @keyframes fs-dd-up { from { transform: translateY(100%); } to { transform: none; } }
    /* القفل: Radzen بيخفى اللوحة بس لما حركة القفل (rz-close) تخلص (onanimationend). حركة الطلوع فوق كانت بتلغى حركة القفل ،
       فالقايمة كانت بتفضل ظاهرة بعد X أو الاختيار أو الضغط برّه — دى حركة نزول بديلة علشان القفل يكمّل (كل القوايم المنسدلة على الموبيل) */
    html body .rz-dropdown-panel.rz-close:not(#_) { animation: fs-dd-down .18s ease-in forwards; }
    @keyframes fs-dd-down { from { transform: none; } to { transform: translateY(100%); } }
    html body .fs-dd-sh { display: block; padding: 0 8px; }
    html body .fs-dd-grab { display: block; width: 42px; height: 5px; margin: 0 auto 8px; border-radius: 3px; background: #D5E2E6; }
    html body .fs-dd-sh > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    html body .fs-dd-sh b { font-size: 16.5px; font-weight: 900; }
    html body .fs-dd-sh button:not(#_) { flex: none; width: 34px !important; min-width: 0 !important; height: 34px !important; min-height: 0 !important; padding: 0 !important; display: grid; place-items: center; border: 0; border-radius: 10px; background: #F2F6F7; color: var(--dd-ink2); font-size: 18px !important; }
    html body .rz-dropdown-filter:not(#_) { height: 46px !important; font-size: 16px !important; }
    html body .rz-dropdown-items-wrapper:not(#_) { max-height: 52dvh !important; }
    html body .rz-dropdown-panel .rz-dropdown-item:not(#_), html body .fs-dd-all { min-height: 52px; font-size: 15px !important; }
}

/* ═══ DevExpress ═══ */
html body .dxbl-edit-dropdown:has(.dxbl-list-box-render-container):not(#_) { border: 1px solid var(--dd-line) !important; border-radius: 14px !important; box-shadow: 0 16px 40px rgba(4, 37, 45, .2) !important; overflow: hidden; }
html body .dxbl-edit-dropdown .dxbl-list-box-render-container:not(#_) { border: 0 !important; box-shadow: none !important; }
html body .dxbl-edit-dropdown .dxbl-list-box-render-container ul:not(#_) { padding: 6px !important; }
html body .dxbl-edit-dropdown .dxbl-list-box-render-container li:not(#_) { min-height: 42px; display: flex; align-items: center; margin: 0 !important; border-radius: 9px !important; background: none !important; font-family: inherit; font-size: 14px !important; font-weight: 600 !important; color: var(--dd-ink) !important; }
html body .dxbl-edit-dropdown .dxbl-list-box-render-container li:not(#_):hover, html body .dxbl-edit-dropdown .dxbl-list-box-render-container li.dxbl-state-hovered:not(#_) { background: var(--fs-tint-1) !important; }
html body .dxbl-edit-dropdown .dxbl-list-box-render-container li.dxbl-list-box-item-selected:not(#_) { justify-content: space-between; background: var(--fs-tint-3) !important; color: var(--fs-primary-ink) !important; font-weight: 800 !important; }
html body .dxbl-edit-dropdown .dxbl-list-box-render-container li.dxbl-list-box-item-selected:not(#_)::before, html body .dxbl-edit-dropdown .dxbl-list-box-render-container li:not(#_)::before { background: transparent !important; }
html body .dxbl-edit-dropdown .dxbl-list-box-render-container li.dxbl-list-box-item-selected:not(#_)::after { content: "\ea5e"; font-family: 'tabler-icons' !important; font-size: 18px; color: var(--fs-primary); }

/* ═══ select العادى وهو مقفول ═══ */
html body select:not([multiple]):not([size]):not([class*="pr-"]):not([class*="ptr"]):not(.pps-select):not(.dxbl-text-edit-input) { appearance: none; -webkit-appearance: none; padding-inline-end: 30px; border: 1px solid var(--dd-line); border-radius: 10px; background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23006780' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 9px center; background-size: 16px; }
[dir="ltr"] select:not([multiple]):not([size]):not([class*="pr-"]):not([class*="ptr"]):not(.pps-select):not(.dxbl-text-edit-input) { background-position: right 9px center; }
html body select:not([multiple]):not([size]):not([class*="pr-"]):not([class*="ptr"]):not(.dxbl-text-edit-input):focus { border-color: var(--fs-primary); outline: 0; box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb), .14); }
