.m-countdown-progress__inner {
    position: relative;
    padding-top: calc(var(--countdown-icon-size) + var(--countdown-icon-gap));
    --countdown-icon-size: clamp(2rem, 3vw, 3rem);
    --countdown-icon-gap: 0.75rem;
    --countdown-bar-height: 3.25rem;
    --countdown-icon-offset: -2.5rem;
}

.m-countdown-progress__end-icon {
    position: absolute;
    right: 0;
    top: var(--countdown-icon-offset);
    z-index: 4;
}

.m-countdown-progress__end-icon-image {
    display: block;
    width: var(--countdown-icon-size);
    height: auto;
    max-width: none;
}

.m-countdown-progress__bar {
    position: relative;
    width: 100%;
    height: var(--countdown-bar-height);
    background: #fff8c9;
    overflow: hidden;
}

.m-countdown-progress__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--progress);
    background: #ffdd75;
    transform-origin: left;
    transform: scaleX(0);
}

.m-countdown-progress__bar::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 0.5rem;
    height: 100%;
    background: var(--vt-color-primary);
}

.m-countdown-progress__marker {
    position: absolute;
    left: 0;
    top: var(--countdown-icon-offset);
    z-index: 3;
    opacity: 0;
    transform: translateX(-50%);
    transition:
        left 4s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.2s ease-out;
}

.m-countdown-progress__marker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(
        var(--countdown-icon-size)
        + var(--countdown-icon-gap)
        + (var(--countdown-icon-offset) * -1)
    );
    width: 0.35rem;
    height: var(--countdown-bar-height);
    background: var(--vt-color-primary);
    transform: translateX(-50%);
}

.m-countdown-progress__marker-image {
    display: block;
    width: var(--countdown-icon-size);
    height: auto;
    max-width: none;
    transform-origin: 50% 100%;
}

.m-countdown-progress__content {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 2rem;
    margin-top: 1.25rem;
}

.m-countdown-progress__days,
.m-countdown-progress__date {
    margin: 0;
    color: var(--vt-color-primary);
    font-family: 'CabinetGrotesk-Variable', sans-serif;
    font-weight: 800;
    font-size: clamp(1.5rem, 2.2vw, 2.25rem);
    line-height: 1.1;
}

.m-countdown-progress__days {
    text-align: left;
}

.m-countdown-progress__decoration {
    position: absolute;
    right: 0;
    top: -2.75rem;
    width: clamp(2.5rem, 4vw, 4.25rem);
    height: auto;
}

.m-countdown-progress.is-in-view .m-countdown-progress__fill {
    animation: countdownProgressGrow 4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.m-countdown-progress.is-in-view .m-countdown-progress__marker {
    left: var(--progress);
    opacity: 1;
}

.m-countdown-progress.is-in-view .m-countdown-progress__marker.is-hidden {
    opacity: 0;
}

.m-countdown-progress.is-in-view .m-countdown-progress__marker-image {
    animation: countdownMarkerWaddle 0.6s ease-in-out 7;
}

@keyframes countdownProgressGrow {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

@keyframes countdownMarkerWaddle {
    0% {
        transform: translateX(0) rotate(-2deg);
    }

    25% {
        transform: translateX(0) rotate(3deg);
    }

    50% {
        transform: translateX(0) rotate(-3deg);
    }

    75% {
        transform: translateX(0) rotate(2deg);
    }

    100% {
        transform: translateX(0) rotate(0deg);
    }
}

@media (max-width: 767.98px) {
    .m-countdown-progress__inner {
        --countdown-icon-size: clamp(2rem, 10vw, 2rem);
        --countdown-icon-gap: 0.6rem;
        --countdown-bar-height: 2rem;
    }

    .m-countdown-progress__content {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        text-align: center;
    }

    .m-countdown-progress__days,
    .m-countdown-progress__date {
        text-align: center;
    }

    .m-countdown-progress__decoration {
        display: none;
    }
}