/* Общий компонент lightbox (#295). Полноэкранный просмотр фото с листанием.
   Используется на share/page.html, showcase_detail.html, catalog/detail.html. */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .92);
    align-items: center;
    justify-content: center;
    user-select: none;
}
.lightbox[hidden] { display: none; }
.lightbox:not([hidden]) { display: flex; }

.lightbox__img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 4px;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    backdrop-filter: blur(4px);
    font-family: inherit;
    padding: 0;
    line-height: 1;
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255, 255, 255, .3); }

.lightbox__close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    border-radius: 50%;
}
.lightbox__prev,
.lightbox__next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    font-size: 28px;
    border-radius: 50%;
}
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }

.lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .8);
    font-size: 14px;
    font-family: inherit;
    background: rgba(0, 0, 0, .3);
    padding: 4px 10px;
    border-radius: 12px;
}

/* Курсор-подсказка на кликабельных фото-триггерах. */
[data-lightbox-trigger],
.lightbox-trigger { cursor: zoom-in; }

@media (max-width: 640px) {
    .lightbox__prev,
    .lightbox__next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    .lightbox__prev { left: 8px; }
    .lightbox__next { right: 8px; }
    .lightbox__close {
        top: 8px;
        right: 8px;
    }
}
