/*!
	HesGallery v1.4.12
	Copyright (c) 2018-2019 Artur Medrygal <medrygal.artur@gmail.com>
	Product under MIT licence
*/

#hgallery {
    display: block;
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.3s;
    z-index: 99999;
}

.hg-disable-scrolling {
    overflow: hidden !important;
}

#hg-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

#hg-bg::after {
    content: '';
    position: absolute;
    display: block;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xOSA2LjQxTDE3LjU5IDUgMTIgMTAuNTkgNi40MSA1IDUgNi40MSAxMC41OSAxMiA1IDE3LjU5IDYuNDEgMTkgMTIgMTMuNDEgMTcuNTkgMTkgMTkgMTcuNTkgMTMuNDEgMTJ6Ii8+CiAgICA8cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+Cjwvc3ZnPg==);
    background-position: center;
    background-size: contain;
    cursor: pointer;
    opacity: 0.8;
}

#hg-bg::after:hover {
    background-color: white;
}

#hgallery.open {
    visibility: visible !important;
    opacity: 1;
}

#hg-pic-cont {
    max-width: calc(70% - 40px);
    max-height: 90vh;
    cursor: default;
    z-index: 12;
    position: relative;
    background-color: white;
    transition: transform 0.3s;
    transform: scale(1);
}

#hg-pic-cont.hg-transition {
    transform: scale(0.1);
}

#hg-subtext {
    color: #ddd;
    font-size: 14px;
    position: absolute;
    display: block;
    left: 5px;
    top: calc(100% + 6px);
}

#hg-howmany {
    color: #aaa;
    font-size: 14px;
    position: absolute;
    display: block;
    right: 5px;
    bottom: -20px;
}

#hg-pic {
    width: auto;
    height: auto;
    min-height: 100px;
    min-width: 100px;
    max-width: 100%;
    max-height: 90vh;
    box-sizing: border-box;
    display: block;
    cursor: default;
    object-fit: contain;
    margin: 0;
    /*    border-radius: 5px;*/
}

#hg-pic:hover {
    transform: none;
    box-shadow: none;
}

#hgallery button {
    position: absolute;
    display: block;
    margin: auto 0;
    width: 60px;
    height: 60px;
    z-index: 11;
    cursor: pointer;
    background-color: transparent;
    border: 0;
    outline: 0;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    visibility: hidden;
}

#hgallery button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#hgallery.open button {
    visibility: visible;
    opacity: 0.7;
}

#hgallery button:hover {
    opacity: 1;
}

#hgallery button#hg-prev {
    left: 10px;
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}

#hgallery button#hg-prev:active {
    left: 7px;
}

#hgallery button#hg-next {
    right: 10px;
}

#hgallery button#hg-next:active {
    right: 7px;
}

#hgallery #hg-prev-onpic,
#hgallery #hg-next-onpic {
    position: absolute;
    top: 0;
    left: 0;
    width: 34%;
    height: 100%;
    cursor: pointer;
}

#hgallery #hg-next-onpic {
    right: 0;
    left: auto;
    width: 66%;
}

.hg-unvisible {
    opacity: 0 !important;
    visibility: hidden;
}

@media (max-width: 1100px) {
    #hg-pic-cont {
        max-width: calc(100% - 40px);
    }
}