:host {
  --size-s: var(--wa-font-size-xs);
  --size-m: var(--wa-font-size-s);
  --size-l: var(--wa-font-size-m);

  display: inline-flex;
  border-radius: var(--wa-border-radius-m);
  align-items: center;
  background-color: var(--background-color, var(--wa-color-fill-quiet));
  border-color: var(--border-color, transparent);
  border-style: var(--wa-border-style);
  border-width: var(--wa-border-width-s);
  color: var(--text-color, var(--wa-color-on-normal));
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  height: calc(var(--wa-form-control-height) * 0.8);
  line-height: calc(var(--wa-form-control-height) - var(--wa-form-control-border-width) * 2);
  padding: 0 var(--wa-space-smaller);
}

[part='remove-button'] {
  color: inherit;
  padding: 0;
  margin-inline-start: 0.75em;
}

[part='remove-button']::part(base) {
  padding: 0;
}

:host(:hover) > wa-icon-button {
  color: color-mix(in oklab, var(--text-color), var(--wa-color-mix-hover));
}

:host(:active) > wa-icon-button {
  color: color-mix(in oklab, var(--text-color), var(--wa-color-mix-active));
}

/*
 * Pill modifier
 */

:host([pill]) {
  border-radius: var(--wa-border-radius-pill);
}
