/**
 * Correctif global modals Bootstrap — empilement backdrop / dialogue.
 * (Régression : erp-compte-modern.css forçait backdrop z-index 2090 sur toutes les pages.)
 */
body.modal-open .modal-backdrop.show {
    z-index: 1050 !important;
    opacity: 0.5 !important;
}

body.modal-open .modal.show {
    z-index: 1055 !important;
    opacity: 1 !important;
}

body.modal-open .modal.show .modal-dialog,
body.modal-open .modal.show .modal-content {
    opacity: 1 !important;
}

body.modal-open .modal.show .modal-content {
    background-color: var(--vz-modal-bg, #fff) !important;
}

body.modal-open .modal.show .modal-header,
body.modal-open .modal.show .modal-body,
body.modal-open .modal.show .modal-footer {
    opacity: 1 !important;
}

/* Volet global mouvements client — empilement dédié */
body.modal-open:has(#erpMvtGlobalDetailModal.show) .modal-backdrop.show {
    z-index: 2090 !important;
}

#erpMvtGlobalDetailModal.modal.show {
    z-index: 2100 !important;
}

/* Shell Fashion : modals hors #layout-wrapper, z-index cohérent avec topbar (1000) */
body.pap-fashion-body.modal-open .modal.show {
    z-index: 1060 !important;
}

body.pap-fashion-body.modal-open .modal-backdrop.show {
    z-index: 1055 !important;
}

/* Modal création transaction — liste client Choices.js au-dessus des champs suivants */
#showModalvente .modal-content,
#showModalvente .modal-body {
    overflow: visible !important;
}

#showModalvente .choices {
    position: relative;
    margin-bottom: 0;
    overflow: visible;
}

#showModalvente .choices.is-open,
#showModalvente .mb-3.erp-choices-open {
    position: relative;
    z-index: 1080;
}

#showModalvente .choices.is-open {
    overflow: visible !important;
}

#showModalvente .choices__list--dropdown {
    z-index: 1080 !important;
}

#showModalvente .choices__list--dropdown .choices__list {
    max-height: 240px;
}

#showModalvente .choices__list--dropdown .choices__item {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}
