/* ==================== 图片预览组件样式 ==================== */

.img-preview-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.25s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.img-preview-overlay.active {
    opacity: 1;
}

/* 图片容器 - 占据除底部栏外的所有空间 */
.img-preview-container {
    flex: 1;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 图片 */
.img-preview-image {
    max-width: 92%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.15s ease-out;
    cursor: grab;
    will-change: transform;
}

.img-preview-image.dragging {
    cursor: grabbing;
    transition: none;
}

/* 底部工具栏 */
.img-preview-bottombar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
    flex-shrink: 0;
}

/* 底部栏按钮通用样式 */
.img-preview-bottombar button {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.img-preview-bottombar button:active {
    background: rgba(255,255,255,0.3);
}

/* 隐藏导航（单图时） */
.img-preview-bottombar button.hidden {
    display: none;
}

/* 分隔线 */
.img-preview-sep {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
    margin: 0 4px;
}

/* 计数器 */
.img-preview-counter {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.img-preview-counter.hidden {
    display: none;
}

/* 加载指示 */
.img-preview-loading {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    z-index: 5;
}
