.gl-stepform {
    --progressbar-height: 3px;
    --progressbar-margin-x: 1rem;
    --progressbar-margin-bottom: 3.5rem;
    --progressbar-step-width: 26px;
    --progressbar-step-background-color: #F0F1F2;
    --progress-step-title-padding-top: 0.5rem;

    position: relative;
    display: block;
}

.gl-stepform [data-stepform-step] {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    height: 100%;
    min-height: 14rem;
    opacity: 0;
    transition: opacity 0.3s 0.2s ease-in-out;
}

.gl-stepform [data-stepform-state="active"] {
    position: relative;
    top: 0;
    left: 0;
    z-index: 1;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.gl-stepform__action--hidden {
    display: none;
}

/* Style for progressbar */
.gl-stepform__progress {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    height: var(--progressbar-height);
    margin-top: calc(var(--progressbar-step-width) / 2);
    margin-bottom: calc(var(--progressbar-margin-bottom) + var(--progress-step-title-padding-top));
    margin-left: var(--progressbar-margin-x);
    margin-right: var(--progressbar-margin-x);
    border-radius: 50rem;
    background-color: var(--colors-product-product-light);
}

.gl-stepform__progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    height: var(--progressbar-height);
    border-radius: 50rem;
    background-color: var(--colors-product-product);
    transition: width 0.4s ease-in-out;
}

.gl-stepform__progress-step-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(calc(calc(var(--progressbar-step-width) / -2) - calc(var(--progressbar-height) / -2)));
    cursor: default;
}

.gl-stepform__progress-step {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: var(--progressbar-step-width);
    height: var(--progressbar-step-width);
    border-radius: 50%;
    border: 1px solid var(--colors-product-product);
    background-color: var(--progressbar-step-background-color);
    cursor: default;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.gl-stepform__progress-step[data-stepform-state="active"],
.gl-stepform__progress-step[data-stepform-state="completed"] {
    background-color: var(--colors-product-product);
    color: var(--colors-text-text-white);
    transition: background-color 0.3s 0.2s ease-in-out, color 0.3s 0.2s ease-in-out;
}

.gl-stepform__progress-step[data-stepform-state="completed"] {
    background-image: url("/img/checkmark.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

.gl-stepform__progress-step__title-container {
    position: absolute;
    top: calc(calc(var(--progressbar-step-width) / 2) + calc(var(--progressbar-height) * 2) + var(--progress-step-title-padding-top));
    left: calc(calc(var(--progressbar-step-width) / 2) + 50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    transform: translateX(calc(calc(var(--progressbar-step-width) / -2) - 50%));
    transition: color 0.3s ease-in-out;
}

.gl-stepform__progress-step__title {
    display: none;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25rem;
    color: var(--colors-product-product);
    transition: color 0.3s ease-in-out;
}

.gl-stepform__progress-step__subtitle {
    display: none;
    margin: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.25rem;
    color: var(--colors-text-text-terciary);
    transition: color 0.3s ease-in-out;
}

.gl-stepform__input-error {
    width: 100%;
    margin-bottom: 0;
    margin-top: 0.25rem;
    font-size: 80%;
    color: var(--colors-semantic-danger-regular);
}

@media (min-width: 578px) {
    .gl-stepform {
        overflow: hidden;
    }

    .gl-stepform__progress-step__title,
    .gl-stepform__progress-step__subtitle {
        display: block;
    }
}