/* Overlay gelap */
#pnbyw-lb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .88);
    align-items: center;
    justify-content: center;
    padding: 70px 60px 80px;
    opacity: 0;
    transition: opacity .25s ease;
}
#pnbyw-lb-overlay.is-open {
    display: flex;
    opacity: 1;
}
body.pnbyw-lb-open {
    overflow: hidden; /* cegah scroll saat lightbox terbuka */
}

/* Kontainer konten */
.pnbyw-lb-wrap {
    position: relative;
    max-width: min(92vw, 1000px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Gambar */
.pnbyw-lb-img {
    max-width: 100%;
    width: auto; height: auto;
    max-height: calc(100dvh - 160px);
    object-fit: contain;
    border-radius: 6px;
    opacity: 0;
    transition: opacity .2s ease;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.pnbyw-lb-img.is-loaded { opacity: 1; }

/* Caption */
.pnbyw-lb-caption {
    color: #e5e7eb;
    font-size: 13px;
    text-align: center;
    margin: 10px 0 0;
    max-width: 600px;
}

/* Tombol tutup */
.pnbyw-lb-close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1000001;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 999px;

    background: rgba(0,0,0,.72);
    color: #fff;

    font-size: 34px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;
    padding: 0;

    box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.pnbyw-lb-close:hover {
    background: #9a2109;
}

/* Tombol navigasi prev/next */
.pnbyw-lb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    font-size: 36px;
    width: 48px;
    height: 64px;
    cursor: pointer;
    border-radius: 4px;
    transition: background .15s;
    padding: 0;
    line-height: 1;
}
.pnbyw-lb-nav:hover { background: rgba(255,255,255,.25); }
.pnbyw-lb-prev { left: 8px; }
.pnbyw-lb-next { right: 8px; }

/* Kursor pointer pada gambar yang bisa diklik */
a.pnbyw-lightbox img,
a.pnbyw-lightbox-single img {
    cursor: zoom-in;
    transition: opacity .15s;
}
a.pnbyw-lightbox:hover img,
a.pnbyw-lightbox-single:hover img {
    opacity: .88;
}

/* Mobile */
@media (max-width: 600px) {
    #pnbyw-lb-overlay { padding: 70px 12px 90px; }
    .pnbyw-lb-nav { display: block; top: auto; bottom: 18px; transform: none; width: 44px; height: 44px; }
    .pnbyw-lb-prev { left: calc(50% - 75px); }
    .pnbyw-lb-next { right: calc(50% - 75px); }
    .pnbyw-lb-close {
     top: 14px;
     right: 14px;
}
}

#pnbyw-lb-overlay::backdrop{background:transparent}
.pnbyw-lb-count{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);color:#fff;font:13px/20px Arial,sans-serif}
#pnbyw-lb-overlay button:focus-visible{outline:2px solid #fff;outline-offset:4px}
@media(prefers-reduced-motion:reduce){#pnbyw-lb-overlay,.pnbyw-lb-img{transition:none}}

/* Keep navigation above the photo and visible under theme button rules. */
#pnbyw-lb-overlay .pnbyw-lb-nav,#pnbyw-lb-overlay .pnbyw-lb-close{display:flex!important;align-items:center;justify-content:center;z-index:2;color:#fff!important;background:rgba(0,0,0,.7)!important;font-family:Arial,sans-serif!important;touch-action:manipulation}
#pnbyw-lb-overlay .pnbyw-lb-img{width:auto!important;height:auto!important;max-width:100%!important;max-height:calc(100dvh - 170px)!important;object-fit:contain!important}
#pnbyw-lb-overlay .pnbyw-lb-caption{position:absolute;bottom:8px;left:10%;width:80%;margin:0;color:#fff;font-size:13px;text-align:center}
#pnbyw-lb-overlay [hidden]{display:none!important}
