/* popup */
.mgGallery,
.mgGallery .slider {
    height: 100%;
    white-space: nowrap;
    background-color: var(--d-gray);
}

.mgGallery .slider .slide {
    text-align: center;
    position: relative;
    box-sizing: border-box;
    float: left;
    width: 100%;
    height: 100%;

    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}

.fullscreen .mgGallery .slider .slide { text-align: center; }

.mgGallery .slider .slide img {
    max-width: 100vw;
    max-height: 100vh;
    vertical-align: middle;
}

.mgGallery .slider .slide span {
    display: inline-block;
    padding: 0;
    margin: 0;
    width: 0px;
    height: 100vh;
    vertical-align: middle;
}

.mgGallery .slider .slide.fade {
    position: absolute;
    top: 0;
    left: 0;
}

/* *** */

/* !!! ako ima frame w .mgGallery ne e neobhodimo da ima position: relative; overflow: hidden; */
.mgGallery .frame {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.mgGallery .items { display: none; }

.mgGallery a.close {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    cursor: pointer;

    background-color: rgba(0,0,0,0.05);
}

.mgGallery a.close hr {
    position: absolute;
    top: 19px;
    left: 20px;
    border: none;
    width: 24px;
    height: 2px;
    background-color: #999;

    pointer-events: none;
}

.mgGallery a.close hr:first-child { transform: rotate(45deg); }

.mgGallery a.close hr:last-child { transform: rotate(-45deg); }

.mgGallery a.close:hover hr { background-color: #333; }

/* controls */
/*@media all and (max-width: 960px) {
    .mgGallery a.left,
    .mgGallery a.right { display: none; }
}*/

.mgGallery a.left,
.mgGallery a.right {
    position: absolute;
    top: 10%;
    width: 10%;
    height: 80%;
    cursor: pointer;
}

.mgGallery a.left,
.mgGallery a.left span { left: 0; }

.mgGallery a.right,
.mgGallery a.right span { right: 0; }

.mgGallery a.left span,
.mgGallery a.right span {
    position: absolute;
    top: 50%;
    width: 60px;
    height: 60px;
    margin-top: -30px;
    cursor: pointer;

    background-color: rgba(0,0,0,0.05);
}

.mgGallery a.left hr,
.mgGallery a.right hr {
    margin: 0;
    position: absolute;
    width: 12px;
    height: 2px;
    background-color: #999;
    border: none;

    pointer-events: none;
}

.mgGallery a.left hr { left: 21px; }

.mgGallery a.right hr { left: 26px; }

.mgGallery a.left:hover hr,
.mgGallery a.right:hover hr { background-color: #333; }

.mgGallery a.left hr:first-child,
.mgGallery a.right hr:last-child { transform: rotate(-45deg); }

.mgGallery a.left hr:last-child,
.mgGallery a.right hr:first-child { transform: rotate(45deg); }

.mgGallery a.left hr:first-child,
.mgGallery a.right hr:first-child { top: 24px; }

.mgGallery a.left hr:last-child,
.mgGallery a.right hr:last-child { top: 32px; }
/* *** */
