.Root {
  color: var(--demo-neutral-fg);
  --steps-size: 2.5rem;
  --steps-icon-size: 1rem;
  --steps-thickness: 2px;
  --steps-gutter: 0.75rem;

  display: flex;
  width: 100%;
  max-width: 32rem;

  &[data-orientation='horizontal'] {
    flex-direction: column;
    gap: 1rem;
  }

  &[data-orientation='vertical'] {
    flex-direction: row;
    min-height: 20rem;
    gap: 3rem;
  }
}

.List {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;

  &[data-orientation='vertical'] {
    flex-direction: column;
    align-items: flex-start;
  }
}

.Item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 0 0;

  &:last-of-type {
    flex: initial;

    & [data-part='separator'] {
      display: none;
    }
  }

  &[data-orientation='vertical'] {
    align-items: flex-start;
  }
}

.Trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--demo-neutral-fg);
  text-align: start;
  cursor: pointer;
  border-radius: 0.375rem;

  &:focus-visible {
    outline: 2px solid var(--demo-coral-focus-ring);
    outline-offset: 2px;
  }

  &[data-disabled] {
    opacity: 0.5;
    filter: grayscale(100%);
  }
}

.Indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--steps-size);
  height: var(--steps-size);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;

  & svg {
    flex-shrink: 0;
    width: var(--steps-icon-size);
    height: var(--steps-icon-size);
  }

  &[data-incomplete] {
    border: var(--steps-thickness) solid var(--demo-border-emphasized);
    background: transparent;
    color: var(--demo-neutral-fg);
  }

  &[data-current] {
    border: var(--steps-thickness) solid var(--demo-coral-solid);
    background: var(--demo-coral-muted);
    color: var(--demo-coral-fg);
  }

  &[data-complete] {
    border: var(--steps-thickness) solid var(--demo-coral-solid);
    background: var(--demo-coral-solid);
    color: var(--demo-coral-contrast);
  }
}

.Separator {
  flex: 1;
  height: var(--steps-thickness);
  background: var(--demo-border-emphasized);
  margin-inline: var(--steps-gutter);

  &[data-state='complete'] {
    background: var(--demo-coral-solid);
  }

  &[data-orientation='vertical'] {
    position: absolute;
    width: var(--steps-thickness);
    height: 100%;
    max-height: calc(100% - var(--steps-size) - var(--steps-gutter) * 2);
    top: calc(var(--steps-size) + var(--steps-gutter));
    left: calc(var(--steps-size) / 2 - 1px);
    margin-inline: 0;
  }
}

.Content {
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--demo-neutral-fg);
  background: var(--demo-neutral-subtle);
  border-radius: 0.5rem;
  min-height: 10rem;
  display: flex;
  align-items: center;
  justify-content: center;

  &:focus-visible {
    outline: 2px solid var(--demo-coral-focus-ring);
    outline-offset: -2px;
  }

  &[data-orientation='vertical'] {
    flex: 1;
  }
}

.CompletedContent {
  padding: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--demo-coral-fg);
  background: var(--demo-neutral-subtle);
  border-radius: 0.5rem;
  text-align: center;
  min-height: 10rem;
  display: flex;
  align-items: center;
  justify-content: center;

  &[data-orientation='vertical'] {
    flex: 1;
  }
}

.Title {
  font-weight: 500;
  color: var(--demo-neutral-fg);
}

.Description {
  font-size: 0.75rem;
  color: var(--demo-neutral-fg-muted);
}

.Actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
