// 搜索器
.pro-tree-searcher {
  height: 40px;
  background-color: #f2f2f2;
  margin-bottom: 5px;
  padding: 0 10px;
  padding-top: 5px;

  .skin-dark & {
    background-color: #2A3253;
  }
}
.pro-tree-searcher-inner {
  position: relative;
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  border-radius: 15px;
  background-color: #fff;
  padding: 0 10px;
  gap: 5px;

  .skin-dark & {
    background-color: #1b223e;

    input {
      background-color: #1b223e;
    }
  }
}
.pro-tree-searcher-input {
  width: 0;
  height: 100%;
  flex: 1;
  border: none;
  outline: none;
}
.pro-tree-searcher-clear {
  opacity: 0.8;
  &:hover {
    opacity: 1;
  }
}

// 树节点
.pro-tree-node {
  height: 100%;
  display: flex;
  align-items: center;
}
.pro-tree-node-content {
  width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}
.pro-tree-node-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

// 节点图标
.ant-tree-icon__customize .iconfont-box .zhny-iconfont {
  color: #f2b224;
  font-size: 16px;
  &:hover {
    color: #f2b224;
  }

  .skin-dark & {
    &:hover {
      color: #f2b224;
    }
  }
}

.ant-tree-node-content-wrapper {
  align-items: center;
}

// 节点叶子图标
.pro-tree-node-leaf-icon {
  color: #B2B2B2;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;

  .skin-dark & {
    color: #808596;
  }
}

// 节点操作项
.pro-tree-submenu-dropdown {
  min-width: 160px;
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0px 2px 10px 0px #bbbbbc;

  .skin-dark & {
    box-shadow: none;
    background: #2a3253;
  }
}
.pro-tree-submenu-item {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 20px;
  gap: 16px;
  cursor: pointer;

  .skin-dark & {
    color: #fff;
  }

  &.pro-tree-submenu-item-disabled {
    color: #cecece;
    cursor: not-allowed;
    .zhny-iconfont {
      color: #cecece;
    }
    .skin-dark & {
      .zhny-iconfont {
        color: #cecece;
      }
    }
  }

  .zhny-iconfont {
    .skin-dark & {
      color: #5e76d7;
    }
  }
  &:not(.pro-tree-submenu-item-disabled):hover {
    color: #4284e5;
    background-color: #eef0f3;
    .skin-red & {
      color: #ac0f15;
    }
    .skin-green & {
      color: #ca5636;
    }
    .skin-gray & {
      color: #eb7200;
    }
    .skin-dark & {
      color: #cad6ff;
      background: #4c557c;
    }
    .zhny-iconfont {
      color: #4284e5;
      .skin-red & {
        color: #ac0f15;
      }
      .skin-green & {
        color: #ca5636;
      }
      .skin-gray & {
        color: #eb7200;
      }
    }
  }
}
.pro-tree-submenu-item-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pro-tree-node-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;

  &.pro-tree-node-action-icon-hidden {
    display: none;
  }

  &.pro-tree-node-action-icon-disabled {
    cursor: not-allowed;
    .zhny-iconfont {
      color: #cecece;
    }
    .skin-dark & {
      .zhny-iconfont {
        color: #cecece;
      }
    }
  }

  .iconfont-box .zhny-iconfont {
    color: #666;
    .ant-tree-node-selected & {
      color: #666;
    }
    .skin-dark & {
      color: #95adff;
    }
  }

  &:hover {
    .zhny-iconfont {
      color: #4284e5;

      .skin-red & {
        color: #ac0f15;
      }
      .skin-green & {
        color: #ca5636;
      }
      .skin-gray & {
        color: #eb7200;
      }
    }
  }
}
.ant-tree .ant-tree-node-content-wrapper:hover {
  .pro-tree-node-action-icon.pro-tree-node-action-icon-hover {
    display: flex;
  }
}
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
  .pro-tree-node-action-icon.pro-tree-node-action-icon-selected {
    display: flex;
  }
}
