/*
 * Overlay Styles
 */

@close_button_size: 36px;

html {
    &.blur {
        .siteWrapper {
            filter: blur(5px);
        }
    }

    &.noScroll {
        overflow: hidden;
    }
}

.overlayBoxOuter {
    position: fixed;
    z-index:9100;
    top: 0;
    width: 100%;
    min-height: 100%;
    height: 100%;
    background: #090909;
    background: rgba(0,0,0,0.5);
    overflow: hidden;

    .ps-container {
        position: relative;

        > .ps-scrollbar-y-rail {
            opacity: 1;
        }
    }
}

.overlayBox {
    position: absolute;
    opacity: 0;
    display: block;
    max-width: 100%;

    .overlayContent {
        background: #fff;
        margin-top: @close_button_size;
        max-height: ~'calc(100% - @{close_button_size})';
        position: relative;
        height: 100%;
    }

    &.hasLink {

        .overlayImage {
            position: relative;
        }
    }

    .overlayImage {

        img {
            max-width: 100%;
            height: auto;
            display: block;
        }
    }

    .overlayVideo {
        position: relative;

        iframe,
        video {
            position: absolute;
            top: 0;
            left: 0;
            display: block;
            background-color: @dark_color;
        }
    }

    &.overlayFullscreen {

        .overlayAjax {
            height: 100% !important;

            iframe {
                width: 100%;
                height: 100%;
            }
        }

        .overlayContent, .overlayVideo {
            height: 100% !important;
            padding: 0 !important;
        }
    }

    .overlayAjax {
        overflow-y: auto;
        max-height: 100%;
    }
}

.overlayContentLoading, .overlayLoading {

    &:before {
        position: absolute;
        top: 50%;
        left: 50%;
        .fa(f1ce, #fff);
        .rems(30);
        transform: translate(-50%, -50%);
        animation: overlay-spinner 2s infinite linear;
    }
}

@keyframes overlay-spinner {

  0% {
    transform: translate(-50%, -50%) rotate(0);
  }
  100% {
    transform: translate(-50%, -50%) rotate(350deg);
  }

}

.noScroll {
    overflow: hidden;
    position: relative;
}

.overlayCloseButton {
    z-index: 9200;
    text-align: right;
    position: absolute;
    top: 0;
    right: 0;

    a {
        background: @highlight_color;
        color: #fff;
        font-weight: bold;
        display: inline-block;
        cursor: pointer;
        padding: 5px 10px;
        font-family: @primary_font;
        font-size: 14px;
        text-transform: uppercase;
        z-index: 9200;
        outline: 0;
        text-decoration: none;
    }
}

.overlayAjax {
    padding: 20px;
}

.overlayBoxTitle {
    position: relative;
    bottom: 0;
    line-height: 30px;
    font-size: 18px;
    width: 100%;
    text-align: center;
    left: 0;
    display: block;
    color: #fff;
}

.overlayBoxLink {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.galleryPrev, .galleryNext {
    .rems(30);
    line-height: 30px;
    position: absolute;
    top: 50%;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    color: @highlight_color;
    cursor: pointer;
    width: 30px;
    background: #fff;
    border-radius: 100%;

    &:focus {
        border: none;
        outline: none;
    }

    &.arrowInactive {
        display: none;
    }
}

.galleryPrev {
    left: -35px;

    @media @mobile {
        left: 5px;
    }

    .fa-angle-left {
       margin: 0 4px 0 0;
    }
}

.galleryNext {
    right: -35px;

    @media @mobile {
        right: 5px;
    }

    .fa-angle-right {
        margin: 0 0 0 4px;
    }
}
