#x_gallery_container_block {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    left: 0;
    top: 0;    
}

#x_gallery_bg_block {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;    
    transition: all 0.3s ease-out;       
}

#x_gallery_bg_block.active {
    backdrop-filter: blur(9px); 
    background-color: rgba(255, 255, 255, .5);
}

#x_gallery_image_block {
    transition: all .3s cubic-bezier(0.68, -0.55, 0.27, 1.55);     
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 0;
    height: 0;    
    
    background-color: #fff;
    box-shadow: 3px 5px 50px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

#x_gallery_image_block.active {
    padding: 20px;
}

#x_gallery_image {
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    border-radius: 5px;
    transition: all .3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#x_gallery_image.off {
    opacity: 0;
}

#x_gallery_close_image {
    color: #fff;
    background-color: #000;
    display: inline-block;
    font-size: 16px;
    line-height: 16px;
    border-radius: 50%;
    padding: 2px 4px 3px;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, .4);
    cursor: pointer;
    position: absolute;
    top: -5px;
    right: -5px;
    opacity: 0;
    /*transition: all 1s cubic-bezier(0.68, -0.55, 0.27, 1.55);*/
}

#x_gallery_close_image.active {
    opacity: 1;    
}

#x_gallery_previous_image, #x_gallery_next_image {
    font-size: 30px;
    line-height: 25px;    
    display: inline-block;
    position: absolute;
    top: 45%;    
    background-color: #000;
    color: #fff;
    border-radius: 10px;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, .4);
    cursor: pointer;    
}

#x_gallery_previous_image {
    left: -20px;
    padding: 0 3px 2px 2px;
}
#x_gallery_next_image {
    right: -20px;
    padding: 0 2px 2px 3px;
}

#x_gallery_previous_image.off, #x_gallery_next_image.off {
    display: none;
}