@import "mixins/mixins";
@import "common/var";

@include b(virtual-tree) {
    cursor: default;
    background: $--color-white;
    color: $--tree-font-color;
    .el-virtual-tree-ceil {
        cursor: pointer;
        &.el-virtual-tree--highlight-current > .el-virtual-tree-ceil__content.is-current {
            background-color: mix($--color-white, $--color-primary, 92%);
        }
        .el-virtual-tree-ceil__content {
            // width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            overflow:hidden; //超出的文本隐藏
            text-overflow:ellipsis; //溢出用省略号显示
            white-space:nowrap; //溢出不换行
            &.is-current {
                background-color: $--tree-node-hover-background-color;
            }
            &.foucs {
                background-color: $--tree-node-hover-background-color;
            }
            &:hover {
                background-color: $--tree-node-hover-background-color;
            }

            label.el-checkbox {
                margin-right: 8px;
            }

            .el-virtual-tree-ceil-text {
                font-size: $--font-size-base;
            }

            .el-virtual-tree-ceil-icon {
                padding: 6px;
                cursor: pointer;
                color: $--tree-expand-icon-color;
                font-size: 12px;
                text-indent: 0px;
    
                transform: rotate(0deg);
                transition: transform 0.3s ease-in-out;
    
                &.expanded {
                    transform: rotate(90deg);
                }
    
                &.is-leaf {
                    color: transparent;
                    cursor: default;
                }
            }
        }
    }

    @include e(empty-block) {
        position: relative;
        min-height: 60px;
        text-align: center;
        width: 100%;
        height: 100%;
    }
    
    @include e(empty-text) {
        position: absolute;
        left: 50%;
        top: 0%;
        transform: translate(-50%, 0);
        color: $--color-text-secondary;
        font-size: $--font-size-base;
    }
}
