/* --------------------------------------------------------------------------
   3.9 Lightbox - 图片预览
   -------------------------------------------------------------------------- */

/* ==================== 图片 Lightbox 样式 ==================== */

body.uap-lightbox-open {
    overflow: hidden;
}

.uap-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y pinch-zoom;
}

.uap-lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uap-lightbox-container.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(255, 255, 255, 0.32);
    border-top-color: #fff;
    border-radius: 50%;
    animation: uap-lightbox-loading 0.72s linear infinite;
    pointer-events: none;
}

@keyframes uap-lightbox-loading {
    to { transform: rotate(360deg); }
}

.uap-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-drag: none;
}

.uap-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.uap-lightbox-close svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
    stroke-width: 2.5;
}

.uap-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.uap-lightbox-prev,
.uap-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.uap-lightbox-prev svg,
.uap-lightbox-next svg {
    width: 32px;
    height: 32px;
    stroke: #fff;
    stroke-width: 2.5;
}

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

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

.uap-lightbox-prev:hover,
.uap-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.05);
}

.uap-lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Lightbox 响应式 - 移动端隐藏左右按钮，使用滑动 */
@media (max-width: 768px) {

    .uap-lightbox-prev,
    .uap-lightbox-next {
        display: none;
    }

    .uap-lightbox-close {
        top: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .uap-lightbox-close svg {
        width: 24px;
        height: 24px;
    }

    .uap-lightbox-counter {
        bottom: 16px;
    }

    /* 滑动提示 */
    .uap-lightbox-swipe-hint {
        position: fixed;
        bottom: 60px;
        left: 50%;
        transform: translateX(-50%);
        color: rgba(255, 255, 255, 0.6);
        font-size: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
        animation: uap-hint-fade 3s ease forwards;
    }

    .uap-lightbox-swipe-hint svg {
        width: 20px;
        height: 20px;
    }

    @keyframes uap-hint-fade {

        0%,
        70% {
            opacity: 1;
        }

        100% {
            opacity: 0;
        }
    }
}

