/* align-content keeps a list stretched by its row (a grid of lists beside a
   taller one) from spreading the extra height into its chips. */
.choice-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  gap: var(--space-1) var(--space-2);
}

.choice-list-legend {
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* The hint takes a line of its own under the choices. */
.choice-list-hint {
  flex-basis: 100%;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--tap-dense);
  padding: 0 var(--space-2);
  border: var(--line-width) solid var(--line);
  border-radius: 999px;
  font-size: var(--text-sm);
  cursor: pointer;
}

.choice:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.choice-input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.choice-text {
  line-height: var(--leading-tight);
}

/* A picked item's count, inside its choice. Hidden while unchecked. */
.choice-quantity {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--ink-muted);
}

.choice-quantity[hidden] {
  display: none;
}

.choice-quantity-input {
  width: 3rem;
  padding: 0 var(--space-1);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
