@root-entry-name: 'default';
@import (reference) '~antd/es/style/themes/index.less';

@pro-core-field-label: ~'@{ant-prefix}-pro-core-field-label';

.@{pro-core-field-label} {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 30px;
  padding: 0 4px;
  font-size: @font-size-base;
  line-height: 30px;
  border-radius: 2px;
  cursor: pointer;

  &:hover {
    background-color: fade(@black, 10%);
  }

  &-active {
    padding: 0 12px;
    background-color: fade(@black, 4%);
    &.@{pro-core-field-label}-allow-clear:hover:not(.@{pro-core-field-label}-disabled) {
      .@{pro-core-field-label}-arrow {
        display: none;
      }
      .@{pro-core-field-label}-close {
        display: inline-block;
      }
    }
  }

  &-icon {
    height: 12px;
    padding: 1px;
    color: fade(@black, 45%);
    font-size: 12px;
    vertical-align: middle;
    &.@{pro-core-field-label}-close {
      display: none;
      height: 14px;
      padding: 3px;
      color: @white;
      font-size: 8px;
      background-color: fade(@black, 25%);
      border-radius: 50%;
      &:hover {
        background-color: fade(@black, 45%);
      }
    }
  }

  &-disabled {
    color: fade(@black, 25%);
    cursor: not-allowed;

    .@{pro-core-field-label}-icon {
      color: fade(@black, 25%);
    }
  }

  &-small {
    height: 24px;
    padding: 0 4px;
    font-size: @font-size-sm;
    line-height: 24px;

    &.@{pro-core-field-label}-active {
      padding: 0 8px;
    }
    .@{pro-core-field-label}-icon {
      padding: 0;
    }
    .@{pro-core-field-label}-close {
      margin-top: -2px;
      padding: 3px;
      font-size: 6px;
    }
  }

  &-bordered {
    height: 32px;
    padding: 0 12px;
    border: @border-width-base solid @border-color-base;
    border-radius: @border-radius-base;
  }

  &-bordered&-small {
    height: 24px;
    padding: 0 8px;
  }

  &-bordered&-active {
    background-color: @white;
  }
}
