/* =========================================================
 *  GLOBAL MODAL
 = *======================================================== */

.global-modal {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    visibility: hidden;

    opacity: 0;

    pointer-events: none;

    transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}


/* =========================================================
 *  ACTIVE MODAL
 = *======================================================== */

.global-modal.active {

    visibility: visible;

    opacity: 1;

    pointer-events: auto;
}


/* =========================================================
 *  BACKGROUND OVERLAY
 = *======================================================== */

.global-modal-overlay {

    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, 0.65);

    backdrop-filter: blur(4px);

    -webkit-backdrop-filter: blur(4px);

    cursor: pointer;
}


/* =========================================================
 *  MODAL CONTENT
 = *======================================================== */

.global-modal-content {

    position: relative;

    z-index: 2;

    width: 100%;

    max-width: 650px;

    max-height: 90vh;

    overflow-y: auto;

    background: transparent;

    border-radius: 10px;

    transform: translateY(25px) scale(0.97);

    transition: transform 0.3s ease;

    scrollbar-width: thin;
}


.global-modal.active .global-modal-content {

    transform: translateY(0) scale(1);
}


/* =========================================================
 *  CLOSE BUTTON
 = *======================================================== */

.global-modal-close {

    position: absolute;

    top: 10px;

    right: 0px;

    z-index: 10;

    width: 38px;

    height: 38px;

    padding: 0;

    border: none;

    border-radius: 50%;

    background: #ffffff;

    color: #222222;

    font-size: 25px;

    line-height: 1;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);

    transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}


.global-modal-close:hover {

    background: #222222;

    color: #ffffff;

    transform: rotate(90deg);
}


/* =========================================================
 *  LOADER
 = *======================================================== */

.global-modal-loader {

    display: flex;

    align-items: center;

    justify-content: center;

    min-height: 200px;

    padding: 40px;

    background: #ffffff;

    border-radius: 10px;

    font-size: 15px;

    color: #555555;
}


/* =========================================================
 *  HIDE LOADER AFTER FORM LOAD
 = *======================================================== */

.global-modal-body {

    display: none;
}


.global-modal-body.loaded {

    display: block;
}


/* =========================================================
 *  BODY LOCK
 = *======================================================== */

body.modal-open {

    overflow: hidden;
}


/* =========================================================
 *  MOBILE
 = *======================================================== */

@media (max-width: 767px) {

    .global-modal {

        padding: 15px;

    }


    .global-modal-content {

        max-width: 100%;

        max-height: 92vh;

        border-radius: 8px;

    }


    .global-modal-close {

        top: 10px;

        right: 10px;

        width: 34px;

        height: 34px;

        font-size: 22px;

    }

}
