﻿#adminModal {
    padding-right: 0px !important;
}

.admin_ModalDialog {
    max-width: 100% !important; /* Default width for normal mode */
    margin: auto; /* Center modal in the viewport */
    display: flex;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    z-index: 1050;
}

#adminModalContainer {
    z-index: 1050; /* Ensure modal is above other content */
    display: flex;
    height: 100%;
    width: 100%;
}

#adminModalContent {
    position: relative;
    width: 80%; /* Takes full width of dialog */
    max-width: 80% !important; /* Default width for normal mode */
    left: 10%;
    top: 40px;
    height: auto; /* Allows content height to expand */
    display: inline-block;
    overflow-x: auto;
    overflow-y: auto;
    overflow: visible; /* Allows date pickers or other elements to overflow */
}
    #adminModalContent.AdminEditModal {
        width: 100%; /* Full width of parent */
        max-width: none !important; /* Remove any max-width constraints */
        left: 0; /* Align to the left edge */
        top: 0; /* Align to the top edge */
        height: 100%; /* Full height of parent */
        overflow: visible; /* Allow overflow if needed */
    }
/* Sticky headers */
#AdminEditModalHeader,
#BulkAdminEditModalHeader,
#DataDisplayModalHeader {
    position: -webkit-sticky;
    position: sticky;
    left: 0; /* Keep header in place when scrolling */
}

/* Fullscreen modal styles (when 'modal-fullscreen' class is applied to #adminModalContent) */
#adminModalChildContent.modal-fullscreen {
    width: 100% !important; /* Full viewport width */
    max-width: 100% !important; /* Remove any width constraints */
    margin: 0; /* Remove margins */
    display: inline-block;
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    top: 0;
    left: 0;
    height: -webkit-fill-available;
}

    #adminModalChildContent.modal-fullscreen .admin_ModalDialog {
        width: 100% !important; /* Full viewport width */
        margin: 0; /* Remove dialog margins */
    }

    #adminModalChildContent.modal-fullscreen #AdminEditModalHeader,
    #adminModalChildContent.modal-fullscreen #BulkAdminEditModalHeader,
    #adminModalChildContent.modal-fullscreen #DataDisplayModalHeader {
        position: -webkit-sticky;
        position: sticky;
        left: 0;
        top: 0; /* Ensure headers remain sticky at the top */
        z-index: 1050;
        background-color: whitesmoke
    }

    /* Restrict size when inside #adminModalContent with modal-fullscreen class */
    #adminModalChildContent.modal-fullscreen .engine-loading-overlay-progress {
        max-width: 300px;
        max-height: 300px;
        margin: auto;
    }