#galleryOverlay {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 100000;
    background-color: #222;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: hidden;
    display: none;

    -moz-transition: opacity 0.5s ease;
    -webkit-transition: opacity 0.5s ease;
    transition: opacity 0.5s ease;
}

/* This class will trigger the animation */
#galleryOverlay.visible {
    opacity: 1;
}

#gallerySlider {
    height: 100%;

    left: 0;
    top: 0;

    width: 100%;
    white-space: nowrap;
    position: absolute;

    -moz-transition: left 0.4s ease;
    -webkit-transition: left 0.4s ease;
    transition: left 0.4s ease;
}

#gallerySlider .placeholder {
    background: url("/img/preloader.gif") no-repeat center center;
    height: 100%;
    line-height: 1px;
    text-align: center;
    width: 100%;
    display: inline-block;
}

/* The before element moves the
 * image halfway from the top */

#gallerySlider .placeholder:before {
    content: "";
    display: inline-block;
    height: 50%;
    width: 1px;
    margin-right: -1px;
}

#gallerySlider .placeholder img {
    display: inline-block;
    max-height: 100%;
    max-width: 100%;
    vertical-align: middle;
}

#gallerySlider.rightSpring {
    -moz-animation: rightSpring 0.3s;
    -webkit-animation: rightSpring 0.3s;
}

#gallerySlider.leftSpring {
    -moz-animation: leftSpring 0.3s;
    -webkit-animation: leftSpring 0.3s;
}

/* Firefox Keyframe Animations */

@-moz-keyframes rightSpring {
    0% {
        margin-left: 0px;
    }
    50% {
        margin-left: -30px;
    }
    100% {
        margin-left: 0px;
    }
}

@-moz-keyframes leftSpring {
    0% {
        margin-left: 0px;
    }
    50% {
        margin-left: 30px;
    }
    100% {
        margin-left: 0px;
    }
}

/* Safari and Chrome Keyframe Animations */

@-webkit-keyframes rightSpring {
    0% {
        margin-left: 0px;
    }
    50% {
        margin-left: -30px;
    }
    100% {
        margin-left: 0px;
    }
}

@-webkit-keyframes leftSpring {
    0% {
        margin-left: 0px;
    }
    50% {
        margin-left: 30px;
    }
    100% {
        margin-left: 0px;
    }
}

/* Arrows */

#prevArrow, #nextArrow, #closeSlider, #favorite {
    border: none;
    text-decoration: none;
    background: url('/img/arrows.png') no-repeat;
    opacity: 0.5;
    cursor: pointer;
    position: absolute;
    width: 43px;
    height: 58px;

    top: 50%;
    margin-top: -29px;

    -moz-transition: opacity 0.2s ease;
    -webkit-transition: opacity 0.2s ease;
    transition: opacity 0.2s ease;
    z-index: 100003;
}

#prevArrow:hover, #nextArrow:hover, #closeSlider:hover, #favorite:hover {
    opacity: 1;
}

#prevArrow {
    background-position: left top;
    left: 40px;
}

#nextArrow {
    background-position: right top;
    right: 40px;
}

#closeSlider {
    background: url('/img/gallery-close.png') 50% 50% no-repeat rgba(0, 0, 0, 0.5);
    top: 40px;
    right: 10px;
    height: 45px;
    border-radius: 6px;
}
#favorite {
    background: rgba(0, 0, 0, 0.5);
    top: 40px;
    right:60px;
    height:20px;
    border-radius: 6px;
    color:#FFF;
    text-align: center;
    padding: 12px 2px;
    font-size: 9px;
    line-height: 16px;
}
#favorite span {
    position: relative;
    z-index: 1;
}
#favorite:before {
    font-family: 'imovendo';
    content: "\e638";
    position: absolute;
    font-weight: normal;
    speak: none;
    font-style: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    font-size: 36px;
    left: 6px;
    line-height: 21px;
}

#favorite.active:before {
    content: "\e639";
    color:#C8358E;
}
#favorite.active,
#favorite:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.80);
}
#favorite:hover:before,
#favorite:not(.active):hover {
    color:#C8358E;
}

