/* Easy Popup 1.0 */
.easy-popup[hidden] {
    display: none !important;
}

.easy-popup {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.easy-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.66);
}

.easy-popup__dialog {
    position: relative;
    z-index: 1;
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
    line-height: 0;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.easy-popup__image-button {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.easy-popup__image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(940px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    object-fit: contain;
}

.easy-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 46px;
    height: 46px;
    padding: 0 0 3px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.88);
    color: #fff;
    font: 400 36px/1 Arial, Helvetica, sans-serif;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

.easy-popup__close:hover,
.easy-popup__close:focus-visible {
    background: #000;
    outline: 3px solid rgba(255, 255, 255, 0.95);
    outline-offset: 2px;
}

html.easy-popup-open,
html.easy-popup-open body {
    overflow: hidden !important;
}

@media (max-width: 600px) {
    .easy-popup {
        padding: 10px;
    }

    .easy-popup__image {
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .easy-popup__close {
        top: 8px;
        right: 8px;
        width: 42px;
        height: 42px;
        font-size: 33px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .easy-popup:not([hidden]) .easy-popup__dialog {
        animation: easy-popup-in 180ms ease-out both;
    }

    @keyframes easy-popup-in {
        from {
            opacity: 0;
            transform: translateY(8px) scale(0.985);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}
