/*
 * DD-06 Stage / milestone tracker — app/components/ui/stage_tracker_component.rb
 *
 * Vertical only (orientation is a param for forward-compat with a
 * horizontal treatment; none is specified yet). Nodes are 24px
 * --radius-round circles joined by a 2px connector column; the node grid
 * column is fixed-width so labels/rewards/actions all line up.
 */

.ui-stage-tracker {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.ui-stage-tracker__item {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: var(--space-4);
  padding-bottom: var(--space-6);
}

.ui-stage-tracker__item:last-child {
  padding-bottom: 0;
}

.ui-stage-tracker__connector {
  position: absolute;
  top: 24px;
  left: 11px;
  width: 2px;
  height: calc(100% - 24px);
  background: var(--color-surface-sunken);
}

.ui-stage-tracker__connector--filled {
  background: var(--color-success);
}

.ui-stage-tracker__connector--lost {
  background: var(--color-danger);
}

.ui-stage-tracker__node {
  grid-row: 1;
  grid-column: 1;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.ui-stage-tracker__node svg {
  display: block;
}

.ui-stage-tracker__node--complete {
  background: var(--color-success);
  color: var(--color-on-accent);
}

.ui-stage-tracker__node--current {
  background: var(--color-surface-solid);
  border: 2px solid var(--color-warning);
  color: var(--color-warning-ink);
}

.ui-stage-tracker__node--upcoming {
  background: var(--color-surface-sunken);
}

.ui-stage-tracker__node--skipped {
  background: var(--color-surface-sunken);
  color: var(--color-ink-soft);
}

.ui-stage-tracker__node--lost {
  background: var(--color-danger);
  color: var(--color-on-accent);
}

.ui-stage-tracker__node--dimmed {
  opacity: 0.5;
}

.ui-stage-tracker__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-top: 2px;
}

.ui-stage-tracker__label {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.ui-stage-tracker__label--complete {
  color: var(--color-ink);
  font-weight: 500;
}

.ui-stage-tracker__label--current {
  color: var(--color-warning-ink);
  font-weight: 500;
}

.ui-stage-tracker__label--upcoming {
  color: var(--color-ink-muted);
  font-weight: 400;
}

/*
 * --color-ink-soft is scope-restricted to decoration (spec §1.2) and is
 * 3.73:1 on white — these are real labels, so they take the muted ink. The
 * strikethrough (below) is what marks them skipped, not the colour.
 */
.ui-stage-tracker__label--skipped,
.ui-stage-tracker__label--lost {
  color: var(--color-ink-muted);
}

.ui-stage-tracker__label--skipped {
  text-decoration: line-through;
}

.ui-stage-tracker__reward {
  font-family: var(--font-sans);
  font-variant-numeric: var(--numeric-tabular);
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
}

.ui-stage-tracker__action {
  margin-top: var(--space-2);
}

/* Not-assigned state — the whole tracker becomes the caller's prompt slot */
.ui-stage-tracker--not-assigned {
  background: var(--color-surface-inset);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
}
