.lb-loader,
.lightbox {
    text-align: center;
    line-height: 0;
}

.lb-dataContainer::after,
.lb-outerContainer::after {
    content: "";
    clear: both;
}

html.lb-disable-scrolling {
    /*overflow: hidden !important;*/
    width: 100% !important;
    height: 100% !important;
}

.lightboxOverlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
    display: none;
    background-color: #fff;
    filter: alpha(Opacity=100);
    opacity: 1;
}

.lightbox {
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 10000;
    font-weight: 400;
}

.lightbox .lb-image {
    display: block;
    height: auto;
    max-width: inherit;
    max-height: none;
    border: 0 solid #fff;
    border-radius: 3px;
}

.lightbox a img {
    border: none;
}

.lb-outerContainer {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto;
    border-radius: 4px;
    background-color: #fff;
}

.lb-loader,
.lb-nav {
    position: absolute;
    left: 0;
}

.lb-outerContainer::after {
    display: table;
}

.lb-loader {
    top: 43%;
    width: 100%;
    height: 25%;
}

.lb-cancel {
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto;
    background: url(/assets/new/loading.gif) no-repeat;
}

.lb-nav {
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.lb-container > .nav {
    left: 0;
}

.lb-nav a {
    outline: 0;
    background-image: url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==);
}

.lb-next,
.lb-prev {
    display: block;
    height: 100%;
    cursor: pointer;
}

.lb-nav a.lb-prev {
    left: 0;
    float: left;
    width: 34%;
    background: url(../images/prev.png) left 48% no-repeat;
    filter: alpha(Opacity=0);
    opacity: 0;
    transition: opacity 0.6s;
}

.lb-nav a.lb-prev:hover {
    filter: alpha(Opacity=100);
    opacity: 1;
}

.lb-nav a.lb-next {
    right: 0;
    float: right;
    width: 64%;
    background: url(../images/next.png) right 48% no-repeat;
    filter: alpha(Opacity=0);
    opacity: 0;
    transition: opacity 0.6s;
}

.lb-nav a.lb-next:hover {
    filter: alpha(Opacity=100);
    opacity: 1;
}

.lb-dataContainer {
    width: 100%;
    margin: 0 auto;
    padding-top: 5px;
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
}

.lb-dataContainer::after {
    display: table;
}

.lb-data {
    padding: 0 4px;
    color: white !important;
}

.lb-data .lb-details {
    float: left;
    width: 85%;
    text-align: left;
    line-height: 1.1em;
}

.lb-data .lb-caption {
    display: block;
    margin-top: 9px;
    color: #666;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    opacity: 1;
}

.lb-data .lb-caption a {
    color: #4ae;
}

.lb-data .lb-number {
    display: none !important;
    clear: left;
    padding-bottom: 1em;
    color: #999;
    font-size: 12px;
}

.lb-data .lb-close {
    display: block;
    float: right;
    width: 30px;
    height: 30px;
    background: url(../images/close.png) top right no-repeat;
    text-align: right;
    outline: 0;
    filter: alpha(Opacity=70);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lb-data .lb-close:hover {
    cursor: pointer;
    filter: alpha(Opacity=100);
    opacity: 1;
}

/* Кнопки стрілок */

.lb-nav a.lb-next,
.lb-nav a.lb-prev {
    position: relative;
    display: block;
    width: 44px;
    height: 44px;
    border: 1px solid #999;
    border-radius: 50%;
    background: none;
    opacity: 1;
}

/* Малювання стрілок */

.lb-nav a.lb-next::before,
.lb-nav a.lb-prev::before,
.lb-nav a.lb-next::after,
.lb-nav a.lb-prev::after {
    content: "";
    position: absolute;
    left: 16px;
    width: 11px;
    height: 1px;
    background: #999;
}

.lb-nav a.lb-next::before {
    top: 17px;
    transform: rotate(40deg);
}

.lb-nav a.lb-next::after {
    top: 24px;
    transform: rotate(-40deg);
}

.lb-nav a.lb-prev::before {
    top: 17px;
    transform: rotate(-40deg);
}

.lb-nav a.lb-prev::after {
    top: 24px;
    transform: rotate(40deg);
}

/* Кнопка закриття */

.lb-data .lb-close {
    width: 44px;
    height: 44px;
    background: none;
}

.lb-data .lb-close::before,
.lb-data .lb-close::after {
    content: "";
    position: absolute;
    top: 17px;
    left: 16px;
    width: 20px;
    height: 2px;
    background: #666;
    transform: rotate(45deg);
}

.lb-data .lb-close::after {
    transform: rotate(-45deg);
}

.lb-closeContainer {
    position: relative;
    float: right;
    width: 44px;
    z-index: 999;
}

/* ==================================================
   LIGHTBOX — ЦЕНТР ЕКРАНА БЕЗ СКРОЛУ
   ================================================== */

html.lb-disable-scrolling,
html.lb-disable-scrolling body {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    /*overflow: hidden !important;*/
}

/* Білий фон на весь екран */

.lightboxOverlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
}

/* Центрування всього lightbox */

