@import "../settings/variables";
@import "../tools/forms";

.token {
  align-items: center;
  background-color: $token-background-color;
  border: 1px solid transparent;
  border-radius: 200px;
  cursor: default;
  display: inline-flex;
  height: 24px;
  line-height: 1;
  max-width: 360px;
  min-width: 48px;
  padding: spacing(xs) spacing(md);

  &:hover,
  &--hover {
    background-color: $token-hover-background-color;
  }

  &:disabled,
  &--disabled {
    background-color: $token-icon-disabled;
    pointer-events: none;
  }

  &--focused {
    @include focus();
    background-color: $token-hover-background-color;

    .token__icon {
      background-color: $token-icon-hover-background-color;
      color: $token-hover-background-color;
    }
  }

  &--icon {
    min-width: 64px;
    padding-bottom: 2px;
    padding-right: 4px;
    padding-top: 2px;
  }

  &__icon {
    border-radius: 100%;
    color: $token-icon-color;
    cursor: pointer;
    font-size: $token-icon-size;
    flex: 0 0 auto;
    height: 16px;
    margin-bottom: 2px;
    margin-left: spacing(sm);
    margin-right: 1px;
    margin-top: 2px;
    text-align: center;
    width: 16px;

    &:hover,
    &--hover {
      background-color: $token-icon-hover-background-color;
      color: $token-hover-background-color;
    }
  }

  &__label {
    color: $token-label-color;
    flex: 0 1 auto;
    font-size: $token-label-font-size;
    line-height: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
