/* Popup core */

body.popup-show .popup-overlay {
    opacity:1;
    visibility:visible;
}

.popup-modal {
    position:fixed;
    top:50%;
    left:50%;
    width:50%;
    height:auto;
    visibility:hidden;
    transform:translate(-50%,-50%);
    z-index:100000;
}

.popup-show {
    visibility:visible;
}

.popup-overlay {
    display:flex;
    justify-content:center;
    align-items:center;
    position:fixed;
    width:100%;
    height:100%;
    visibility:hidden;
    top:0;
    left:0;
    z-index:99000;
    opacity:0;
    transition:all .3s;
}


.popup-close {
    position:absolute;
    top:10px;
    right:10px;
    width:40px;
    height:40px;
    border:2px solid #fff;
    border-radius:50%;
    background:transparent;
    color:#fff;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0;
    z-index:2000;
}

.popup-close:hover { 
  background-color: #f0f0f0; 
  order: #000; 
  color: #000; 
}

.popup-close:focus { 
  outline: 2px solid #005fcc; 
  outline-offset: 2px; 
}

.global-popup {
    overflow:hidden;
    box-shadow:rgba(99,99,99,.2) 0 2px 8px 0;
}

.global-popup--note {
    width:auto!important;
    max-width:600px;
    min-width:400px;
    min-height:400px;
    display:flex;
    flex-direction:column;
}

.global-popup--note .popup-content-wrap {
    display:flex;
    flex-direction:column;
    flex:1;
}

.global-popup--note .popup-content-wrap .popup-content {
    flex:1;
}

.global-popup--note button.popup-close {
    border:2px solid #000;
    color:#000;
}

.global-popup--note .popup-content { 
    padding:40px;
    box-sizing:border-box;
}

.global-popup--image.is--text-inside {
    /* max-width:40vw; */
    max-width:530px;
}

.global-popup--image.is--text-inside .popup-content-wrap {
    display:flex;
    flex-direction:column;
    position:relative;
}

.global-popup--image.is--text-inside .popup-content-wrap .popup-content {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    padding:40px;
    z-index:20;
    box-sizing:border-box;
}

.global-popup--image.is--text-inside .popup-content-wrap .popup-image {
    z-index:10;
}

.global-popup--image.is--media-text .popup-content-wrap { 
    width: 100%;
    display:flex;
    flex-direction:row-reverse;
}

.global-popup--image.is--media-text.media-is--left .popup-content-wrap {
    flex-direction:row;
}

.global-popup--image.is--media-text.media-is--right .popup-content-wrap {
    flex-direction:row-reverse;
}

.global-popup--image.is--media-text .popup-content-wrap .popup-image,
.global-popup--image.is--media-text .popup-content-wrap .popup-content {
    width:50%;
}

.global-popup--image.is--media-text .popup-content-wrap .popup-content {
    padding: 40px 24px;
}

.popup-content {
    display:flex;
    flex-direction:column;
}

.popup-image { 
    max-height:80vh;
    overflow: hidden;
}

.popup-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
}

.popup-content.vertical_align-top {
    justify-content:flex-start;
}

.popup-content.horizontal_align-left {
    align-items:flex-start;
}

.popup-content.vertical_align-center {
    justify-content:center;
}

.popup-content.horizontal_align-center {
    align-items:center;
}

.popup-content.vertical_align-bottom {
    justify-content:flex-end;
}

.popup-content.horizontal_align-righ {
    align-items:flex-end;
}

.popup-content .is-content-justification-left {
    align-self: flex-start;
}

.popup-content .is-content-justification-center {
    align-self: center;
}

.popup-content .is-content-justification-right {
    align-self: flex-end;
}


/* Effect 1: Fade in and scale up */
.popup-effect-1 .popup-content-wrap {
	-webkit-transform: scale(0.7);
	-moz-transform: scale(0.7);
	-ms-transform: scale(0.7);
	transform: scale(0.7);
	opacity: 0;
	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;
}

.popup-show.popup-effect-1 .popup-content-wrap {
	-webkit-transform: scale(1);
	-moz-transform: scale(1);
	-ms-transform: scale(1);
	transform: scale(1);
	opacity: 1;
}

/* Effect 11: Super scaled */
.popup-effect-11 .popup-content-wrap {
	-webkit-transform: scale(2);
	-moz-transform: scale(2);
	-ms-transform: scale(2);
	transform: scale(2);
	opacity: 0;
	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;
}

.popup-show.popup-effect-11 .popup-content-wrap {
	-webkit-transform: scale(1);
	-moz-transform: scale(1);
	-ms-transform: scale(1);
	transform: scale(1);
	opacity: 1;
}

@media (max-width: 1024px) {

}

@media (max-width: 600px) {
    
    .global-popup {
        width:90%!important;
        height:auto!important;
        max-height:80vh; 
    }

    .global-popup--note {
        min-width:unset;
        min-height:unset;   
    }

    .global-popup--image.is--media-text .popup-content-wrap {
        flex-direction: column;
    }

    .global-popup--image.is--media-text .popup-content-wrap .popup-image,
    .global-popup--image.is--media-text .popup-content-wrap .popup-content {
        width:100%; 
    }

    .global-popup--image.is--media-text .popup-content-wrap .popup-content {
        padding: 0;
    }

}