.pge-gallery-popup { position:fixed; inset:0; z-index:100000; display:flex; align-items:center; justify-content:center; padding:4vh 2vw; box-sizing:border-box; opacity:0; transition:opacity 220ms ease; }
.pge-gallery-popup[hidden], .pge-gallery-popup [hidden] { display:none !important; }
.pge-gallery-popup.is-open { opacity:1; }
.pge-gallery-popup.is-closing { pointer-events:none; }
.pge-gallery-popup__overlay { position:absolute; inset:0; background:#0009; backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
.pge-gallery-popup__dialog { position:relative; width:min(96vw,1200px); border-radius:20px; background:transparent; transform:translateY(12px) scale(.98); transition:transform 220ms ease; }
.is-open .pge-gallery-popup__dialog { transform:none; }
.pge-gallery-popup__stage { height:80vh; display:grid; grid-template: minmax(0,1fr) / minmax(0,1fr); place-items:center; position:relative; touch-action:pan-y pinch-zoom; }
.pge-gallery-popup__image, .pge-gallery-popup__outgoing { grid-area:1 / 1; display:block; width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; border-radius:20px; user-select:none; -webkit-user-drag:none; opacity:0; transition:opacity 240ms ease; }
.pge-gallery-popup__image.is-visible, .pge-gallery-popup__outgoing.is-visible { opacity:1; }
.pge-gallery-popup__status { position:absolute; color:white; text-align:center; pointer-events:none; }
.pge-gallery-popup__status.is-loading { width:28px; height:28px; border:3px solid #ffffff55; border-top-color:#fff; border-radius:50%; animation:pge-gallery-spin 800ms linear infinite; }
@keyframes pge-gallery-spin { to { transform:rotate(360deg); } }
.pge-gallery-popup button { position:absolute; z-index:2; display:flex; align-items:center; justify-content:center; width:44px; height:44px; padding:5px; border:0; border-radius:50%; background:#fff; color:#333; cursor:pointer; box-shadow:0 1px 8px #0004; }
.pge-gallery-popup__close { top:8px; right:8px; }
.pge-gallery-popup__close img { width:30px; height:30px; }
.pge-gallery-popup__prev, .pge-gallery-popup__next { top:50%; transform:translateY(-50%); font-size:32px; line-height:1; }
.pge-gallery-popup__prev { left:8px; }
.pge-gallery-popup__next { right:8px; }
.pge-gallery-popup button:focus-visible { outline:3px solid #82caff; outline-offset:3px; }
.pge-gallery-popup button:hover, .pge-gallery-popup button:focus, .pge-gallery-popup button:active { background:#ececec !important; color:#333 !important; border-color:transparent !important; }
.pge-gallery-popup button svg { display:block; flex-shrink:0; width:24px; height:24px; }
.pge-gallery-popup button { box-sizing:border-box; line-height:1; }
.pge-gallery-popup__counter { padding-top:12px; text-align:center; color:#fff; font-size:14px; }
body.pge-gallery-popup-open { overflow:hidden; }
@media (hover:hover) and (pointer:fine) { .pge-gallery-popup__close { opacity:0; } .pge-gallery-popup__dialog:hover .pge-gallery-popup__close, .pge-gallery-popup__close:focus-visible { opacity:1; } }
@media (any-pointer:coarse) { .pge-gallery-popup__close { opacity:1; } }
@supports (height:100dvh) { .pge-gallery-popup { padding:4dvh 2vw; } .pge-gallery-popup__stage { height:80dvh; } }
@media (prefers-reduced-motion:reduce) { .pge-gallery-popup, .pge-gallery-popup__dialog, .pge-gallery-popup__image, .pge-gallery-popup__outgoing { transition:none; transform:none; } .pge-gallery-popup__status.is-loading { animation:none; } }
