:root {
    --color-banner-bg: #6D477F;
    --color-banner-accent: #FEEF76;
    --color-banner-text: #5B2773;
}

.banner-cta {
    position: fixed;
    bottom: 3.5rem;
    left: 50%;
    max-width: 960px;
    width: calc(100% - 2rem);
    border-radius: 1rem;
    box-shadow: 0 8px 16px rgb(0 0 0 / .5);
    background-color: var(--color-banner-bg);
    color: darkslateblue;
    background-size: 100%;
    transform: translate(-50%, 0);
    transition: transform .5s linear(
            0,
            0.141, 0.309 6.7%,
            0.938 16.7%,
            1.163,
            1.154 29.9%,
            1.051 39.6%,
            0.974 53.8%,
            0.988 65%,
            1.005 77.5%,
            1
    );
    z-index: 2;

    @media (width < 992px) {
        bottom: 5rem;
    }

    &.banner-cta--closed {
        transform: translate(-50%, calc(100% + 300px));
    }

    &::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background-image: url("/typo3conf/ext/nl_evk/Resources/Public/img/banner-cta-bg.webp");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.5;
        mix-blend-mode: overlay;
        pointer-events: none;
    }

    @supports not (transition-timing-function: linear(0, 1)) {
        transition: transform .5s ease-in-out;
    }

    @media (prefers-reduced-motion: reduce) {
        transition: none;
    }

    @starting-style {
        bottom: 100%;
        transform: translate(-50%, 150%);
    }
}

.banner-cta__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: inherit;
    text-decoration: none;

    @media (hover: hover) {
        &:hover {
            color: inherit;
            opacity: 1;

            .banner-cta__image-container .img {
                scale: 1.05;
            }
        }
    }

    @media (max-width: 792px) {
        justify-content: center;

        .banner-cta__headline {
            font-size: 24px;
        }
    }
}

.banner-cta__content {
    position: relative;
    width: fit-content;
    border-radius: 1rem;
    flex-shrink: 0;
    z-index: 3;
}

.banner-cta__headline {
    position: relative;
    top: 24px;
    background-color: var(--color-banner-accent);
    color: var(--color-banner-text);
    padding: 1rem 6rem 4.5rem 2rem;
    clip-path: url(#spray-clip);
    margin: 0 0 0 1rem;
    font-size: 32px;
    font-weight: 600;
}

.banner-cta__image-container {
    position: relative;
    width: 400px;
    align-self: stretch;
    clip-path: inset(-999px -999px 0 0 round 0 1rem 1rem 0);
    border-radius: 1rem;
    filter: drop-shadow(0 8px 16px rgb(0 0 0 / .5));
    margin: 0 4rem 0 auto;

    @media (max-width: 792px) {
        position: absolute;
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
        max-width: 250px;
        width: 100%;
        margin: 0;
        filter: drop-shadow(0 4px 8px rgb(0 0 0 / .5));
        clip-path: inset(-999px -999px 30px 0 round 0 1rem 1rem 0);
        z-index: 2;
    }

    .img {
        position: absolute;
        bottom: -130%;
        aspect-ratio: 2 / 3;
        width: 400px;
        border-radius: 1rem;
        transition: scale .3s ease-in-out;

        @media (prefers-reduced-motion: reduce) {transition: none;}

        @media (max-width: 792px) {
            position: relative;
            inset: auto;
            max-width: 250px;
            width: 100%;
        }
    }
}

.banner-cta__close-btn {
    all: unset;
    position: absolute;
    display: grid;
    place-items: center;
    top: 1rem;
    right: 1rem;
    background-color: var(--color-banner-accent);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 4;
    transition: box-shadow .3s ease-in-out, scale .5s linear(
            0,
            0.141, 0.309 6.7%,
            0.938 16.7%,
            1.163,
            1.154 29.9%,
            1.051 39.6%,
            0.974 53.8%,
            0.988 65%,
            1.005 77.5%,
            1
    );

    &::before,
    &::after {
        content: '';
        position: absolute;
        width: 24px;
        height: 3px;
        background-color: currentColor;
        border-radius: 4px;
    }

    &::before { transform: rotate(45deg); }
    &::after { transform: rotate(-45deg); }

    @media (hover: hover) {
        &:hover {
            scale: 1.05;
            box-shadow: 0 8px 16px rgb(0 0 0 / .5);
        }
    }

    @media (max-width: 792px) {
        top: .5rem;
        right: .5rem;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}