.root {
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: center;
    gap: var(--spacing-20);
    padding: 0 var(--spacing-120);
    overflow: hidden;
}

.root[data-scheme='light'] {
    color: var(--color-text-primary);
}

.root[data-scheme='dark'] {
    color: var(--color-text-primary-inverted);
}

.stepsContainer {
    min-height: 620px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: center;
    flex-wrap: nowrap;
    overflow-y: hidden;
    overflow-x: auto;
    touch-action: auto;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stepsContainer::-webkit-scrollbar {
    display: none;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    outline: none;
}

.card.cardActive {
    .image {
        width: 420px;
        height: 420px;
        border-radius: var(--border-radius-lg);
        opacity: 1;
    }

    .stepLabel::after {
        transform: scaleX(1);
    }

    .textContainer {
        opacity: 1;
        transform: scaleX(1);
        pointer-events: auto;
        transition-delay: 0.18s;
    }
}

.imageWrapper {
    max-width: 420px;
    height: 420px;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-32);
}

.image {
    margin-inline: var(--spacing-8);
    width: 232px;
    height: 232px;
    object-fit: cover;
    border-radius: var(--border-radius-full);
    transition:
        opacity 0.4s,
        width 0.4s,
        height 0.4s,
        border-radius 0.4s;
    opacity: 0.3;
}

.stepLabel {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: var(--spacing-16);
    margin-bottom: var(--spacing-20);
    color: var(--color-text-primary-disabled);
}

.stepLabel::before {
    content: '';
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: var(--color-neutral-200);
    height: var(--border-width-md);
}

.root[data-scheme='dark'] .stepLabel::before {
    background-color: var(--color-bg-fill-alpha-white-20);
}

.card:first-child {
    .stepLabel::before {
        left: 0;
    }
}

.card:last-child {
    .stepLabel::before {
        right: 0;
    }
}

.stepLabel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--border-width-md);
    background-color: var(--color-neutral-200);
    transform: scaleX(0);
    transition: transform 0.4s;
    pointer-events: none;
}

.root[data-scheme='light'] .stepLabel::after {
    background-color: var(--border-color-indigo);
}

.root[data-scheme='dark'] .stepLabel::after {
    background-color: var(--color-solar-200);
}

.labelText {
    display: flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
}

.textContainer {
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-8);
    padding: 0 var(--spacing-24);
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 0.4s, transform 0.2s;
    pointer-events: none;
}

.cardDescription {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.root[data-scheme='light'] .cardDescription {
    color: var(--color-text-secondary);
}

.root[data-scheme='dark'] .cardDescription {
    color: var(--color-text-secondary-inverted);
}

.mobile {
    display: none;
}

@media (width <= 1440px) {
    .root {
        padding: 0 var(--spacing-64);
    }
}

@media screen and (width <= 1024px) {
    .root {
        padding: 0 20px;
    }

    .stepsContainer {
        min-height: 460px;
        inline-padding: 0;
    }

    .card.cardActive {
        .image {
            width: 278px;
            height: 278px;
        }

        .stepLabel {
            max-width: 420px;
        }

        .stepLabel::after {
            transform: scaleX(1);
        }

        .textContainer {
            max-width: 420px;
            transition-delay: 0.3s;
        }
    }

    .imageWrapper {
        height: 278px;
        min-height: 278px;
    }

    .image {
        width: 158px;
        height: 158px;
    }

    .labelText {
        min-height: 24px;
    }

    .textContainer {
        max-width: 278px;
        padding: 0 var(--spacing-14);
        gap: var(--spacing-4);
        height: 101px;
        max-height: 101px;
    }

    .progressButtonContainer {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile {
        display: flex;
    }

    .desktop {
        display: none;
    }
}

@media (width <= 768px) {
    .root {
        padding: 0;
    }

    .card {
        width: 100%;
        align-items: center;
        flex-shrink: 0;
        padding: 0 20px;
    }
}
