/**
* Copyright (c) 2022 - present TinyVue Authors.
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

@import '../custom.less';
@import './vars.less';

@user-prefix-cls: ~'@{css-prefix}user';
@tag-prefix-cls: ~'@{css-prefix}tag';
@input-prefix-cls: ~'@{css-prefix}input';
@select-prefix-cls: ~'@{css-prefix}select';
@svg-prefix-cls: ~'@{css-prefix}svg';

.@{user-prefix-cls} {
  .inject-User-vars();

  &.mini {
    height: 30px;
  }

  & &__select {
    width: 100%;

    .@{input-prefix-cls} {
      .@{svg-prefix-cls} {
        fill: var(--tv-User-svg-color);
      }

      &.is-disabled .@{svg-prefix-cls} {
        fill: var(--tv-User-svg-color-disabled);
      }
    }

    .@{select-prefix-cls}__input {
      height: 20px;
    }
  }

  & &__ghost {
    &.@{tag-prefix-cls} {
      background: var(--tv-User-tag-bg-color);
    }
  }

  &_select {
    max-width: calc(50% - 4px);
    width: auto;
    font-size: var(--tv-User-font-size);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    &.left {
      float: left;
      margin-right: 4px;
    }

    &.right {
      float: right;
      margin-left: 4px;
    }
  }

  &.draggableClass {
    .@{select-prefix-cls} {
      &__tags > span:not(.is-disabled),
      &__tags > span:not(.is-disabled) > span {
        display: inline-block;
      }
    }
  }
}
