@keyframes overlay-open{
    from{
        opacity: 0;
    }
    to{
        opacity: 1;
    }
}
@keyframes overlay-close{
    from{
        opacity: 1;
    }
    to{
        opacity: 0;
    }
}

@keyframes popup-open{
    from{
        transform: translate(-50%,-100%);
        opacity: 0;
    }
    to{
        transform: translate(-50%,-50%);
        opacity: 1;
    }
}
@keyframes popup-close{
    from{
        transform: translate(-50%,-50%);
        opacity: 1;
    }
    to{
        transform: translate(-50%,-100%);
        opacity: 0;
    }
}
.no-scroll{
    overflow-y: hidden !important;
}

/* popup */

.popup-viewer{
    position: fixed;
    top:0;
    bottom:0;
    left:0;
    right:0;
    z-index: 1;
}
.popup-viewer-open{
    
    animation-name: overlay-open;    
    animation-duration: 0.4s;
    animation-direction: normal;
    animation-fill-mode:forwards;
}

.popup-viewer-close{
    animation-name: overlay-close;    
    animation-duration: 0.4s;  
    animation-direction:normal;
    animation-fill-mode:forwards;
}
.popup-viewer-overlay{
    background-color: rgba(0, 0, 0, 0.5);    
   
}
.popup-viewer-btn-close{
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}
.popup-viewer-btn-close span{
    padding: 1rem;
    align-self: center;
    line-height: 0.8rem;
    cursor: pointer;
    background: rgba(0,0,0, 0.2);
    border-radius: 100px;
    border: solid 1px white;
    color:white;
}
@media screen and (min-width:768px){
    .popup-viewer-btn-close{
        position:fixed;
        top:0.5rem;
        margin:0;
        right:0.5rem;
    }
    .popup-viewer-btn-close span{
        padding:0.4rem;
    }
}
.popup-viewer-card{
    position: fixed;
    top:50%;
    left:50%;
    transform: translate(-50%,-50%);
    height:50vh;
    width:50vw;
    max-width: 960px;
    max-height: 750px;
    min-width: 300px;
    min-height: 350px;
    background: black;
}
.popup-viewer-open .popup-viewer-card{
    animation-name: popup-open;    
    animation-duration: 0.4s;
    animation-direction: normal;
    animation-fill-mode:forwards;
}

.popup-viewer-close .popup-viewer-card{
    animation-name: popup-close;    
    
    animation-duration: 0.4s;
    animation-direction: normal;
    animation-fill-mode:forwards; 
}
/* viewer */
.popup-viewer a-scene {
    height: 100%;
    width: 100%;
}
#viewer{
    width:100%;
    height:100%;
    opacity: 0;
    transition: opacity 0.4s 0.2s;
    display:flex;
    align-items: center;
}
#viewer img, #viewer iframe{
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
}
#viewer iframe{
    width:100%;
    height:100%;
}
.popup-viewer-open #viewer{
    opacity: 1;
}
.popup-viewer-close #viewer{
    opacity: 0;
}
.a-enter-vr-button{
    display: none;
}