/*
 * The small controls a player sets an option with: a number with minus and
 * plus, a row of either-or buttons, a list. Shared by the unit cards, the
 * Terminal, and the formation bar.
 */
.option,
.stepper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.option__label {
  flex: 1 0 100%;
  font: var(--text-xs) / 1.2 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.stepper .option__label {
  flex: 1;
}

/* A list, for an option with many choices. */
.option__pick {
  flex: 1;
  min-height: 2.25rem;
  padding: 0 var(--space-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-inner);
  background: var(--bg-1);
  color: var(--text);
  font: var(--text-sm) / 1.2 var(--font-ui);
}

.stepper__button,
.segment {
  min-height: 2.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-inner);
  background: var(--bg-1);
  color: var(--text);
  font: 600 var(--text-sm) / 1 var(--font-mono);
  cursor: pointer;
  transition:
    border-color var(--dur-instant) var(--ease-standard),
    background-color var(--dur-instant) var(--ease-standard),
    transform var(--dur-instant) var(--ease-standard);
}

.stepper__button {
  width: 2.25rem;
}

.stepper__button:hover,
.segment:hover {
  border-color: var(--accent-line);
}

.stepper__button:active,
.segment:active {
  transform: scale(0.95);
}

.stepper__value {
  min-width: 2.5ch;
  text-align: center;
  font-weight: 700;
}

.segments {
  display: flex;
  flex: 1;
  gap: 2px;
}

.segment {
  flex: 1;
  padding: 0 var(--space-2);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.segment[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

/* A choice or a step that cannot be taken yet. Its tooltip says why. */
.segment:disabled,
.stepper__button:disabled {
  color: var(--text-dim);
  border-style: dashed;
  opacity: 0.6;
  cursor: not-allowed;
}

.segment:disabled:hover,
.stepper__button:disabled:hover {
  border-color: var(--line-strong);
}

.segment:disabled:active,
.stepper__button:disabled:active {
  transform: none;
}

/* One line about the choice that is picked. */
.option__note {
  flex: 1 0 100%;
  font-size: var(--text-xs);
  line-height: 1.35;
  color: var(--text-dim);
}

.option__note[hidden] {
  display: none;
}
