@import '../../../../style/variables.less';

.pro-tree-select {
  .@{ant-prefix}-select-selector {
    // 单选树选择结果框里title不用待后缀
    .check-mark-icon {
      display: none;
    }
  }
  .@{ant-prefix}-select.@{ant-prefix}-select-single.@{ant-prefix}-select-show-arrow:not(
      .@{ant-prefix}-select-show-search
    ) {
    &.@{ant-prefix}-select-open {
      .@{ant-prefix}-select-arrow {
        transition: transform 300ms ease-in-out;
        transform: rotate(180deg);
      }
    }
  }
}
.pro-tree-select-drop-down-container {
  &.@{ant-prefix}-select-dropdown {
    .highlight-search-text {
      color: @zaui-brand;
    }
    .@{ant-prefix}-select-tree-list-holder-inner {
      position: relative !important;
    }
    &.@{ant-prefix}-tree-select-dropdown {
      width: auto !important;
      padding: 0px;
    }
    &.singal-tree,
    &.checkable-tree {
      .@{ant-prefix}-select-tree {
        .@{ant-prefix}-select-tree-treenode {
          padding-top: var(--zaui-space-size-xs);
          padding-bottom: var(--zaui-space-size-xs);
        }
      }
      .highlight {
        color: red;
      }
    }
    // 隐藏单选下拉树后面勾号
    .@{ant-prefix}-select-tree-node-content-wrapper {
      .check-mark-icon {
        display: none;
      }
    }
    // 单选
    &.signal-tree {
      .@{ant-prefix}-select-tree {
        .@{ant-prefix}-select-tree-treenode {
          position: relative;
          padding-right: 50px;
          padding-left: 7px;
          z-index: 0;
          &:after {
            content: '';
            display: none;
            position: absolute;
            z-index: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: @zaui-brand;
            opacity: 0.1;
          }
          &.@{ant-prefix}-select-tree-treenode-selected:after {
            display: block;
          }
        }
        .@{ant-prefix}-select-tree-treenode:hover {
          background-color: var(--zaui-disabled-bg);
        }
        .check-option-text {
          .check-mark-icon {
            position: absolute;
            right: -34px;
            top: 2px;
            display: none;
            color: var(--zaui-list-item-selected-bg);
          }
        }
      }
    }
    // 复选
    &.checkable-tree {
      .@{ant-prefix}-select-tree {
        .@{ant-prefix}-select-tree-treenode {
          padding-left: 7px;
        }
        .@{ant-prefix}-select-tree-treenode:hover {
          background-color: var(--zaui-disabled-bg);
        }
        .@{ant-prefix}-select-tree-node-content-wrapper {
          padding-right: var(--zaui-space-size-md);
        }
        .@{ant-prefix}-select-tree-node-content-wrapper:hover {
          background-color: transparent;
        }
        .@{ant-prefix}-select-tree-checkbox {
          margin-top: var(--zaui-space-size-xs);
          align-self: stretch;
        }
      }
    }
    // 数据小于10条
    &.ten-count-tree-node {
      .@{ant-prefix}-select-tree-switcher-noop {
        width: var(--zaui-space-size-xs);
      }
    }
  }
}

// ProTreeSelect 更多项数量样式
.pro-tree-more-count {
  color: var(--zaui-primary, #006aff);
  font-weight: bold;
}
