/**
 * Force Center Modals CSS - Aggressive positioning override
 */

/* Force ALL modals to be centered */
#inquiry-modal,
#make-offer-modal,
#makeOfferModal,
#enquiryModal,
.modal,
[id*="modal"] {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

/* Ensure modal content is properly styled */
#inquiry-modal .modal-content,
#make-offer-modal .modal-content,
.modal .modal-content,
.modal-content {
    position: relative !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
    transform: none !important;
    max-width: 500px !important;
    width: 90% !important;
}

/* Override any bottom positioning */
*[style*="bottom: 0"] {
    bottom: auto !important;
}

*[style*="bottom:0"] {
    bottom: auto !important;
}

/* Specific fix for modals that might be positioned at bottom */
.modal[style*="display: flex"],
.modal[style*="display:flex"] {
    align-items: center !important;
    justify-content: center !important;
}

/* Force z-index to be high */
.modal,
[id*="modal"] {
    z-index: 99999 !important;
}

/* Ensure the RA modal is also centered */
#ra-modal-wrapper,
.ra-modal,
.auction-modal {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0,0,0,0.8) !important;
    z-index: 99999 !important;
}

#ra-modal-wrapper > div,
.ra-modal > div,
.auction-modal > div {
    position: relative !important;
    margin: 0 !important;
    transform: none !important;
}