#pribpofo-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
    display: none;
}

#pribpofo-popup {
    position: fixed;
    background: transparent;
    z-index: 9999;
    padding: 20px;
    border-radius: 10px;
    display: none;
    box-sizing: border-box;
}

/* CLOSE BUTTON */
#pribpofo-popup-close {
    position: absolute;
    top: -16px;
    right: -11px;
    font-size: 20px;
    cursor: pointer;
    z-index: 99999;
    background-color: #fff;
    border-radius: 100px;
    padding: 0px 10px 5px;
}

/* CENTER */
.layout-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
}

/* SLIDE LEFT/RIGHT */
#pribpofo-popup.layout-left,
#pribpofo-popup.layout-right {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 600px;
    transform: translate(-50%, -50%);
    will-change: transform;
}

/* FULLSCREEN POPUP */
#pribpofo-popup.layout-fullscreen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 99999;
}

#pribpofo-popup.layout-fullscreen > .elementor {
    max-width: 1200px;
    width: 100%;
    height: auto;
    margin: auto;
    display: block;
    background: inherit;
}

#pribpofo-popup.layout-fullscreen #pribpofo-popup-close {
    position: fixed;
    top: 20px;
    right: 25px;
    font-size: 20px;
    cursor: pointer;
    z-index: 100000;
    pointer-events: auto;
}

/* Bottom Right */
#pribpofo-popup.layout-bottom {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 360px;
    max-width: calc(100% - 40px);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    z-index: 999999;
    display: none;
    padding: 0px;
}

.layout-bottom #pribpofo-popup-close {
    position: absolute;
    top: -14px;
    right: -8px;
}

/* Mobile */
@media (max-width: 480px) {
    #pribpofo-popup.layout-bottom {
        width: 100%;
        right: 0;
        bottom: 0;
        border-radius: 16px 16px 0 0;
    }
}

/* BLUR BACKGROUND */
#pribpofo-popup-overlay.layout-blurbackground {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#pribpofo-popup.layout-blurbackground {
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 600px;
    opacity: 0;
    transition: all 0.3s ease;
}

#pribpofo-popup.layout-blurbackground.pribpofo-active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* POPUP SCROLL */
#pribpofo-popup {
    max-height: 90vh;
    overflow: hidden;
}

#pribpofo-popup > .elementor,
#pribpofo-popup .pribpofo-popup-inner {
    max-height: calc(90vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* FULLSCREEN SCROLL */
#pribpofo-popup.layout-fullscreen {
    overflow: hidden;
}

#pribpofo-popup.layout-fullscreen > .elementor {
    max-height: 100vh;
    overflow-y: auto;
}

/* CENTER / SLIDE / BLUR  */
.layout-center,
.layout-left,
.layout-right,
#pribpofo-popup.layout-blurbackground {
    max-height: 90vh;
}

.layout-center > .elementor,
.layout-left > .elementor,
.layout-right > .elementor,
#pribpofo-popup.layout-blurbackground > .elementor {
    max-height: calc(90vh - 40px);
    overflow-y: auto;
}

/* BOTTOM POPUP SCROLL */
#pribpofo-popup.layout-bottom {
    max-height: 70vh;
    overflow: hidden;
}

#pribpofo-popup.layout-bottom > .elementor {
    max-height: 70vh;
    overflow-y: auto;
}


/*  CLOSE BUTTON */
#pribpofo-popup {
    overflow: visible;
}

#pribpofo-popup-close {
    position: fixed;
    top: 33px;
    right: 49px;
    z-index: 100000;
}

/* FULLSCREEN CLOSE */
#pribpofo-popup.layout-fullscreen #pribpofo-popup-close {
    position: fixed;
    top: 33px;
    right: 49px;
}

/* BOTTOM POPUP CLOSE */
#pribpofo-popup.layout-bottom #pribpofo-popup-close {
    position: absolute;
    top: -14px;
    right: -8px;
    z-index: 999999;
}

/* PIN DROP RIGHT */
#pribpofo-popup.layout-pin-drop-right {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 600px;

    transform: translate(-50%, -50%) rotate(0deg);
    transform-origin: top right;
    opacity: 1;
}

#pribpofo-popup.layout-pin-drop-right.pribpofo-swing {
    animation: epbSwingLeft 1s ease-in-out forwards;
}


#pribpofo-popup.layout-pin-drop-right.pribpofo-drop {
    animation: epbDropDown 0.8s ease-in forwards;
}

@keyframes epbSwingLeft {
    0%   { transform: translate(-50%, -50%) rotate(0deg); }
    40%  { transform: translate(-50%, -50%) rotate(-18deg); }
    70%  { transform: translate(-50%, -50%) rotate(-10deg); }
    100% { transform: translate(-50%, -50%) rotate(-14deg); }
}

@keyframes epbDropDown {
    0% {
        transform: translate(-50%, -50%) rotate(-14deg) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(-14deg) translateY(120vh);
        opacity: 0;
    }
}

@media (max-width: 767px)  {
    #pribpofo-popup.layout-fullscreen #pribpofo-popup-close {
        position: fixed;
        top: 168px;
        right: 13px;
    }

    #pribpofo-popup-close {
        top: 10px;
        right: 10px;
    }

    /* MOBILE SCROLL */
    #pribpofo-popup {
        max-height: 95vh;

    }

    #pribpofo-popup.layout-bottom #pribpofo-popup-close {
        top: 5px !important;
        right: 5px !important;
    }

    #pribpofo-popup.layout-fullscreen #pribpofo-popup-close {
    top: 174px !important;
    right: 30px !important;
    }

    #pribpofo-popup > .elementor,
    #pribpofo-popup .pribpofo-popup-inner {
        max-height: calc(95vh - 30px);
    }

    #pribpofo-popup.layout-bottom {
        max-height: 85vh;
    }

}