.site-image-popup-layer{position:fixed;z-index:2200;top:100px;right:24px;display:flex;align-items:flex-start;justify-content:flex-end;flex-wrap:wrap;gap:16px;max-width:calc(100vw - 48px);max-height:calc(100dvh - 120px);overflow:auto;pointer-events:none;padding:0 0 18px 18px}
.site-image-popup{flex:0 0 auto;width:var(--popup-width,360px);max-width:calc(100vw - 66px);pointer-events:auto}
.site-image-popup-card{display:flex;flex-direction:column;overflow:hidden;border-radius:22px;background:#fff;box-shadow:0 12px 35px #0c1c3830;border:1px solid #e4e8ed;height:var(--popup-height,500px);max-height:calc(100dvh - 140px);box-sizing:border-box}
.site-image-popup-image,.popup-preview-image{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.site-image-popup-image>a{display:block;width:100%;height:100%}
.site-image-popup-card img{display:block;width:100%;height:100%;min-height:0;object-fit:contain;background:#fff}
.site-image-popup-actions{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 14px;background:#fff;color:#445064;font-size:12px}
.site-image-popup-actions button{font:inherit;color:inherit;cursor:pointer;background:none;border:0;padding:3px 0}
.site-image-popup-actions button:focus-visible{outline:2px solid #df202b;outline-offset:3px}
@media(max-width:600px){.site-image-popup-layer{top:85px;right:12px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 100px);padding:0 0 14px;justify-content:center;width:calc(100vw - 24px)}.site-image-popup{max-width:100%}.site-image-popup-card{border-radius:18px;max-height:calc(100dvh - 115px)}}

/* Preserve transparency in uploaded popup artwork. */
.site-image-popup-card{background:transparent;border:0;box-shadow:none}
.site-image-popup-card img{background:transparent}
.popup-preview-image{background:transparent}
.site-image-popup-actions{background:transparent}

/* Fit the popup to the artwork; each action has its own translucent surface. */
.site-image-popup-card{height:auto;max-height:none;overflow:visible;border-radius:0}
.site-image-popup-image{flex:none;display:block;overflow:hidden;border-radius:18px}
.site-image-popup-image>a{height:auto}
.site-image-popup-card img{width:100%;height:auto;object-fit:contain}
.site-image-popup-actions{padding:0;gap:6px;align-items:flex-start;background:transparent}
.site-image-popup-actions button{background:rgba(0,0,0,.42);color:#fff;border:0;border-radius:7px;padding:7px 10px;line-height:1.4;font-size:12px}
.site-image-popup-actions button:hover{background:rgba(0,0,0,.58)}
@media(max-width:600px){.site-image-popup-card{border-radius:0;max-height:none}}

.site-image-popup-actions{padding-top:6px}
