.campaign-popup {
    position: fixed;
    z-index: 2147483000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.campaign-popup[hidden] {
    display: none;
}

.campaign-popup__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.78);
    cursor: pointer;
}

/*
 * De designs zijn vierkant, dus de breedte bepaalt ook de hoogte. De pop-up
 * wordt zo groot als past: 80% van de schermbreedte, met 1200px als
 * bovengrens. Op de meeste schermen is de hoogte de beperkende factor -
 * de 120px die daarvan af gaat is de ruimte voor de sluitknop en de marge.
 */
.campaign-popup__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80vw;
    max-width: 1200px;
    width: min(80vw, calc(100vh - 120px), 1200px);
    animation: campaign-popup-zoom 0.35s ease-out;
}

.campaign-popup__link {
    order: 2;
    display: block;
    width: 100%;
}

.campaign-popup__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 14px 50px rgba(0, 0, 0, 0.55);
}

/* Boven de afbeelding, zodat de sluitknop nooit een deel van het design afdekt. */
.campaign-popup__close {
    order: 1;
    align-self: flex-end;
    margin: 0 0 12px 0;
    width: 46px;
    height: 46px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    cursor: pointer;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.campaign-popup__close svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    transition: transform 0.25s ease;
}

.campaign-popup__close:hover,
.campaign-popup__close:focus-visible {
    background: #ffffff;
    border-color: #ffffff;
    color: #1a1a1a;
    transform: scale(1.08);
}

.campaign-popup__close:hover svg {
    transform: rotate(90deg);
}

.campaign-popup__close:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.campaign-popup__close:active {
    transform: scale(0.96);
}

@keyframes campaign-popup-zoom {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media only screen and (max-width: 700px) {
    .campaign-popup {
        padding: 3vw;
    }

    .campaign-popup__dialog {
        width: 94vw;
        max-width: 94vw;
        width: min(94vw, 80vh);
    }

    .campaign-popup__close {
        width: 42px;
        height: 42px;
        margin-bottom: 10px;
    }

    .campaign-popup__close svg {
        width: 18px;
        height: 18px;
    }
}
