.promo-modal[hidden] {
    display: none !important;
}

.promo-modal {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.promo-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 27, 23, .72);
    animation: promo-backdrop-in .22s ease-out both;
}

.promo-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    max-height: calc(100vh - 48px);
    max-height: calc(100svh - 48px);
    overflow: hidden;
    animation: promo-dialog-in .28s cubic-bezier(.2, .8, .2, 1) both;
}

.promo-modal-link,
.promo-modal-link picture {
    display: block;
}

.promo-modal-link img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 48px);
    max-height: calc(100svh - 48px);
    object-fit: contain;
}

.promo-modal-close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 50%;
    color: #26352f;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 3px 14px rgba(18, 31, 25, .2);
    cursor: pointer;
    transition: transform .18s ease, background-color .18s ease;
}

.promo-modal-close:hover {
    transform: scale(1.06);
    background: #fff;
}

.promo-modal-close:focus-visible {
    outline: 3px solid #4b9a7b;
    outline-offset: 3px;
}

.promo-modal-close svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

@keyframes promo-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes promo-dialog-in {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 700px) {
    .promo-modal {
        padding: 14px;
    }

    .promo-modal-dialog {
        width: min(100%, 520px);
        max-height: calc(100vh - 28px);
        max-height: calc(100svh - 28px);
    }

    .promo-modal-link img {
        max-height: calc(100vh - 28px);
        max-height: calc(100svh - 28px);
    }

    .promo-modal-close {
        top: 9px;
        right: 9px;
        width: 36px;
        height: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .promo-modal-backdrop,
    .promo-modal-dialog {
        animation: none;
    }

    .promo-modal-close {
        transition: none;
    }
}
