@import 'common/var.scss';

.qf-tree {
  position: relative;
  cursor: default;
  background: #fff;
  color: #606266;

  .qf-tree__drop-indicator {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background-color: $--color-primary;
  }

  .qf-tree-node {
    white-space: nowrap;
    outline: none;

    &.is-drop-inner {
      > .qf-tree-node__content .qf-tree-node__label {
        background-color: $--color-primary;
        color: #fff;
      }
    }

    .qf-tree-node__content {
      display: flex;
      align-items: center;
      height: 26px;
      cursor: pointer;
      .qf-tree-node__expand-icon {
        cursor: pointer;
        color: #c0c4cc;
        padding: 6px;
        font-size: 12px;
        transform: rotate(-90deg);
        transition: transform .3s ease-in-out;
        &.expanded {
          transform: rotate(0deg);
        }
        &.is-leaf {
          color: transparent;
          cursor: default;
        }
      }
      .qf-checkbox {
        margin-right: 8px;
      }
      .qf-tree-node__label {
        flex: 1;
        font-size: 14px;
        width: 0;
        height: 100%;
        display: flex;
        align-items: center;

        span {
          display: block;
          width: 100%;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }

        &:hover {
          background-color: #F5F7FA;
        }
      }

      .is-active {
        color: #F93E61;
      }

      .is-hover {
        background-color: #F5F7FA;
      }
    }
  }
  &.qf-tree--highlight-current .qf-tree-node.is-current>.qf-tree-node__content {
    background-color: #f0f7ff;
  }
}
