@tree-prefix-cls: ~"@{css-prefix}tree";

.fade-in-linear-enter-active,
.fade-in-linear-leave-active {
  // transition: var(--el-transition-fade-linear);
  transition: opacity 0.2s linear;
}
.fade-in-linear-enter-from,
.fade-in-linear-leave-to {
  opacity: 0;
}
.haloe-fade-in-linear-enter-active,
.haloe-fade-in-linear-leave-active {
  // transition: var(--el-transition-fade-linear);
  transition: opacity 0.2s linear;
}
.haloe-fade-in-linear-enter-from,
.haloe-fade-in-linear-leave-to {
  opacity: 0;
}
.haloe-fade-in-enter-active,
.haloe-fade-in-leave-active {
  transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
}
.haloe-fade-in-enter-from,
.haloe-fade-in-leave-active {
  opacity: 0;
}
.haloe-zoom-in-center-enter-active,
.haloe-zoom-in-center-leave-active {
  transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
}
.haloe-zoom-in-center-enter-from,
.haloe-zoom-in-center-leave-active {
  opacity: 0;
  transform: scaleX(0);
}
.haloe-zoom-in-top-enter-active,
.haloe-zoom-in-top-leave-active {
  opacity: 1;
  transform: scaleY(1);
  // transition: var(--el-transition-md-fade);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  transform-origin: center top;
}
.haloe-zoom-in-top-enter-active[data-popper-placement^='top'],
.haloe-zoom-in-top-leave-active[data-popper-placement^='top'] {
  transform-origin: center bottom;
}
.haloe-zoom-in-top-enter-from,
.haloe-zoom-in-top-leave-active {
  opacity: 0;
  transform: scaleY(0);
}
.haloe-zoom-in-bottom-enter-active,
.haloe-zoom-in-bottom-leave-active {
  opacity: 1;
  transform: scaleY(1);
  // transition: var(--el-transition-md-fade);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  transform-origin: center bottom;
}
.haloe-zoom-in-bottom-enter-from,
.haloe-zoom-in-bottom-leave-active {
  opacity: 0;
  transform: scaleY(0);
}
.haloe-zoom-in-left-enter-active,
.haloe-zoom-in-left-leave-active {
  opacity: 1;
  transform: scale(1, 1);
  // transition: var(--el-transition-md-fade);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  transform-origin: top left;
}
.haloe-zoom-in-left-enter-from,
.haloe-zoom-in-left-leave-active {
  opacity: 0;
  transform: scale(0.45, 0.45);
}
.collapse-transition {
  transition: 0.3s height ease-in-out,
    0.3s padding-top ease-in-out,
    0.3s padding-bottom ease-in-out;
}
.haloe-collapse-transition-enter-active,
.haloe-collapse-transition-leave-active {
  transition: 0.3s max-height ease-in-out,
    0.3s padding-top ease-in-out,
    0.3s padding-bottom ease-in-out;
}
.horizontal-collapse-transition {
  transition: 0.3s width ease-in-out,
    0.3s padding-left ease-in-out,
    0.3s padding-right ease-in-out;
}
.haloe-list-enter-active,
.haloe-list-leave-active {
  transition: all 1s;
}
.haloe-list-enter-from,
.haloe-list-leave-to {
  opacity: 0;
  transform: translateY(-30px);
}
.haloe-list-leave-active {
  position: absolute !important;
}
.haloe-opacity-transition {
  transition: opacity 0.3s cubic-bezier(0.55, 0, 0.1, 1);
}
.haloe-tree {
  // --el-tree-node-hover-bg-color: #f5f7fa;;
  // // --el-tree-text-color: #606266;;
  // --el-tree-expand-icon-color:#a8abb2;;
}
.haloe-tree {
  position: relative;
  cursor: default;
  background: @color-functional-white;
  color: @font-900;
}
.haloe-tree__empty-block {
  position: relative;
  min-height: 60px;
  text-align: center;
  width: 100%;
  height: 100%;
}
.haloe-tree__empty-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #909399; // ★待定
  font-size: 14px;
}
.haloe-tree__drop-indicator {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  // background-color: var(--el-color-primary);
  background-color: #409eff; // ★待定
}

