/*********************************************
 * Popups
**********************************************/
.easy-popup-master {
    --ep-bg:rgba(0, 35, 67, .6);
    --ep-max-width:992px;
    --ep-radius:20px;
    --ep-close-color:#fff;
    --ep-close-color-hover:#fff;
    --ep-close-size:44px;
}
.easy-popup-inner {
    overflow:auto; max-height:calc(100vh - 80px);
    border-radius:var(--ep-radius); position:unset;
}
.easy-popup-content {padding:calc(var(--ep-close-size) + var(--ep-padding)) var(--ep-padding);}

/* Scrollbar */
.easy-popup-inner::-webkit-scrollbar {width:0; height:0;}

/* Close */
.easy-popup-close-button {
    border-radius:0 var(--ep-radius) 0 10px; top:40px; right:20px;
    background:var(--bb-color-blue); padding:0;
    width:var(--ep-close-size); aspect-ratio:1;
    display:flex; align-items:center; justify-content:center;
}
.easy-popup-close-button > span {line-height:.5;}
.easy-popup-close-button:hover {background:var(--bb-color-primary);}

/* Image has link */
.easy-popup-content a.bb-site-popup-content__image:before {
    z-index:1; opacity:0; background:#000;
    transition:opacity .3s ease;
}
.easy-popup-content a.bb-site-popup-content__image img {transition:transform .3s ease; z-index:2;}
.easy-popup-content a.bb-site-popup-content__image:hover:before {opacity:.3;}
.easy-popup-content a.bb-site-popup-content__image:hover img {transform:scale(1.03);}

/* Layout text */
.popup-type-text .bb-popup-content {max-width:665px;}

/* Layout image text */
.popup-type-text_image .easy-popup-content {padding:0;}
.popup-type-text_image .bb-site-popup-content-image {width:32.25%;}
.popup-type-text_image .bb-site-popup-content__text {
    width:67.75%;
    padding:calc(var(--ep-close-size) + var(--ep-padding)) var(--ep-padding);
}

/* Layout iframe */
.easy-popup.popup-type-iframe {--ep-padding:0;}
.easy-popup.popup-type-iframe iframe {width:100%; display:block;}

/* Layout form */
.popup-type-form .bb-site-popup-content {flex-direction:column;}
.popup-type-form .bb-site-popup-content__form {padding-top:var(--bb-spacing-heading)}

/* Layout image */
.easy-popup.popup-type-image {--ep-padding:0;}
.easy-popup.popup-type-image .easy-popup-overflow {display:flex;}
.easy-popup.popup-type-image .easy-popup-container {max-width:100vw; width:auto;}
.easy-popup.popup-type-image .bb-site-popup-content-image {width:100%;}


/*********************************************
 * Popups Responsive
**********************************************/
@media only screen and (max-width:1024px) {
    /* Height popup on devices */
    .easy-popup-inner {max-height:calc(100vh - 80px - 59px);}
    .popup-type-image .bb-site-popup-content-image-bg {
        height:calc(100vh - 80px - 59px - 2 * (var(--ep-close-size) + var(--ep-padding)));
    }
    html.iphone .easy-popup-inner {max-height:calc(100vh - 80px - 74px);}
}
@media only screen and (max-width:768px) {
    /* Layout text */
    .popup-type-text .bb-site-popup-content,
    .popup-type-iframe .bb-site-popup-content {
        height:100%; align-items:center; min-height:calc(636px - 2 * (var(--ep-close-size) + var(--ep-padding)));
    }

    /* Layout text image */
    .popup-type-text_image .bb-site-popup-content {flex-direction:column;}
    .popup-type-text_image .bb-site-popup-content__text {
        --bb-spacing-paragraph:30px;
        width:100%; padding-bottom:var(--bb-spacing-45);
    }
    .popup-type-text_image .bb-site-popup-content-image {width:100%; aspect-ratio:342/318;}

    /* Layout image */
    .popup-type-image .bb-site-popup-content-image-bg {
        height:calc(639px - 2 * (var(--ep-close-size) + var(--ep-padding)));
    }
}