.cwc-animated-header-wrapper {
    display: block;
    width: 100%;
    overflow: hidden;
}

.cwc-animated-header {
    margin: 0;
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.cwc-animated-texts-container {
    position: relative;
    display: block;
    width: 100%;
    height: 1.3em;
    overflow: hidden;
}

.cwc-animated-item {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: inherit;
    /* Follows parent's flex alignment */
}

/* Inbound: Fast, smooth single bounce */
.cwc-animated-item.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
    /* New text always on top */
    animation: cwcBounceSingle 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Outbound: Fast slide out with fade */
.cwc-animated-item.exit {
    z-index: 1;
    animation: cwcFastExit 0.5s ease-in forwards;
}

@keyframes cwcBounceSingle {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    /* Overshoot by exactly 30px to the right */
    70% {
        transform: translateX(30px);
        opacity: 1;
    }

    /* Settle at final position */
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes cwcFastExit {
    0% {
        transform: translateX(0);
        opacity: 1;
        filter: blur(0);
    }

    50% {
        opacity: 0.5;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
        filter: blur(4px);
    }
}