@import '../../style/var';

.hl-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: $tag-height;
  padding: $tag-padding;
  color: $tag-text-color;
  font-size: $tag-font-size;
  line-height: normal;
  vertical-align: middle;
  border-radius: $tag-border-radius;

  &--default {
    background-color: $tag-default-color;

    &.hl-tag--plain {
      color: $tag-default-color;
    }
  }

  &--danger {
    background-color: $tag-danger-color;

    &.hl-tag--plain {
      color: $tag-danger-color;
    }
  }

  &--primary {
    background-color: $tag-primary-color;

    &.hl-tag--plain {
      color: $tag-primary-color;
    }
  }

  &--success {
    background-color: $tag-success-color;

    &.hl-tag--plain {
      color: $tag-success-color;
    }
  }

  &--warning {
    background-color: $tag-warning-color;

    &.hl-tag--plain {
      color: $tag-warning-color;
    }
  }

  &--plain {
    background-color: $tag-plain-background-color;

    &::before {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      border: 1px solid currentColor;
      border-radius: inherit;
      content: '';
      pointer-events: none;
    }
  }

  &--mark {
    border-radius: 0 $tag-round-border-radius $tag-round-border-radius 0;

    &::after {
      display: block;
      width: 2px;
      content: '';
    }
  }

  &--round {
    border-radius: $tag-round-border-radius;
  }

  &__close {
    width: 10px !important;
    height: 10px !important;
    margin-left: 4px;
    cursor: pointer;
  }
}
