/* Chip, ToggleChip, ChipGroup */
.chip {
  --chip-fg: var(--text-2);
  --chip-bg: rgb(148 170 220 / 0.12);
  --chip-line: rgb(148 170 220 / 0.22);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  color: var(--chip-fg);
  background: var(--chip-bg);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}
.chip--sm {
  height: 20px;
  padding: 0 7px;
  gap: 4px;
  font-size: var(--text-2xs);
  letter-spacing: 0.01em;
}
.chip--outline {
  background: transparent;
  border-color: var(--chip-line);
}
.chip--volt {
  --chip-fg: var(--volt-300);
  --chip-bg: rgb(205 245 69 / 0.13);
  --chip-line: rgb(205 245 69 / 0.4);
}
.chip--gold {
  --chip-fg: var(--gold-300);
  --chip-bg: rgb(245 200 76 / 0.14);
  --chip-line: rgb(245 200 76 / 0.45);
}
.chip--coral {
  --chip-fg: var(--coral-300);
  --chip-bg: rgb(255 111 97 / 0.14);
  --chip-line: rgb(255 111 97 / 0.45);
}
.chip--green {
  --chip-fg: var(--green-300);
  --chip-bg: rgb(61 220 132 / 0.14);
  --chip-line: rgb(61 220 132 / 0.45);
}
.chip--sky {
  --chip-fg: var(--sky-300);
  --chip-bg: rgb(92 200 255 / 0.14);
  --chip-line: rgb(92 200 255 / 0.45);
}
.chip--amber {
  --chip-fg: var(--amber-400);
  --chip-bg: rgb(255 181 71 / 0.14);
  --chip-line: rgb(255 181 71 / 0.45);
}
.chip--holo {
  --chip-fg: #e9e2ff;
  --chip-bg: linear-gradient(100deg, rgb(255 143 208 / 0.22), rgb(111 214 255 / 0.22));
  --chip-line: rgb(201 182 255 / 0.5);
}
.chip--solid {
  color: var(--text-inverse);
  background: var(--chip-fg);
}
.chip--neutral.chip--solid {
  color: var(--text-1);
  background: var(--surface-4);
}

/* NamePills: people as small pills that wrap (a manager's Connections and Known players, a
   player's Duos and Managers). In your XI: filled volt; otherwise outlined and muted. */
.name-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.name-pill {
  max-width: 100%;
}
.name-pill:not(.is-on) {
  color: var(--text-2);
}
.name-pill.is-on {
  color: var(--on-volt);
  background: var(--volt-300);
}
.name-pills__more {
  height: 20px;
  padding: 0 7px;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--volt-300);
  font: inherit;
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  cursor: pointer;
}
.name-pills__more:hover {
  text-decoration: underline;
}
@media (pointer: coarse) {
  /* A comfortable target without changing the pill's look. */
  .name-pills__more {
    position: relative;
  }
  .name-pills__more::after {
    content: '';
    position: absolute;
    inset: -12px -6px;
  }
}

/* ToggleChip */
.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}
.toggle-chip--sm {
  min-height: 30px;
  padding: 0 11px;
  font-size: var(--text-xs);
}
@media (pointer: coarse) {
  .toggle-chip,
  .toggle-chip--sm {
    min-height: var(--touch);
  }
}
.toggle-chip:hover:not(:disabled) {
  color: var(--text-1);
  border-color: var(--line-3);
}
.toggle-chip:focus-visible {
  border-radius: var(--radius-pill);
}
.toggle-chip.is-pressed {
  color: var(--on-volt);
  background: var(--volt-400);
  border-color: var(--volt-300);
}
.toggle-chip:disabled {
  opacity: 0.4;
}
.toggle-chip__count {
  min-width: 20px;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  background: rgb(148 170 220 / 0.16);
  font-family: var(--font-num);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-align: center;
}
.toggle-chip.is-pressed .toggle-chip__count {
  background: rgb(10 18 0 / 0.16);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chip-group--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 2px;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.chip-group--scroll::-webkit-scrollbar {
  display: none;
}
