@mixin transition() {
    transition: all 0.3s;
}
.user-tree {
    &-card {
        width: 380px;
        height: 455px;
    }
    &-item-user {
        text-align: center;
        &:hover {
            .user-tree-item-user-vs {
                opacity: 1;
            }
        }
        &-avatar {
            position: relative;
            display: inline-block;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
            border-radius: 50%;
            cursor: pointer;
        }
        &-sub-cont {
            position: absolute;
            right: 0;
            bottom: 0;
            width: 20px;
            height: 20px;
            line-height: 20px;
            border-radius: 50%;
            background: #00E099;
            color: #fff;
            font-size: 12px;
        }
        &-name {
            margin-top: 5px;
            font-size: 14px;
            line-height: 24px;
            cursor: default;
        }
        &-position {
            color: #000000;

        }
        &-vs {
            height: 20px;
            opacity: 0;
            span {
                display: inline-block;
                width: 44px;
                height: 20px;
                line-height: 20px;
                font-size: 12px;
                border-radius: 10px;
                color: #fff;
                background: #0E8CE6;
                vertical-align: top;
                cursor: pointer;
                &.gray {
                    cursor: default;
                    color: #fff;
                    background-color: #C2CBD1;
                }
            }
        }
        &.item-user-over{
            &:hover {
                .user-tree-item-user-position {
                    overflow: hidden;
                }
            }
        }

    }
    &-list {
        position: absolute;
        white-space: nowrap;
    }
    &-sup-level{
        height: 125px;
        z-index: 1000;
        * {
            @include transition();
        }
        &-sup-line {
            width: 167px;
            height: 30px;
            margin: 0 auto;
            margin-top: -15px;
            background: url('./img/sup-line.svg');
        }
        .user-tree-item-user {
            width: 60px;
            height: 110px;
            margin: 0 auto;
            &-user-avatar {
                width: 60px;
                height: 60px;
            }
            &-name {
                color: #3E4E59;
            }
        }
    }
    &-peer-level {
        position: relative;
        height: 200px;
        padding-top: 15px;
        overflow: hidden;
        z-index: 999;
        &.transition {
            * {
                @include transition();
            }
        }
        .user-tree {
            &-item-user {
                width: 80px;
                padding: 0 5px;
                display: inline-block;
                margin-top: 30px;
                vertical-align: top;
                &.current {
                    width: 150px;
                    margin-top: 0;
                    .user-tree-item-user {
                        &-user-avatar {
                            width: 100px;
                            height: 100px;
                        }
                        &-sub-cont {
                            width: 30px;
                            height: 30px;
                            line-height: 30px;
                            font-size: 20px;
                        }
                        &-name {
                            font-size: 20px;
                            line-height: 30px;
                            font-weight: bold;
                        }
                        &-position {
                            font-size: 14px;
                            line-height: 24px;
                            color: #000000;
                        }
                        &-vs {
                            height: 26px;
                            span {
                                width: 52px;
                                height: 26px;
                                font-size: 14px;
                                line-height: 26px;
                                border-radius: 13px;
                                &.gray {
                                    cursor: default;
                                    color: #fff;
                                    background-color: #C2CBD1;
                                }
                            }
                        }
                    }
                }
                &-user-avatar {
                    width: 50px;
                    height: 50px;
                    cursor: pointer;
                }
                &-name {
                    color: #0A131A;
                }
                &-position {
                    font-size: 12px;
                    line-height: 20px;
                    color: #3E4E59;
                    height: 0;
                }
            }  
        }
        &-move {
            position: absolute;
            top: 5px;
            height: 125px;
            width: 50px;
            z-index: 100;
            cursor: pointer;
            &.prev {
                left: 0px;
                background: url('./img/prev.svg');
                &:hover {
                    .prev-icon {
                        opacity: 1;
                    }
                }
            }
            &.next {
                right: 0px;
                background: url('./img/next.svg');
                &:hover {
                    .next-icon {
                        opacity: 1;
                    }
                }
            }
            
            &-icon {
                position: absolute;
                top: 60px;
                display: inline-block;
                width: 10px;
                height: 14px;
                opacity: 0;
                &.prev-icon {
                    left: 7px;
                    background: url('./img/prev-icon.svg');
                }
                &.next-icon {
                    right: 7px;
                    background: url('./img/next-icon.svg');
                }
            }
        }
    }
    &-sub-level {
        position: relative;
        height: 155px;
        overflow: hidden;
        margin-top: -25px;
        z-index: 998;
        &.transition {
            * {
                @include transition();
            }
        }
        &-sub-line {
            width: 246px;
            height: 36px;
            margin: 0 auto;
            margin-bottom: 10px;
            background: url('./img/sub-line.svg');
        }
        .user-tree-item-user {
            width: 70px;
            padding: 0 10px;
            display: inline-block;
            vertical-align: top;
            &-user-avatar {
                width: 50px;
                height: 50px;
                cursor: pointer;
            }
            &-name {
                color: #3E4E59;
                font-size: 12px;
                line-height: 20px;
            }
        }
        &-move {
            position: absolute;
            top: -5px;
            height: 125px;
            width: 50px;
            z-index: 100;
            cursor: pointer;
            &.prev {
                left: 0px;
                background: url('./img/prev.svg');
                &:hover {
                    .prev-icon {
                        opacity: 1;
                    }
                }
            }
            &.next {
                right: 0px;
                background: url('./img/next.svg');
                &:hover {
                    .next-icon {
                        opacity: 1;
                    }
                }
            }
            &-icon {
                position: absolute;
                top: 60px;
                display: inline-block;
                width: 10px;
                height: 14px;
                opacity: 0;
                &.prev-icon {
                    left: 7px;
                    background: url('./img/prev-icon.svg');
                }
                &.next-icon {
                    right: 7px;
                    background: url('./img/next-icon.svg');
                }
            }
        }
    }
    
}