/* ActionBar — one compact row: lead, inline fields, action pinned right.
   One row whenever the bar is wide enough; when it is not (narrow pane, not
   only a narrow viewport) the items wrap instead of squeezing the fields. */

.action-bar {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3, var(--space-2));
  flex: 0 0 auto;
  min-width: 0;
  padding: var(--space-2) var(--space-3, var(--space-2));
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.action-bar__lead {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 0 0 auto;
  min-width: 0;
}

/* Inline fields keep a working width; leftover space stays between them and
   the pinned action instead of stretching a short select across the bar. */
.action-bar > .field {
  flex: 0 1 15rem;
  min-width: 0;
  max-width: none;
}

.action-bar > .field.action-bar__field--wide {
  flex: 0 1 22rem;
}

.action-bar > .muted {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
}

.action-bar > .btn,
.action-bar > .field-actions {
  flex: 0 0 auto;
}

/* The action pins right even without a field before it. */
.action-bar > :last-child {
  margin-left: auto;
}

.step-trail {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: var(--ui-text-xs, 0.75rem);
  white-space: nowrap;
}

.step-trail__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.step-trail__item.is-done {
  color: var(--text-label);
}

.step-trail__item.is-current {
  color: var(--text);
  font-weight: 600;
}

.step-trail__sep {
  color: var(--text-label);
}
