/**
 * GalleryFootprint 全屏灯箱样式
 *
 * 单独抽出来，让没有相册页面、但调用了 GalleryFootprint.openLightbox()
 * 的页面（例如 FitLog 的“查看记录图片”）也能拿到完整样式。
 * 选择器都收在 .gallery-lightbox 下，不会碰其它灯箱。
 */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .95);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .3s ease;
    cursor: zoom-out;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox .lightbox-img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(255, 255, 255, .1);
    cursor: default;
    user-select: none;
}

.gallery-lightbox .lightbox-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, .5);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: monospace;
    z-index: 10;
}

.gallery-lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 10;
}

.gallery-lightbox .lightbox-close:hover {
    background: rgba(239, 68, 68, .8);
}

.gallery-lightbox .lightbox-prev,
.gallery-lightbox .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, .1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    z-index: 10;
    padding: 0;
}

.gallery-lightbox .lightbox-prev:hover,
.gallery-lightbox .lightbox-next:hover {
    background: rgba(59, 130, 246, .9);
}

.gallery-lightbox .lightbox-prev {
    left: 20px;
}

.gallery-lightbox .lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .gallery-lightbox .lightbox-prev,
    .gallery-lightbox .lightbox-next {
        width: 42px;
        height: 42px;
        font-size: 22px;
    }

    .gallery-lightbox .lightbox-prev {
        left: 10px;
    }

    .gallery-lightbox .lightbox-next {
        right: 10px;
    }

    .gallery-lightbox .lightbox-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .gallery-lightbox .lightbox-counter {
        top: 14px;
        left: 14px;
        font-size: 12px;
        padding: 5px 10px;
    }
}
