﻿/* === PhotoViewer 主容器 === */
.photoviewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 10000;
}

    /* Swiper 全螢幕 */
    .photoviewer-overlay .swiper {
        width: 100%;
        height: 100%;
    }

    /* Slide */
    .photoviewer-overlay .swiper-slide {
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden; /* 每張圖自己管，不要被外層卡死 */
    }

    /* Zoom 容器 */
    .photoviewer-overlay .swiper-zoom-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        /* ⚠️ 不要設 max-width / max-height，放大才能突破框線 */
    }

    /* 圖片 */
    .photoviewer-overlay img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; /* 縮放時完整顯示 */
        cursor: zoom-in;
        transition: transform 0.3s ease;
        user-select: none;
        -webkit-user-drag: none;
    }

/* PNG Checker 背景 */
.checker-bg {
    background: repeating-conic-gradient(#eee 0% 25%, #ccc 0% 50%) 50% / 30px 30px;
}

/* 關閉按鈕 */
.photoviewer-overlay .pv-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    cursor: pointer;
    z-index: 10100;
    padding: 8px 12px;
    border-radius: 50%;
}

/* 左右箭頭 */
.photoviewer-overlay .swiper-button-prev,
.photoviewer-overlay .swiper-button-next {
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    width: 44px;
    height: 44px;
}

/* 分頁點點 */
/*.photoviewer-overlay .swiper-pagination {
    bottom: 20px;
}*/

.photoviewer-overlay .swiper-pagination {
    bottom: 20px;
    font-size: 14px;
    color: #fff;
    text-align: center;
}
