html.dd-promo-lock,
body.dd-promo-lock {
    overflow: hidden !important;
}

.dd-promo {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
}

.dd-promo__overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dd-promo--open .dd-promo__overlay {
    opacity: 1;
}

.dd-promo__dialog {
    position: relative;
    z-index: 1;
    width: max-content;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    box-sizing: border-box;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.dd-promo--html .dd-promo__dialog {
    width: calc(100vw - 32px);
    max-width: 720px;
}

.dd-promo--open .dd-promo__dialog {
    opacity: 1;
    transform: scale(1);
}

.dd-promo--image .dd-promo__dialog {
    width: auto;
    max-width: calc(100vw - 32px);
    max-height: none;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.dd-promo__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 24px;
    line-height: 36px;
    text-align: center;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.dd-promo__close:focus {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.dd-promo__host {
    display: block;
    width: max-content;
    max-width: 100%;
}

.dd-promo--html .dd-promo__host {
    width: 100%;
    padding: 28px 20px 20px;
}

@media (max-width: 767px) {
    .dd-promo {
        padding: 12px;
    }

    .dd-promo__dialog {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

    .dd-promo--image .dd-promo__dialog {
        max-width: calc(100vw - 24px);
        max-height: none;
    }
}
