/* ========================================
   基础样式重置
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f2f4f7;
}

[v-cloak] {
    display: none;
}

/* ========================================
   预览弹窗组件
   ======================================== */

/* 遮罩层 */
.preview-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 26, 41, 0.76);
    z-index: 1000;
}

/* 弹窗容器 */
.preview-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1140px;
    height: 650px;
    background-color: #fff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    transition: all 0.3s ease;
}

.preview-dialog.is-fullscreen {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* ========================================
   弹窗头部
   ======================================== */
.preview-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 30px;
    border-bottom: 1px solid #f2f2f2;
    flex-shrink: 0;
}

.preview-dialog__title {
    flex: 1;
    font-size: 18px;
    font-weight: 500;
    color: #131b26;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-dialog__close {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.preview-dialog__close:hover {
    opacity: 0.7;
}

.preview-dialog__close img {
    width: 100%;
    height: 100%;
    display: block;
}

/* ========================================
   弹窗内容区
   ======================================== */

.fileBox {
    padding-bottom: 20px; /* 增加底部内边距，数值根据工具栏实际高度调整 */
}

.fileBox ul {
    padding-bottom: 20px; /* 额外间距确保最后一页可见 */
}


/* ========================================
   弹窗底部操作栏
   ======================================== */
.preview-dialog__footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}

.preview-dialog__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end; /* 添加这行使按钮靠右对齐 */
}

.action-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: #f2f4f7;
}

.action-btn img {
    width: 18px;
    height: 18px;
    display: block;
}

.action-divider {
    width: 1px;
    height: 10px;
    background-color: #d5dae3;
    flex-shrink: 0;
}

/* ========================================
   nicescroll 滚动条样式
   ======================================== */
.nicescroll-rails {
    z-index: 10 !important;
}

.nicescroll-cursors {
    border: none !important;
    border-radius: 4px !important;
    width: 6px !important;
}

.nicescroll-cursors:hover {
    background-color: #d6d6d6 !important;
}