.lightbox {
    position: fixed !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 0 !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 15px 30px !important;

    overflow: visible !important;
    box-sizing: border-box !important;
    transform: translateY(-50%) !important;
}

/*
 * Не встановлюємо width/height через !important,
 * оскільки ними керує JavaScript Lightbox.
 */

.lb-outerContainer {
    position: relative !important;

    max-width: calc(100vw - 180px) !important;
    max-height: calc(100vh - 100px) !important;
    max-height: calc(100dvh - 100px) !important;

    margin-right: auto !important;
    margin-left: auto !important;

    overflow: visible !important;
    box-sizing: border-box !important;
}

/* Зображення */

.lightbox .lb-image {
    display: block !important;

    max-width: calc(100vw - 180px) !important;
    max-height: calc(100vh - 130px) !important;
    max-height: calc(100dvh - 130px) !important;

    margin: 0 auto !important;

    object-fit: contain;
    box-sizing: border-box !important;
}

/* Підпис */

.lb-dataContainer {
        position: relative;
    max-width: calc(100vw - 180px) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    box-sizing: border-box !important;
}

/* ==================================================
   СТРІЛКИ НА ОДНАКОВІЙ ВІДСТАНІ ВІД ФОТО
   ================================================== */

/*
 * Контейнер навігації повинен мати ті самі розміри,
 * що й поточне зображення.
 */
.lb-container {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
}

/* Навігаційний шар точно поверх фото */
.lb-nav {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: 100% !important;
    height: 100% !important;

    pointer-events: none !important;
    z-index: 10 !important;
}

/* Загальні стилі стрілок */
.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    position: fixed !important;
top: 50% !important;
    width: 44px !important;
    height: 44px !important;

    margin: 0 !important;
    float: none !important;

    opacity: 1 !important;

    pointer-events: auto !important;
    z-index: 10002 !important;

    border: 1px solid #999 !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
}

/*
 * Десктоп:
 * 20px — відстань від краю фото до кнопки.
 * 44px — ширина самої кнопки.
 * Разом зміщення становить 64px.
 */
/*.lb-nav a.lb-prev {
    left: -64px !important;
    right: auto !important;
}

.lb-nav a.lb-next {
    right: -64px !important;
    left: auto !important;
}*/

/* Кнопка закриття */

.lb-closeContainer {
    position: absolute;
    bottom: 0px !important;
    right: 0px !important;

    float: none !important;

    width: 44px !important;
    height: 44px !important;

    z-index: 10003 !important;
}

/* Захист від горизонтального скролу */

html.lb-disable-scrolling,
html.lb-disable-scrolling body,
html.lb-disable-scrolling .lightbox,
html.lb-disable-scrolling .lightboxOverlay {
    max-width: 100% !important;
    /*overflow-x: hidden !important;*/
}

/* ==================================================
   МОБІЛЬНІ ПРИСТРОЇ
   ================================================== */

@media (min-width: 800px) {

.lb-dataContainer {
          margin-top: 44px;
}
.lb-details{
    display: none !important;
}
.lb-data .lb-close{
        position: absolute;
 
}
.lightbox .lb-image {
    max-height: 100%;
}
.lightbox .lb-image{

    object-fit: cover !important;
}

}

/* ==================================================
   МОБІЛЬНІ ПРИСТРОЇ
   ================================================== */

@media (max-width: 767px) {

    /*
     * Lightbox2 у JS резервує приблизно 10px з кожного боку.
     * Тому залишаємо горизонтальний padding 10px.
     */
    .lightbox {
        padding: 40px 10px 0px !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .lb-outerContainer {
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 110px) !important;

        margin-right: auto !important;
        margin-left: auto !important;
    }

    .lightbox .lb-image {
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 140px) !important;

        margin-right: auto !important;
        margin-left: auto !important;
    }

    .lb-dataContainer {
        position: relative !important;

        max-width: calc(100vw - 20px) !important;
        margin-right: auto !important;
        margin-left: auto !important;

        min-height: 44px !important;
    }

    /*
     * Тільки розмір стрілок.
     * top, left і right встановлює JavaScript
     * відносно фактичних меж картинки.
     */
    .lb-nav a.lb-prev,
    .lb-nav a.lb-next {
        width: 40px !important;
        height: 40px !important;
    }

    /* Риски всередині мобільних стрілок */
    .lb-nav a.lb-prev::before,
    .lb-nav a.lb-prev::after,
    .lb-nav a.lb-next::before,
    .lb-nav a.lb-next::after {
        left: 14px !important;
    }

    .lb-nav a.lb-next::before,
    .lb-nav a.lb-prev::before {
        top: 15px !important;
    }

    .lb-nav a.lb-next::after,
    .lb-nav a.lb-prev::after {
        top: 22px !important;
    }

    /* Хрестик справа під фото */
    .lb-closeContainer {
        position: absolute !important;

        top: 4px !important;
        right: 0 !important;
        bottom: auto !important;
        left: auto !important;

        width: 44px !important;
        height: 44px !important;

        margin: 0 !important;
        float: none !important;
    }
}

@media (orientation: landscape) and (max-height: 450px) {

    .lb-nav a.lb-prev,
    .lb-nav a.lb-next{
        margin-top:-18px !important;
    }

}