.haloe-tree-node {
  white-space: normal;
  outline: 0;
}
.haloe-tree-node:focus > .haloe-tree-node__content {
  background-color: fade(@blue-50, 40%);
  // color:#1A6AFF;
}
.haloe-tree-node.is-drop-inner > .haloe-tree-node__content .haloe-tree-node__label {
  // background-color: var(--el-color-primary);
  background-color: #409eff;; // ★待定
  color: @color-functional-white;
}
.haloe-tree-node__label{
  height: 28px;
  line-height: 28px;
  color:@font-900;
  white-space: normal;
  word-break: break-all;
}
.haloe-tree-node__content {
  display: flex;
  align-items: flex-start;
  min-height: 28px;
  line-height: 28px;
  cursor: pointer;
  flex-wrap: wrap;
}
.haloe-tree-node__content > .haloe-tree-node__expand-icon {
  padding: 4px;
  box-sizing: content-box;
}
.haloe-tree-node__content > label.haloe-checkbox {
  margin-right: 8px;
}
.haloe-tree-node__label:hover{
  background-color: @gray-50;
  border-radius: 4px;
}
.haloe-tree-node__content:hover {
  .haloe-tree-node__label{
    background-color: @gray-50;
    padding: 0 8px;
    border-radius: 4px;
  }
}
.haloe-tree.is-dragging .haloe-tree-node__content {
  cursor: move;
}
.haloe-tree.is-dragging .haloe-tree-node__content * {
  pointer-events: none;
}
.haloe-tree.is-dragging.is-drop-not-allow .haloe-tree-node__content {
  cursor: not-allowed;
}
.haloe-tree-node__expand-icon {
  cursor: pointer;
  color: @gray-800;
  font-size: 12px;
  transform: rotate(0);
  transition: transform 0.3s ease-in-out;
}
.haloe-tree-node__expand-icon.expanded {
  transform: rotate(90deg);
}
.haloe-tree-node__expand-icon.is-leaf {
  color: transparent;
  cursor: default;
}
.haloe-tree-node__expand-icon.is-hidden {
  visibility: hidden;
}
.haloe-tree-node__loading-icon {
  margin-right: 4px;
  margin-left: -10px;
  font-size: 14px;
  color: #a8abb2; // ★待定
}
.haloe-tree-node > .haloe-tree-node__children {
  overflow: hidden;
  background-color: transparent;
}
.haloe-tree-node.is-expanded > .haloe-tree-node__children {
  display: block;
}

.haloe-tree-node.is-expanded > .haloe-tree-border-left {
  position: relative;

  &::after {
    position: absolute;
    content: '';
    left: 18px;
    bottom: 0px;
    width:1px;
    height: 100%;
    background: @tree-color-border-line;
  }
}

.haloe-tree-border-horizontal {
  position: relative;

  &::before {
    position: absolute;
    content: '';
    left: 18px;
    top: 12px;
    width: var(--paddingLeft);
    height: 1px;
    background: @tree-color-border-line;
  }
}

.@{tree-prefix-cls} {
  &.@{tree-prefix-cls}--highlight-current {
    .@{tree-prefix-cls}-node.is-current
    > .@{tree-prefix-cls}-node__content {
      .haloe-tree-node__label{
        background-color: rgba(232, 240, 255, 0.4)
      }

    }
  }
}

.@{tree-prefix-cls} {
  .@{tree-prefix-cls}-node.is-disabled {
    > .@{tree-prefix-cls}-node__content {
      .@{tree-prefix-cls}-node__label {
        color: @font-500;
      }

      &:hover {
        cursor: not-allowed;
        background: none;
      }
    }

    &:focus {
      > .@{tree-prefix-cls}-node__content {
        background: none;
      }
    }
  }
}