[data-scope='tags-input'][data-part='root'] {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

[data-scope='tags-input'][data-part='label'] {
  display: block;
}

[data-scope='tags-input'][data-part='control'] {
  padding: 0 2px;
  background: #fff;
  border: 1px solid #ccc;
  width: 40em;
  border-radius: 2px;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);

  &[data-disabled] {
    background: #f9f9f9;
  }

  &[data-focus],
  &:focus {
    outline: 2px solid var(--ring-color);
    outline-offset: 2px;
  }

  svg {
    width: 1em;
    height: 1em;
  }
}

[data-scope='tags-input'][data-part='item'] {
  display: inline-block;
}

[data-scope='tags-input'][data-part='item-preview'] {
  background: #eee;
  color: #444;
  padding: 0 4px;
  margin: 2px;
  border: 1px solid #ccc;
  border-radius: 2px;
  font: inherit;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;

  &[hidden] {
    display: none !important;
  }

  &[data-highlighted] {
    background-color: #777;
    border-color: #777;
    color: #eee;
  }

  &[data-disabled] {
    opacity: 0.6;
    cursor: default;
  }
}

[data-scope='tags-input'][data-part*='input'] {
  appearance: none;
  padding: 3px;
  margin: 0;
  background: none;
  border: none;
  box-shadow: none;
  font: inherit;
  font-size: 100%;
  outline: none;
  display: inline-block !important;

  &[hidden] {
    display: none !important;
  }

  &:disabled {
    opacity: 0.6;
  }
}

[data-scope='tags-input'][data-part='item-delete-trigger'] {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-scope='tags-input'][data-part='clear-trigger'] {
  position: absolute;
  top: 0;
  right: 0.5px;
  bottom: 0;
  scale: 0.8;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  svg {
    scale: 1.2;
  }
}
