/**
* 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} {
  .component-css-vars-user();

  &.mini {
    height: 30px;
  }

  & &__select {
    width: 100%;

    .@{input-prefix-cls} {
      .@{svg-prefix-cls} {
        fill: var(--ti-user-svg-text-color);
      }

      &.is-disabled .@{svg-prefix-cls} {
        fill: var(--ti-input-normal-disabled-color);
      }
    }

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

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

  &_select {
    max-width: 50%;
    width: auto;
    font-size: var(--ti-user-font-size);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

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

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

  &__select-dropdown {
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
}
