.at-stepCompact {
    --stepBackgroundColor: var(--baseLight100);
    --stepSupportBackgroundColor: var(--primaryColor100);
    --stepNumberColor: var(--primaryColor500);

    display: flex;
}

/* The whole card is the link */
.at-stepCompact__card {
    display: flex;
    flex: 1;
    gap: var(--marginSmall);
    min-width: 0;
    padding: var(--marginSmall);
    border: 1px solid transparent;
    border-end-end-radius: var(--borderRadiusSmall);
    color: inherit;
    text-decoration: none;
    background-color: var(--stepBackgroundColor);
    transition: transform .2s ease-out;

    &:hover {
        text-decoration: none;
        transform: translateY(-.15rem);
    }
}

.at-stepCompact__number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: var(--marginMedium);
    height: var(--marginMedium);
    border: 2px solid var(--stepNumberColor);
    border-radius: 50%;
    color: var(--stepNumberColor);
    font-size: var(--smallerSize);
    font-weight: 600;
    line-height: 1;
}

/* A white or grey card would disappear into a white page. The border is transparent otherwise, so all cards stay the same size */
.at-stepCompact.--hasBorder .at-stepCompact__card {
    border-color: var(--baseLight500);
}

/* Filled when the card is hovered, and always on the final step */
.at-stepCompact__card:hover .at-stepCompact__number,
.at-stepCompact.--finalStep .at-stepCompact__number {
    background-color: var(--stepNumberColor);
    color: var(--stepBackgroundColor);
}

.at-stepCompact__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--marginExtraSmall);
    min-width: 0;
}

.at-stepCompact__title {
    margin: 0;
    font-size: var(--bodySize);
}

.at-stepCompact__subtitle {
    font-size: var(--smallerSize);
}

.at-stepCompact__time {
    width: fit-content;
    margin-top: auto;
    padding: calc(var(--marginExtraSmall) / 2) var(--marginExtraSmall);
    color: var(--baseDark900);
    font-size: var(--smallerSize);
    line-height: 1;
    white-space: nowrap;
    border-radius: var(--borderRadiusLarge);
    background-color: var(--stepSupportBackgroundColor);
}

.at-stepCompact.--textLight {
    --stepNumberColor: var(--baseLight100);
    color: var(--baseLight100);
}

@media (min-width: 568px) {
    .at-stepCompact__card {
        border-end-end-radius: var(--borderRadiusMedium);
    }
}

@container stepCompactContainer (min-width: 25rem) {
    .at-stepCompact__card {
        flex-direction: column;
        padding: var(--marginSmall) var(--marginSmall) var(--marginSmallMedium);
    }
}
