@import '../index.less';
@btri-tree-select: ~'@{ant-prefix}-btri-tree-select';
@btri-tree-select-dropdown: ~'@{ant-prefix}-btri-tree-select-dropdown';
@tree-select-prefix-cls: ~'@{ant-prefix}-tree-select';
@select-tree-prefix-cls: ~'@{ant-prefix}-select-tree';

.@{btri-tree-select} {
  &.@{tree-select-prefix-cls} {
    .@{ant-prefix}-select-selection-item-content {
      margin-right: 8px;
    }
    .@{ant-prefix}-select-selection-item {
      padding-inline-end: 8px;
    }
    .@{ant-prefix}-select-arrow {
      color: var(--caption-font);
    }
  }
  &-container {
    position: relative;
    .@{btri-tree-select}-direction-icon {
      position: absolute;
      right: 11px;
      top: calc(50% - 8px);
      font-size: 16px;
      color: var(--caption-font);
      &.active {
        color: var(--primary-6);
      }
    }
  }
}
// ======================= Dropdown =======================
.@{btri-tree-select-dropdown}.@{ant-prefix}-select-dropdown {
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  border: 1px solid var(--primary-2);
  // ======================== Tree ========================
  .@{ant-prefix}-select-tree-treenode {
    line-height: 32px;
    padding: 0 0 0 4px;
    border-radius: 4px;
    .@{ant-prefix}-select-tree-node-content-wrapper {
      line-height: 32px;
    }
    .@{ant-prefix}-select-tree-switcher {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
    }
    &:hover {
      background-color: var(--gray-blue-2);
    }
    &.@{ant-prefix}-select-tree-treenode-selected {
      background-color: var(--primary-1);
    }
    .@{ant-prefix}-select-tree-checkbox-indeterminate {
      .@{ant-prefix}-select-tree-checkbox-inner {
        background-color: var(--primary-6);
        border-color: var(--primary-6);
        &::after {
          height: 2px;
          background-color: var(--bg-2);
        }
      }
    }
  }
  .@{ant-prefix}-select-tree-checkbox {
    display: flex;
    align-items: center;
    height: 32px;
    margin: 0;
    width: 20px;
  }
  .@{ant-prefix}-select-tree-checkbox-checked::after {
    border-color: transparent;
  }
}

.@{select-tree-prefix-cls} {
  .@{select-tree-prefix-cls}-node-content-wrapper.@{select-tree-prefix-cls}-node-selected {
    color: var(--primary-6);
  }
}
