@import '../../../style/mixins/index';

@tag-prefix-cls: ~'@{vts-prefix}-tag';

.@{tag-prefix-cls} {
  .reset-component();

  display: inline-block;
  height: auto;
  margin-right: 8px;
  padding: 0 7px;
  font-size: @tag-font-size;
  line-height: @tag-line-height;
  white-space: nowrap;
  background: @tag-default-bg;
  color: @tag-default-color;
  border: @border-width-base @border-style-base @tag-default-color;
  border-radius: @tag-border-radius-base;
  opacity: 1;
  transition: all 0.3s;

  a, a:hover {
    color: inherit;
  }

  &:hover {
    opacity: 0.85;
  }

  > a:first-child:last-child {
    display: inline-block;
    margin: 0 -8px;
    padding: 0 8px;
  }

  &-close-icon {
    margin-left: @icon-margin;
    color: inherit;
    font-size: @tag-clear-icon-size;
    cursor: pointer;
    transition: all 0.3s;
  }

  &&-checkable {
    cursor: pointer;
    user-select: none;
    &-checked {
      color: @tag-checkable-default-color;
      background-color: @tag-checkable-default-bg;
      border: 1px solid transparent;
    }
  }

  &-hidden {
    display: none;
  }

  > .@{iconfont-css-prefix} + span,
  > span + .@{iconfont-css-prefix} {
    margin-left: @icon-margin;
  }

  .make-color-classes(@preset, @preset-bg, @preset-color) {
    &-@{preset} {
      background: @preset-bg;
      color: @preset-color;
      border: @border-width-base @border-style-base @preset-color;
    }
  }
  
  .make-color-classes(success, @tag-success-bg, @tag-success-color);
  .make-color-classes(warning, @tag-warning-bg, @tag-warning-color);
  .make-color-classes(error, @tag-error-bg, @tag-error-color);
  .make-color-classes(info, @tag-info-bg, @tag-info-color);
}

@import './rtl';
