.doxy-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5vh 5vw;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
    touch-action: auto;
}

.doxy-popup-overlay[hidden] {
    display: none !important;
}

.doxy-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.doxy-popup-dialog {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.975);
    transition: transform 180ms ease;
    touch-action: auto;
}

.doxy-popup-overlay.is-visible .doxy-popup-dialog {
    transform: scale(1);
}

.doxy-popup-image,
.doxy-popup-image-link {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    touch-action: auto;
}

.doxy-popup-image {
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.42);
}

.doxy-popup-image-link {
    line-height: 0;
}

.doxy-popup-close {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    font: 400 34px/40px Arial, sans-serif;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    -webkit-tap-highlight-color: transparent;
}

.doxy-popup-close:hover,
.doxy-popup-close:focus-visible {
    background: rgba(0, 0, 0, 0.88);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

body.doxy-popup-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .doxy-popup-overlay,
    .doxy-popup-dialog {
        transition: none;
    }
}
