/* ==========================================================================
   SN WORLDWIDE TOURS
   Shared Admin Modal Foundation
   Bootstrap 5.3.3
   PHP 7.4.3 compatible project
   ========================================================================== */


/* --------------------------------------------------------------------------
   Base Modal
   -------------------------------------------------------------------------- */

.modal-dialog {
    width: auto;
    margin: 1rem auto;
}


/* --------------------------------------------------------------------------
   Scrollable Modal
   -------------------------------------------------------------------------- */

.modal-dialog-scrollable {
    height: calc(100vh - 2rem);
    max-height: calc(100vh - 2rem);
}

.modal-dialog-scrollable .modal-content {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-dialog-scrollable .modal-content > form {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modal-dialog-scrollable .modal-header {
    flex: 0 0 auto;
}

.modal-dialog-scrollable .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.modal-dialog-scrollable .modal-footer {
    flex: 0 0 auto;
}


/* --------------------------------------------------------------------------
   Desktop
   -------------------------------------------------------------------------- */

@media (min-width: 992px) {

    .modal-dialog {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .modal-dialog-scrollable {
        height: calc(100vh - 3rem);
        max-height: calc(100vh - 3rem);
    }

}


/* --------------------------------------------------------------------------
   Tablet
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {

    .modal-dialog {
        width: auto;
        max-width: calc(100% - 1rem);
        margin: 0.5rem auto;
    }

    .modal-dialog-scrollable {
        height: calc(100vh - 1rem);
        max-height: calc(100vh - 1rem);
    }

}


/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 575.98px) {

    .modal-dialog {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .modal-dialog-scrollable {
        height: 100vh;
        max-height: 100vh;
        margin: 0;
    }

    .modal-dialog-scrollable .modal-content {
        min-height: 100vh;
        height: 100vh;
        max-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .modal-dialog-scrollable .modal-content > form {
        height: 100%;
        min-height: 0;
    }

    .modal-dialog-scrollable .modal-header {
        padding: 0.9rem 1rem;
    }

    .modal-dialog-scrollable .modal-body {
        padding: 1rem;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .modal-dialog-scrollable .modal-footer {
        padding: 0.9rem 1rem;
        gap: 0.5rem;
    }

    .modal-dialog-scrollable .modal-footer .btn {
        flex: 1 1 auto;
    }

}