html.actmob-popup-open {
    overflow: hidden;
}

dialog.actmob-popup {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 12px;
    width: min(500px, calc(100% - 32px));
    max-width: calc(100% - 32px);
    max-height: calc(100dvh - 32px);
    background: var(--act-popup-background, white);
    color: #171717;
    overflow: auto;
    overscroll-behavior: contain;
}

dialog.actmob-popup::backdrop {
    background: rgb(0 0 0 / 65%);
}

dialog.actmob-popup--full {
    width: 100%;
    height: 100dvh;
    max-width: 100%;
    max-height: 100dvh;
    border-radius: 0;
}

dialog.actmob-popup--viewport {
    width: var(--act-popup-width);
    height: var(--act-popup-height);
    max-width: 100%;
    max-height: 100dvh;
}

dialog.actmob-popup--image {
    width: fit-content;
    background: transparent;
}

.actmob-popup__content {
    padding: 44px 24px 24px;
    overflow-wrap: anywhere;
}

.actmob-popup--image .actmob-popup__content {
    padding: 0;
}

.actmob-popup--image .actmob-popup__content a {
    display: block;
}

.actmob-popup--image .actmob-popup__content img {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
    object-fit: contain;
}

dialog.actmob-popup .actmob-popup__close {
    position: sticky;
    z-index: 1;
    top: 8px;
    float: right;
    margin: 8px 8px -48px 0;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #171717;
    font: 24px/1 Arial, sans-serif;
    cursor: pointer;
}

dialog.actmob-popup .actmob-popup__close:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}
