.custom_popup{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.5);
    display:flex;
    align-items:center;
    justify-content:center;
        z-index: 99999;
    opacity:0;
    visibility:hidden;
    transition: all 0.3s ease;
    overflow: auto;
}
.custom_popup.show{
    opacity:1;
    visibility:visible;
    display: flex !important;
}
.custom_popup .modal-box{
     background:#fff;
    padding: 30px;
    width: 100%;
    max-width: 1170px;
    border-radius:5px;
    transform:translateY(0px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08);
}
.custom_popup .close {
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50px;
    font-size: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.custom-loader-outer {
    position: fixed;   /* 🔥 important */
    inset: 0;          /* top:0 left:0 right:0 bottom:0 */
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: none;
}
.custom-loading-inner {
    width: 100px;
    height: 100px;
    display: inline-block;
    overflow: hidden;
    background: none;
    position: absolute;
    z-index: 9999999;
    text-align: center;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
}
.custom-loading-inner-meta {
    width: 100%;
    height: 100%;
    position: relative;
    transform: translateZ(0) scale(1);
    backface-visibility: hidden;
    transform-origin: 0 0;
    position: absolute;
}
.custom-loading-inner-meta div:nth-child(1) {
    border-color: #f5f5f5;
}
.custom-loading-inner-meta div:nth-child(2) {
    border-color: #242424;
    animation-delay: -0.49019607843137253s;
}
.custom-loading-inner-meta div {
    position: absolute;
    border-width: 4px;
    border-style: solid;
    opacity: 1;
    border-radius: 50%;
    animation: loading-inner-meta 0.9803921568627451s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes loading-inner-meta {
    0% {
        top: 50px;
        left: 50px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 20px;
        left: 20px;
        width: 56px;
        height: 56px;
        opacity: 0;
    }
}

.custom-loader-outer::after {
    background: rgba(0, 0, 0, .2) none repeat scroll 0 0;
    content: "";
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
}
body.popup-open{
    overflow: hidden;
}

@media only screen and (min-width:320px) and (max-width:568px) {
    .custom_popup{
        z-index: 999;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
                z-index: 999999;
        display: flex;
        align-items: flex-start;   /* 🔥 change */
        justify-content: center;

        padding-top: 20px;
        overflow: auto;
    }
    .custom_popup .modal-box{
        width: 95%;
        overflow: auto;
    }

}
@media only screen and (min-width:569px) and (max-width:767px) {
    .custom_popup{
        z-index: 999;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
                z-index: 999999;
        display: flex;
        align-items: flex-start;   /* 🔥 change */
        justify-content: center;

        padding-top: 20px;
        overflow: auto;
    }
    .custom_popup .modal-box{
        width: 95%;
        overflow: auto;
    }
}

@media only screen and (min-width:767px) and (max-width:999px) {
    .custom_popup{
        z-index: 999;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
                z-index: 999999;
        display: flex;
        align-items: flex-start;   /* 🔥 change */
        justify-content: center;

        padding-top: 30px;
        overflow: auto;
    }
    .custom_popup .modal-box{
        width: 95%;
        overflow: auto;
    }
}