@import '../../style/themes/index';
@import '../../style/mixins/index';
@import '../../tree/style/mixin';
@import '../../checkbox/style/mixin';

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

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

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

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

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

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

  .@{select-prefix-cls} {
    &-label {
      padding-left: 9px;
    }
    &-selection-item {
      // margin-top: @select-multiple-item-spacing-half + 1px;
    }
  }
}

.@{select-prefix-cls}-flex-no-wrap {
  .@{select-prefix-cls}-label {
    padding-left: 0;
  }
}

.@{select-tree-prefix-cls} {
  .antTreeFn(@select-tree-prefix-cls);
  .@{select-tree-prefix-cls}-treenode {
    padding: @select-tree-treenode-padding;
    height: auto;
  }
  // 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);
      }
    }
  }
}
