/* DevExpress renders editor dropdowns inside a popup-cell whose own z-index
   creates a stacking context. Raising only .dxbl-dropdown is therefore not
   sufficient: the list can open correctly but remain behind a WMS modal. */
dxbl-popup-root > .dxbl-popup-cell:has(> .dxbl-dropdown) {
    z-index: 3000 !important;
}

.dxbl-dropdown {
    z-index: 3001 !important;
}

/* Shared warning and confirmation dialogs must be centred against the
   visible application viewport, independent of the page/grid width. */
.wms-centered-message-popup.dxbl-popup {
    position: fixed !important;
    top: 50dvh !important;
    left: 50vw !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box !important;
    justify-self: center !important;
    align-self: center !important;
}

.wms-centered-message-popup.wms-alert-popup.dxbl-popup {
    width: min(460px, calc(100vw - 24px)) !important;
}

.wms-centered-message-popup.wms-confirm-popup.dxbl-popup {
    width: min(400px, calc(100vw - 24px)) !important;
}

.wms-centered-message-popup .dxbl-modal-content {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.wms-dynamic-picker-popup-fullscreen.dxbl-popup {
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    max-height: none !important;
    margin: 0 !important;
    justify-self: stretch !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.wms-dynamic-picker-popup-fullscreen .dxbl-modal-content {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.wms-dynamic-picker-popup-fullscreen .dxbl-modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.wms-dynamic-picker-popup-fullscreen .dxbl-modal-footer {
    flex: 0 0 auto !important;
    padding: 0 !important;
}

/* Report task editors are fixed to the viewport centre and cannot be dragged.
   Only the active tab scrolls; title, tabs and save/cancel stay visible. */
.report-task-editor-fullscreen.dxbl-popup {
    position: fixed !important;
    top: 50vh !important;
    top: 50dvh !important;
    left: 50vw !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 0 !important;
}
.report-task-editor-fullscreen .dxbl-modal-content {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
}
.report-task-editor-fullscreen .dxbl-modal-body {
    display: flex !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
}
.report-task-editor-fullscreen .task-editor-form {
    display: flex;
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Label user permissions use the same true fullscreen, fixed-footer shell. */
.label-permission-popup-fullscreen.dxbl-popup,
.label-user-picker-popup-fullscreen.dxbl-popup {
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    max-height: none !important;
    margin: 0 !important;
    justify-self: stretch !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.label-permission-popup-fullscreen .dxbl-modal-content,
.label-user-picker-popup-fullscreen .dxbl-modal-content {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.label-permission-popup-fullscreen .dxbl-modal-body,
.label-user-picker-popup-fullscreen .dxbl-modal-body {
    display: flex !important;
    flex: 1 1 0 !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.label-permission-popup-fullscreen .dxbl-modal-footer,
.label-user-picker-popup-fullscreen .dxbl-modal-footer {
    flex: 0 0 auto !important;
    padding: 0 !important;
    background: #fff !important;
    border-top: 1px solid #dbe2eb !important;
}

/* Shipment plan lookups share one compact, fixed-footer selection surface. */
.shipment-plan-lookup-popup .dxbl-modal-content {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.shipment-plan-lookup-popup .dxbl-modal-body {
    display: flex !important;
    flex: 1 1 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.shipment-plan-lookup-popup .dxbl-modal-footer {
    flex: 0 0 auto !important;
    padding: 0 !important;
}

.shipment-plan-lookup-popup .wms-dynamic-picker {
    width: 100%;
    min-height: 0;
}

.shipment-plan-list-popup.dxbl-popup {
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    align-self: stretch !important;
    justify-self: stretch !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 24px 70px rgba(12, 38, 62, .3) !important;
}

.shipment-plan-list-popup .dxbl-modal-content {
    display: flex !important;
    height: 100% !important;
    min-height: 0 !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-radius: 0 !important;
}

.shipment-plan-list-popup .dxbl-modal-body {
    display: flex !important;
    min-height: 0 !important;
    flex: 1 1 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.shipment-plan-list-popup .dxbl-modal-footer {
    flex: 0 0 auto !important;
    padding: 0 !important;
    background: #fff !important;
    border-top: 1px solid #d8e2ea !important;
}

.shipment-plan-list-popup-header {
    min-height: 48px !important;
    color: #1a365d !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06) !important;
    font-size: .96rem !important;
    font-weight: 850 !important;
}

.shipment-order-create-popup.dxbl-popup {
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 1rem !important;
    box-shadow: 0 26px 70px rgba(12, 38, 62, .34) !important;
}

.shipment-order-create-popup .dxbl-modal-content {
    overflow: hidden !important;
    border-radius: 1rem !important;
}

.shipment-order-create-popup .dxbl-modal-body,
.shipment-order-create-popup .dxbl-modal-footer {
    padding: 0 !important;
}

.shipment-order-create-popup .dxbl-modal-footer {
    background: #fff !important;
    border-top: 1px solid #d8e2ea !important;
}

.shipment-order-create-popup-header {
    min-height: 46px !important;
    color: #1a365d !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06) !important;
    font-size: .95rem !important;
    font-weight: 850 !important;
}

.count-report-popup.dxbl-popup {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    align-self: stretch !important;
    justify-self: stretch !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.count-report-popup .dxbl-modal-content {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-radius: 0 !important;
}

.count-report-popup .dxbl-modal-body {
    display: flex !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.count-report-popup-header {
    min-height: 46px !important;
    color: #1a365d !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06) !important;
    border-radius: 0 !important;
    font-size: .95rem !important;
    font-weight: 850 !important;
}

.count-stock-detail-popup.dxbl-popup {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    align-self: stretch !important;
    justify-self: stretch !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.count-stock-detail-popup .dxbl-modal-content {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-radius: 0 !important;
}

.count-stock-detail-popup .dxbl-modal-body {
    display: flex !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.stock-count-detail-popup-header {
    min-height: 46px !important;
    color: #1a365d !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06) !important;
    border-radius: 0 !important;
    font-size: .95rem !important;
    font-weight: 850 !important;
}

.count-create-popup-header,
.count-transfer-popup-header {
    color: #1a365d !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06) !important;
}

/* The count order editor is rendered in the DevExpress portal. Pinning the
   popup itself to the viewport prevents right drift and keeps its footer in
   the visible application area at every browser size. */
.count-create-popup.dxbl-popup {
    position: fixed !important;
    top: 12px !important;
    left: 50vw !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    height: calc(100dvh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.count-create-popup .dxbl-modal-content {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.count-create-popup .dxbl-modal-body {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.count-create-popup .dxbl-modal-footer {
    flex: 0 0 auto !important;
    padding: 0 !important;
    background: #fff !important;
    border-top: 1px solid #d9e3ea !important;
}

.count-stock-detail-popup .stock-count-detail-refresh {
    color: #fff !important;
    background: #65359a !important;
    border-color: #65359a !important;
}

.count-stock-detail-popup .stock-count-detail-refresh:hover:not(:disabled),
.count-stock-detail-popup .stock-count-detail-refresh:focus-visible:not(:disabled) {
    color: #fff !important;
    background: #542c81 !important;
    border-color: #542c81 !important;
}

.count-stock-detail-popup .stock-count-detail-refresh:disabled {
    color: #fff !important;
    background: #65359a !important;
    border-color: #65359a !important;
    opacity: .6;
}
