/* ============================================================
   photo-viewer.css  窄屏图片放大查看器（通用组件）
   用法：
     1) 给包裹图片的元素加 data-photo-viewer（值留空时自动取内部
        第一个 img 的地址；也可显式写死图片地址）
     2) 在其后加提示：<p class="pvHint"><img src="/icon/button_search_alpha.png" alt="" />点击图片可手动放大查看</p>
   生效范围：仅 <=768px；PC 端无任何变化（JS 内亦做同样判断）
   ============================================================ */

/* 提示文字：PC/平板隐藏 */
.pvHint { display: none; }

@media (max-width: 768px) {
    [data-photo-viewer] {
        position: relative;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    [data-photo-viewer]:active { opacity: 0.92; }

    .pvHint {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 10px 0 0;
        font-size: 13px;
        line-height: 1.4;
        color: #888888;
    }
    .pvHint img { width: 16px; height: 16px; margin-right: 6px; }
}

/* ---------------- 全屏查看器 ---------------- */

/* 遮罩：浅灰背景，衬托白底图片且不刺眼 */
.pvOverlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    overflow: hidden;
    background: #f2f2f2;
}
body.pvLock { overflow: hidden; }

.pvImg {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    transform-origin: 0 0;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    will-change: transform;
}

/* 关闭按钮：浅底上用品牌红实心按钮，flex 双向居中 */
.pvClose {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    color: #ffffff;
    background: #da1f1b;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(218, 31, 27, 0.3);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.pvClose:active { background: #b81815; }
