/* ============================================
   文章图片灯箱 - 样式
   适用 emlog 5.x
   ============================================ */

#img-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, .9);
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

#img-lightbox.open {
    display: block;
}

/* 图片舞台 */
#img-lightbox .lb-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

#img-lightbox .lb-stage.dragging {
    cursor: grabbing;
}

/* 预览大图：以原始像素尺寸布局，通过 transform 缩放 */
#img-lightbox .lb-img {
    display: block;
    max-width: none !important;
    max-height: none !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .6);
    transition: transform .15s ease-out;
    will-change: transform;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

/* 拖动/捏合过程中去掉过渡，避免拖影 */
#img-lightbox .lb-stage.dragging .lb-img {
    transition: none;
}

/* 顶部操作按钮 */
#img-lightbox .lb-bar {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 20;
    display: flex;
    gap: 8px;
}

#img-lightbox .lb-bar button,
#img-lightbox .lb-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 16px;
    line-height: 38px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

#img-lightbox .lb-bar button:hover,
#img-lightbox .lb-close:hover {
    background: rgba(255, 255, 255, .32);
}

#img-lightbox .lb-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    font-size: 15px;
}

/* 图片标题 */
#img-lightbox .lb-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    z-index: 20;
    text-align: center;
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
    line-height: 1.6;
    padding: 0 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 操作提示 */
#img-lightbox .lb-hint {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
}

/* 移动端窄屏下按钮略缩小 */
@media (max-width: 480px) {
    #img-lightbox .lb-bar button,
    #img-lightbox .lb-close {
        width: 34px;
        height: 34px;
        line-height: 34px;
        font-size: 14px;
    }
}
