/**
 * Lightbox新布局样式补充
 * 缩略图导航底部居中样式
 */

/* ========================================
   基础布局样式（PC端）
   ======================================== */

/* 主图区域 - 居中显示 */
.lightbox-main-center {
    position: fixed;
    top: 50%;
    left: 0;
    right: 380px; /* 为右侧详情面板留出空间 */
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100% - 400px);
    max-height: 90vh;
    z-index: 100;
    padding: 0 20px;
}

/* 右侧详情面板 */
.lightbox-sidebar-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    padding: 24px;
    overflow-y: auto;
    z-index: 100;
}

/* 主图包装器 */
.lightbox-image-wrapper {
    position: relative; /* 为缩放按钮提供定位参考 */
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.lightbox-image-wrapper img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

/* 缩略图导航 - 固定在页面底部，水平居中于主图 */
.thumbnail-navigation-bottom {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 400px; /* 为右侧详情面板留出空间 */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
    padding: 12px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    max-width: calc(100% - 420px);
    margin: 0 auto;
    z-index: 101;
}

.thumbnail-navigation-bottom .thumbnail-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
}

/* 滚动条样式 */
.thumbnail-navigation-bottom .thumbnail-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-navigation-bottom .thumbnail-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.thumbnail-navigation-bottom .thumbnail-container::-webkit-scrollbar-thumb {
    background: var(--accent-primary, #0d6efd);
    border-radius: 3px;
}

/* 右侧详情面板滚动条 */
.lightbox-sidebar-right::-webkit-scrollbar {
    width: 6px;
}

.lightbox-sidebar-right::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.lightbox-sidebar-right::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1400px) {
    .lightbox-main-center {
        right: 360px;
        max-width: calc(100% - 380px);
    }
    
    .lightbox-sidebar-right {
        width: 350px;
    }
    
    .thumbnail-navigation-bottom {
        right: 360px;
        max-width: calc(100% - 380px);
    }
}

@media (max-width: 1200px) {
    .lightbox-main-center {
        right: 330px;
        max-width: calc(100% - 340px);
    }
    
    .lightbox-sidebar-right {
        width: 320px;
        padding: 20px;
    }
    
    .thumbnail-navigation-bottom {
        right: 330px;
        max-width: calc(100% - 340px);
    }
}

/* 移动端布局 */
@media (max-width: 992px) {
    .lightbox-main-center {
        position: fixed;
        top: 20px;
        left: 0;
        right: 0;
        bottom: 320px; /* 为底部详情面板和缩略图留出空间 */
        transform: none;
        max-width: 100%;
        max-height: calc(100vh - 340px);
        padding: 0 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .lightbox-image-wrapper {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .lightbox-image-wrapper img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
    }
    
    .lightbox-sidebar-right {
        position: fixed;
        top: auto;
        bottom: 100px; /* 缩略图导航高度 + 间距 */
        right: 0;
        left: 0;
        width: 100%;
        height: 200px;
        padding: 15px;
        background: rgba(0, 0, 0, 0.9);
    }
    
    .thumbnail-navigation-bottom {
        position: fixed;
        bottom: 10px;
        left: 0;
        right: 0;
        transform: none;
        padding: 12px;
        max-width: 100%;
        margin: 0;
    }
    
    /* 移动端箭头尺寸调整 */
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .lightbox-main-center {
        bottom: 300px;
        max-height: calc(100vh - 320px);
        padding: 0 5px;
    }
    
    .lightbox-image-wrapper {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .lightbox-image-wrapper img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
    }
    
    .lightbox-sidebar-right {
        height: 180px;
        bottom: 90px;
        padding: 12px;
    }
    
    .thumbnail-navigation-bottom {
        padding: 10px;
        bottom: 5px;
    }
    
    .thumbnail-navigation-bottom .thumbnail-container {
        gap: 8px;
    }
    
    /* 小屏幕箭头进一步缩小 */
    .lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .lightbox-prev {
        left: 5px;
    }
    
    .lightbox-next {
        right: 5px;
    }
}

/* 横屏模式优化 */
@media (max-width: 992px) and (orientation: landscape) {
    .lightbox-main-center {
        bottom: 280px;
        max-height: calc(100vh - 300px);
    }
    
    .lightbox-sidebar-right {
        height: 160px;
        bottom: 80px;
    }
    
    .thumbnail-navigation-bottom {
        bottom: 5px;
        padding: 8px;
    }
}

/* ========================================
   缩放控制按钮组样式
   ======================================== */

/* 缩放控制按钮组容器 */
.lightbox-zoom-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000; /* 提高层级，确保在所有元素之上 */
    pointer-events: none; /* 允许点击穿透到按钮 */
}

/* 缩放按钮基础样式 */
.lightbox-zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto; /* 按钮本身可点击 */
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lightbox-zoom-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.lightbox-zoom-btn:active {
    transform: scale(0.95);
}

.lightbox-zoom-btn i {
    font-size: 18px;
}

/* 放大按钮 */
.lightbox-zoom-in {
    /* 使用默认样式 */
}

/* 缩小按钮 */
.lightbox-zoom-out {
    /* 使用默认样式 */
}

/* 重置按钮 */
.lightbox-zoom-reset {
    /* 使用默认样式 */
}

/* ========================================
   图片拖拽相关样式
   ======================================== */

/* 图片可拖拽时的光标样式 */
.lightbox-image-wrapper img {
    user-select: none; /* 防止图片被选中 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 图片放大后可拖拽时的光标 */
.lightbox-image-wrapper img[style*="scale"] {
    /* 通过JavaScript动态设置cursor，这里提供基础支持 */
}

/* ========================================
   移动端响应式样式（缩放按钮）
   ======================================== */

@media (max-width: 992px) {
    /* 移动端缩放按钮尺寸调整 */
    .lightbox-zoom-controls {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
    
    .lightbox-zoom-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .lightbox-zoom-btn i {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    /* 小屏幕进一步缩小按钮 */
    .lightbox-zoom-controls {
        top: 8px;
        right: 8px;
        gap: 5px;
    }
    
    .lightbox-zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .lightbox-zoom-btn i {
        font-size: 14px;
    }
}

/* 横屏模式下的按钮位置调整 */
@media (max-width: 992px) and (orientation: landscape) {
    .lightbox-zoom-controls {
        top: 8px;
        right: 8px;
    }
    
    .lightbox-zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

