.ab-popup {
    box-sizing: border-box;
    width: min(600px, calc(100vw - 32px));
    max-width: 600px;
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 36px;
    overflow: auto;
    border: 0;
    border-radius: 20px;
    color: #18212f;
    background: #fff;
    box-shadow: 0 24px 80px #0004;
    font-family: inherit;
}
.ab-popup::backdrop { background: rgb(15 23 42 / 65%); }
.ab-popup .ab-popup__title { margin: 0 36px 20px 0; font-size: 1.75rem; line-height: 1.25; }
.ab-popup .ab-popup__close {
    position: absolute; top: 12px; right: 12px;
    display: grid; place-items: center;
    width: 40px; height: 40px; padding: 0;
    border: 0; border-radius: 50%; background: #f1f5f9;
    color: #18212f; font: 28px/1 sans-serif; cursor: pointer;
}
.ab-popup__content { overflow-wrap: anywhere; }
.ab-popup__content img, .ab-popup__content video { max-width: 100%; height: auto; }
.ab-popup__content .alignfull, .ab-popup__content .alignwide { max-width: 100%; margin-left: 0; margin-right: 0; }
.ab-popup__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
:where(.ab-popup) .ab-popup__button:where(:not(.ab-popup__button--external)) {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; box-sizing: border-box; padding: 12px 22px;
    border-radius: 10px; background: #244bd7; color: #fff;
    font: inherit; font-weight: 600; text-decoration: none; text-align: center; border: 0; cursor: pointer;
}
:where(.ab-popup) :where(.ab-popup__button:hover) { filter: brightness(.92); }
.ab-popup :focus-visible { outline: 3px solid #d97706; outline-offset: 3px; }
.ab-popup .ab-popup__button--mobile { display: none !important; }
.ab-popup__error { color: #b32d2e; font-size: 14px; }
@media (max-width: 767px) {
    .ab-popup { padding: 28px 22px; }
    .ab-popup__buttons { flex-direction: column; }
    .ab-popup .ab-popup__button--mobile { display: inline-flex !important; }
}
