/**
 * Lightcase - jQuery Plugin
 * The smart and flexible Lightbox Plugin.
 *
 * @author		Cornel Boppart <cornel@bopp-art.com>
 * @copyright	Author
 *
 * @version		2.4.2 (24/11/2017)
 */

 @font-face {
    font-family: 'lightcase';
    src: url("fonts/icon_font.eot");
    src: url("fonts/icon_font.eot#iefix") format("embedded-opentype"), url("fonts/icon_font.woff") format("woff"), url("fonts/icon_font.ttf") format("truetype"), url("fonts/icon_font.svg#lightcase") format("svg");
    font-weight: normal;
    font-style: normal;
}

[class*='lightcase-icon-']:before {
    font-family: 'lightcase', sans-serif;
    font-style: normal;
    font-weight: normal;
    speak: none;
    display: inline-block;
    text-decoration: inherit;
    width: 1em;
    text-align: center;
    font-variant: normal;
    text-transform: none;
    line-height: 1em;
}

.lightcase-icon-play:before {
    content: '\e800';
    display: none;
}

.lightcase-icon-pause:before {
    content: '\e801';
}

.lightcase-icon-close:before {
    content: "\df";
}

.lightcase-icon-prev:before {
    content: '\e2';
    text-align: left;
}

.lightcase-icon-next:before {
    content: '\e1';
    text-align: right;
}

.lightcase-icon-spin:before {
    content: '\e805';
}

@-webkit-keyframes lightcase-spin {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(359deg);
        -moz-transform: rotate(359deg);
        -o-transform: rotate(359deg);
        transform: rotate(359deg);
    }
}

@-moz-keyframes lightcase-spin {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(359deg);
        -moz-transform: rotate(359deg);
        -o-transform: rotate(359deg);
        transform: rotate(359deg);
    }
}

@-o-keyframes lightcase-spin {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(359deg);
        -moz-transform: rotate(359deg);
        -o-transform: rotate(359deg);
        transform: rotate(359deg);
    }
}

@-ms-keyframes lightcase-spin {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(359deg);
        -moz-transform: rotate(359deg);
        -o-transform: rotate(359deg);
        transform: rotate(359deg);
    }
}

@keyframes lightcase-spin {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(359deg);
        -moz-transform: rotate(359deg);
        -o-transform: rotate(359deg);
        transform: rotate(359deg);
    }
}

/* ОСНОВНЫЕ ИСПРАВЛЕНИЯ */

#lightcase-case {
    display: none;
    position: fixed;
    z-index: 2002;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    font-family: arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

#lightcase-case[style*="margin-top"] {
    margin-top: 0 !important;
    margin-left: 0 !important;
}

#lightcase-content {
    position: relative;
    z-index: 1;
}

/* Фон для контента */
#lightcase-content .lightcase-contentInner {
    background-color: #fff !important;
}

/* Для изображений и видео - темный фон */
html[data-lc-type="image"] #lightcase-content,
html[data-lc-type="video"] #lightcase-content {
    background-color: #333 !important;
}

html[data-lc-type="image"] #lightcase-content .lightcase-contentInner,
html[data-lc-type="video"] #lightcase-content .lightcase-contentInner {
    background-color: #333 !important;
}

/* Само изображение должно быть светлым */
#lightcase-case img {
    background-color: #fff !important;
    display: block !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Overlay */
#lightcase-overlay {
    display: none;
    width: 100%;
    height: 100%;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.8) !important;
}

/* Навигация */
a[class*='lightcase-icon-'] {
    position: fixed;
    z-index: 9999;
    font-size: 48px;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: #fff !important;
    opacity: 0.8;
    transition: opacity 0.2s, color 0.2s;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

a[class*='lightcase-icon-']:hover {
    opacity: 1 !important;
    color: #FFBA4C !important;
    text-decoration: none;
}

a.lightcase-icon-close {
    top: 20px !important;
    right: 25px !important;
    font-size: 32px !important;
    width: 40px;
    height: 40px;
}

a.lightcase-icon-prev {
    left: 20px !important;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
}

a.lightcase-icon-next {
    right: 20px !important;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
}

/* Информация о последовательности */
#lightcase-sequenceInfo {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    z-index: 9999 !important;
    line-height: 1.4;
}

/* Название и подпись */
#lightcase-info {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    color: #fff !important;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
    z-index: 9999 !important;
}

#lightcase-title,
#lightcase-caption {
    margin: 0;
    padding: 0;
    line-height: 1.5;
    font-weight: normal;
}

#lightcase-title {
    font-size: 16px;
    color: #fff;
    margin-bottom: 5px;
}

#lightcase-caption {
    font-size: 14px;
    color: #ccc;
}

/* Loading */
#lightcase-loading {
    position: fixed;
    z-index: 9999;
    width: 1.123em;
    height: auto;
    font-size: 38px;
    line-height: 1;
    text-align: center;
    position: fixed;
    z-index: 2001;
    top: 50%;
    left: 50%;
    margin-top: -0.5em;
    margin-left: -0.5em;
    font-size: 32px;
    text-shadow: 0 0 15px #fff;
    animation: lightcase-spin 0.5s infinite linear;
    color: #fff;
}

/* Контроллы (соцсети и т.д.) */
.lightCaseControlls {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10000;
    pointer-events: none;
}

.lightCaseControlls:hover {
    opacity: 1;
}

.lightCaseControlls .top {
    position: absolute;
    top: 20px;
    left: 20px;
    pointer-events: auto;
}

.lightCaseControlls .bottom {
    position: absolute;
    bottom: 20px;
    left: 20px;
    pointer-events: auto;
}

.viewbox__share,
.viewbox__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7) !important;
    color: #fff !important;
    border-radius: 50%;
    margin-right: 10px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 18px;
    text-decoration: none !important;
}

.viewbox__action {
    width: auto;
    border-radius: 18px;
    padding: 0 12px;
}

.viewbox__share:hover,
.viewbox__action:hover {
    background: #000 !important;
    color: #FFBA4C !important;
}

.viewbox__action .viewbox__action-side {
    margin-left: 8px;
    font-size: 14px;
}

/* Для мобильных устройств */
@media screen and (max-width: 640px) {
    #lightcase-case {
        width: 100% !important;
        height: 100% !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    #lightcase-case .lightcase-contentInner {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100% !important;
    }
    
    a.lightcase-icon-close {
        top: 10px !important;
        right: 15px !important;
        font-size: 28px !important;
    }
    
    a.lightcase-icon-prev,
    a.lightcase-icon-next {
        bottom: 20px !important;
        top: auto !important;
        transform: none !important;
        font-size: 36px !important;
        width: 50px;
        height: 50px;
    }
    
    a.lightcase-icon-prev {
        left: 20px !important;
    }
    
    a.lightcase-icon-next {
        right: 20px !important;
    }
    
    #lightcase-sequenceInfo {
        bottom: 80px !important;
    }
    
    #lightcase-info {
        bottom: 80px !important;
    }
    
    .lightCaseControlls .top {
        top: 60px;
    }
    
    .lightCaseControlls .bottom {
        bottom: 80px;
    }
}