/* ==================================================
   文档预览弹层（本地 layer 3.x）
   类名均为本页自定义（pv-*），颜色/间距优先复用 public.css 工具类
   ================================================== */

/* 弹层容器 */
.preview-dialog { max-width: 96vw; }
.preview-dialog .layui-layer-content { height: 100%; padding: 0; overflow: hidden; }

/* 主体（flex 纵向：头 / 滚动内容 / 提示条 / 底部操作条） */
.pv-dialog {
    height: 95vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}
.pv-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* 头部文件图标（38px 圆角图标块，配色取 bg-blue-light + text-primary） */
.pv-file-ico {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pv-file-ico i { font-size: 20px; margin: 0; }
.pv-title-link { flex: 1; min-width: 0; }
.pv-title-link:hover { color: #2468F2; }

/* 内容区：预览图滚动 */
.pv-body { flex: 1; min-height: 0; overflow-y: auto; }
.pv-preview {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
.pv-page { width: 100%; }
.pv-page img { display: block; width: 100%; }
.pv-page-num {
    right: 10px;
    bottom: 10px;
    padding: 2px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .5);
    font-size: 12px;
    line-height: 18px;
}

/* 顶部配套工具条（默认收起） */
.pv-toolbar { position: relative; z-index: 5; }
.pv-between { display: flex; align-items: center; justify-content: space-between; }
.pv-file-name { display: inline-block; max-width: 360px; vertical-align: bottom; }
.pv-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #d9dce1;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
}
.pv-page-btn:hover { color: #2468F2; border-color: #2468F2; }
.pv-page-btn[disabled] { color: #bbb; cursor: not-allowed; }
.pv-page-divider { width: 1px; height: 16px; background: #e5e6eb; }

/* 右侧操作栏（固定于弹窗右缘） */
.pv-side {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    right: max(12px, calc((100vw - 1080px) / 2 + 12px));
    z-index: 10;
    margin: 0;
    padding: 8px 0;
}
.pv-side li {
    position: relative;
    width: 64px;
    padding: 9px 0;
    text-align: center;
    cursor: pointer;
}
.pv-side li:hover { background: #f5f8ff; }
.pv-side li:hover .pv-side-ico,
.pv-side li:hover .pv-side-text,
.pv-side li:hover p { color: #2468F2; }
.pv-side-ico { display: block; font-size: 14px; line-height: 1; font-style: normal; }
.pv-side-text { display: block; margin-top: 3px; }
.pv-side p { margin: 3px 0 0; }

/* 关闭按钮提示 */
.pv-tips {
    display: none;
    position: absolute;
    right: 72px;
    top: 8px;
    width: 170px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .75);
    font-size: 12px;
    line-height: 16px;
    text-align: left;
}
.pv-side-close:hover .pv-tips { display: block; }
.pv-tips-arrow {
    position: absolute;
    right: -6px;
    top: 10px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, .75);
}
.pv-side-count p { margin: 2px 0; }
.pv-num { font-size: 14px; }

/* 底部操作条 */
.pv-actions { gap: 12px; margin-left: auto; }
.pv-cart { margin-right: 4px; line-height: 1; }
.pv-cart i { font-size: 22px; margin: 0; }
.pv-cart:hover { opacity: .85; }
.pv-down { padding: 9px 18px; }
.pv-down:hover { opacity: .85; }
.pv-down-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid #d9dce1;
    border-radius: 6px;
    background: #fff;
}
.pv-down-all:hover { border-color: #2468F2; }
.pv-count { padding: 1px 8px; border-radius: 10px; font-size: 12px; line-height: 16px; }

@media (max-width: 1120px) {
    .pv-dialog { height: 82vh; }
    .pv-side { right: 10px; }
}