.gallery-controls {
    position: absolute;
    top: 96px;
    left: 88px;
    right: 88px;
    z-index: 100001;
    display: none;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 140px);
    overflow: visible;
    padding: 10px;
    border-radius: 8px;
    background: transparent;
    backdrop-filter: none;
    pointer-events: none;
    --gallery-control-width: 124px;
    --gallery-controls-stack-offset-y: -42px;
}

.gallery-controls.visible {
    display: block;
}

.gallery-control-btn {
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(16, 16, 16, 0.88);
    color: #fff;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: var(--btn-radius, 4px);
    margin: 0 8px 8px 0;
}

.gallery-control-btn-transparent {
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.46);
}

.gallery-control-btn:hover,
.gallery-control-btn:focus {
    background: rgba(38, 38, 38, 0.94);
}

.gallery-controls-stack {
    width: 100%;
    transform: translateY(var(--gallery-controls-stack-offset-y));
}

.gallery-label-lanes {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.gallery-label-buttons {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 5px;
    width: var(--gallery-control-width);
    pointer-events: auto;
}

.gallery-label-btn {
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 0 5px;
    font-size: 11px;
    line-height: 1.2;
    border-radius: var(--btn-radius, 4px);
    margin: 0;
    min-height: 17px;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-label-btn.active {
    border-color: var(--btn-success, #1ed400);
    background: rgba(30, 212, 0, 0.35);
    color: var(--btn-success-font, #fff);
}

.gallery-custom-label {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    margin-top: 6px;
    width: var(--gallery-control-width);
    margin-left: auto;
    pointer-events: auto;
}

.gallery-custom-label input {
    width: 100%;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.90);
    color: var(--btn-font, #444);
    border-radius: var(--btn-radius, 4px);
    padding: 0 5px;
    font-size: 10px;
    text-align: center;
}

.gallery-controls .gallery-custom-label-input {
    flex: 0 0 auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
}

.gallery-custom-label input::placeholder {
    color: #8c8c8c;
    opacity: 1;
    font-size: 12px;
    text-align: center;
}

.gallery-custom-label .gallery-control-btn-transparent {
    width: 100%;
    height: 26px;
    min-height: 26px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.gallery-controls .gallery-save-custom-label {
    flex: 0 0 auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
}

.gallery-controls .gallery-hide-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: var(--gallery-control-width);
    margin: 6px 0 8px auto;
    pointer-events: auto;
}

.gallery-controls .gallery-hide-toggle-label {
    color: #fff;
    font-size: 14px;
    line-height: 1;
}

.gallery-controls .gallery-hide-toggle .gallery-hide-checkbox {
    -webkit-appearance: auto;
    appearance: auto;
    position: static;
    display: inline-block;
    flex: 0 0 16px;
    width: 16px;
    min-width: 16px;
    max-width: 16px;
    height: 16px;
    min-height: 16px;
    max-height: 16px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    accent-color: var(--btn-success, #1ed400);
    vertical-align: middle;
}

.gallery-controls .gallery-hide-toggle:before,
.gallery-controls .gallery-hide-toggle:after,
.gallery-controls .gallery-hide-toggle-label:before,
.gallery-controls .gallery-hide-toggle-label:after {
    content: none;
    display: none;
}

.gallery-controls .gallery-hide-toggle .iCheck-helper {
    display: none;
}

/*  PHONE VERTICAL */
@media (max-width:480px) {
    #favorite {
    }
    .gallery-controls {
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        max-height: none;
        border-radius: 0;
        padding: 10px 12px;
        background: transparent;
        pointer-events: auto;
    }
    .gallery-label-btn {
        font-size: 13px;
        max-width: 100%;
        min-height: 19px;
    }
    .gallery-label-lanes {
        display: block;
    }

    .gallery-label-buttons {
        width: 100%;
    }
    .gallery-custom-label {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
        margin-left: 0;
    }
    .gallery-custom-label input {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .gallery-controls .gallery-custom-label-input {
        flex: 0 0 auto;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }

    .gallery-custom-label .gallery-control-btn-transparent {
        min-width: 100%;
        padding: 0 5px;
    }

    .gallery-controls .gallery-save-custom-label {
        flex: 0 0 auto;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }

    .gallery-controls .gallery-hide-toggle {
        width: 100%;
        margin: 6px 0 0 0;
    }
}
