.stepper {
  display: grid;
  grid-template-columns: repeat(var(--steps, 5), minmax(0, 1fr));
  gap: var(--space-1);
  padding: 0 var(--space-4) var(--space-4);
  width: 100%;
  max-width: var(--wizard-desktop);
}

.stepper__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  position: relative;
}

.stepper__item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 11px;
  left: calc(50% + 14px);
  width: calc(100% - 12px);
  height: 2px;
  background: var(--color-border);
}

.stepper__item.is-done:not(:last-child)::after,
.stepper__item.is-current:not(:last-child)::after {
  background: var(--color-primary);
}

.stepper__dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-background);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  z-index: 1;
}

.stepper__item.is-current .stepper__dot,
.stepper__item.is-done .stepper__dot {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.stepper__label {
  font-size: 10px;
  color: var(--color-text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.stepper__item.is-current .stepper__label {
  color: var(--color-primary);
  font-weight: 600;
}

.stepper__item.is-done .stepper__label {
  color: var(--color-text-secondary);
}

@media (max-width: 430px) {
  .stepper__label {
    display: none;
  }

  .stepper__item.is-current .stepper__label {
    display: block;
  }
}
