/* popup */
.mgGallery {
    height: 100%;
}

.mgGallery .slider {
    height: 100%;
}

.mgGallery .slider .slide {
    text-align: center;
    /*padding: 40px;*/
    position: relative;
    box-sizing: border-box;
    float: left;
    width: 100%;
    height: 100%;
}

.mgPopupBody .mgGallery .slider .slide { text-align: center; }

.imgpopup {
    text-align: center;
    height: 100%;
}

.mgGallery .slider .slide img,
.imgpopup img {
    max-width: 100%;
    max-height: 100%;
    vertical-align: middle;
}

.mgGallery .slider .slide span,
.imgpopup span {
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}


.mgGallery .slider .slide.fade {
    position: absolute;
    top: 0;
    left: 0;
    /* z-index: -1; */
}

.mgGallery .slider .slide h3 {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    background-color: rgba(255,255,255,0.5);
    line-height: 60px;
    font-family: sans-serif;
}

/* *** */

/* !!! ako ima frame w .mgGallery ne e neobhodimo da ima position: relative; overflow: hidden; */
.mgGallery .frame {
    position: relative;
    overflow: hidden;
    height: 100%;
}

/* controls */

.mgGallery .arrow {
    position: absolute;
    top: 50%;
    padding: 20px;
    font-size: 160px;
    line-height: 160px;
    width: 80px;
    text-align: center;
    text-decoration: none;
    margin-top: -120px;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);

    color: #FFF;
    opacity: 0.8;

    /* disable text selection highlighting */
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Chrome/Safari/Opera */
    -khtml-user-select: none;    /* Konqueror */
    -moz-user-select: none;      /* Firefox */
    -ms-user-select: none;       /* Internet Explorer/Edge */
    user-select: none;           /* Non-prefixed version, currently
                                  not supported by any browser */
}

.mgGallery .arrow:hover {
    /*background-color: rgba(0,0,0,0.2);*/
    /*color: #FFF;*/
    opacity: 1;
}

/*.mgPopupBody .mgGallery .arrow {
    background-color: rgba(255,255,255,0.3);
    color: #000;
}

.mgPopupBody .mgGallery .arrow:hover {
    background-color: rgba(255,255,255,0.6);
}*/

.mgGallery .arrow.left {
    left: 0;
}

.mgGallery .arrow.right {
    right: 0;
}

/*.mgGallery:hover a.arrow.left {
    opacity: 1;
    left: 0;
}

.mgGallery:hover a.arrow.right {
    opacity: 1;
    right: 0;
}*/

/* *** */

/* thumbs */
.mgGallery .thumbs a {
    display: inline-block;
    padding: 4px;
    border: 1px solid #EEE;
    margin-right: 4px;
}

.mgGallery .thumbs a.current,
.mgGallery .thumbs a:hover {
    border-color: #0084d9;
}

.mgGallery .thumbs a img {
    max-height: 80px;
}


/* dots */
.mgGallery .dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
}

/*.mgGallery .items .current {
    background-color: #f58345;
    border: 1px solid #f58345;
}*/

.mgGallery .dots a {
    display: inline-block;
    padding: 6px;
    margin: 0 6px;
    border: 2px solid #EEE;
    border-radius: 10px;
    background-color: #58595b;
}

.mgGallery .dots a.current,
.mgGallery .dots a:hover {
    background-color: #f58345;
}

.mgGallery .dots a img {
    max-height: 80px;
}

/* Mobile */
@media all and (max-width: 640px) {
    .mgGallery > .items { display: none; }
}

/* Desktop */
@media all and (min-width: 641px) {
    .mgGallery > .items a {
        display: inline-block;
        /*border: 1px solid #CCC;*/
        /*margin: 10px;*/
        /*padding: 10px 20px;*/
        margin: 5px;
        padding: 2px 4px;
        text-decoration: none;
        color: #000;
        background-color: #EEE;
        font-size: 14px;
        font-weight: bold;
    }

    .mgGallery > .items {
        text-align: center;
        margin: 5px;
    }

    .mgGallery > .items a:hover,
    .mgGallery > .items a.current {
        background-color: #0b4887;
       /* border-color: #0b4887;*/
       color: #FFF;
    }
}

