/**
 *
 * This file may have been modified by Bytedance Inc. (“Bytedance Inc.'s Modifications”). 
 * All Bytedance Inc.'s Modifications are Copyright (year) Bytedance Inc..  
 * 
 * This source code is licensed under the Apache license.
 * See LICENSE file in the project root for license information.
 *
 */
// @import '../../style/themes/index';
// @import '../../style/mixins/index';
@import '../../../tree/style/base/mixin.less';
@import '../../../checkbox/style/base/mixin.less';

@tree-select-prefix-cls: ~'@{ant-prefix}-tree-select';
@select-tree-prefix-cls: ~'@{ant-prefix}-select-tree';

.antCheckboxFn(@checkbox-prefix-cls: ~'@{select-tree-prefix-cls}-checkbox');

.@{tree-select-prefix-cls} {
  // ======================= Dropdown =======================
  &-dropdown {
    padding: @padding-xs (@padding-xs / 2) 0;

    &-rtl {
      direction: rtl;
    }
    // ======================== Tree ========================
    .@{select-tree-prefix-cls} {
      border-radius: 0;

      &-list-holder-inner {
        align-items: stretch;

        .@{select-tree-prefix-cls}-treenode {
          padding-bottom: @padding-xs;

          .@{select-tree-prefix-cls}-node-content-wrapper {
            flex: auto;
          }
        }
      }
    }
  }
}

.@{select-tree-prefix-cls} {
  .antTreeFn(@select-tree-prefix-cls);

  // change switcher icon rotation in rtl direction
  & &-switcher {
    &_close {
      .@{select-tree-prefix-cls}-switcher-icon {
        svg {
          .@{tree-select-prefix-cls}-dropdown-rtl & {
            transform: rotate(90deg);
          }
        }
      }
    }

    &-loading-icon {
      .@{tree-select-prefix-cls}-dropdown-rtl & {
        transform: scaleY(-1);
      }
    }
  }
}
