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

.abecods-popup {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 180ms ease,
        visibility 180ms ease;
}

.abecods-popup.is-open {
    opacity: 1;
    visibility: visible;
}

.abecods-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(22, 22, 22, 0.72);
    backdrop-filter: blur(3px);
}

.abecods-popup__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 800px;
    max-height: calc(100dvh - 40px);
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
    -webkit-overflow-scrolling: touch;
    transform: translateY(12px);
    transition: transform 180ms ease;
}

.abecods-popup.is-open .abecods-popup__dialog {
    transform: translateY(0);
}

.abecods-popup__content,
.abecods-popup__content .elementor,
.abecods-popup__content .e-con {
    max-width: 100%;
}

.abecods-popup__content {
    width: 100%;
}

.abecods-popup__content img {
    max-width: 100%;
    height: auto;
}

.abecods-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #161616;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.abecods-popup__close:hover {
    background: #fff;
}

.abecods-popup__close:focus-visible {
    outline: 3px solid #1e10c7;
    outline-offset: 3px;
}

.abecods-popup-editor-notice {
    padding: 16px;
    border: 1px dashed #bbb;
    background: #fff;
    font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
    .abecods-popup,
    .abecods-popup__dialog {
        transition: none;
    }

    .abecods-popup__dialog {
        transform: none;
    }
}

@media (max-width: 767px) {
    .abecods-popup {
        align-items: flex-start;
        padding:
            max(12px, env(safe-area-inset-top))
            12px
            max(12px, env(safe-area-inset-bottom));
    }

    .abecods-popup__dialog {
        max-height:
            calc(
                100dvh -
                max(24px, env(safe-area-inset-top)) -
                max(24px, env(safe-area-inset-bottom))
            );
        border-radius: 8px;
    }

    .abecods-popup__close {
        top: 10px;
        right: 10px;
    }
}
