/* Search bar */

.TreeView>input[type="search"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.05);
    height: 3em;
    border-width: 2px;
    transition: border 0.5s;
}

/* Elements */

.TreeView {
    /*box-shadow: 0px 0px 10px #DADADA;*/
    white-space: nowrap;
}

.TreeView ul {
    list-style: none;
}

.TreeView li {
    min-width: 100px;
    transition: all 0.25s ease-in-out;
}

.TreeView ul li a {
    color: #222;
}

.TreeView ul li>.item>a {
    display: inline-block;
    vertical-align: middle;
    width: calc(100% - 55px);
    margin-right: 30px;
    padding: 10px 5px;
    text-decoration: none;
    transition: all 0.25s;
}

.TreeView ul li:not(.disabled) {
    cursor: pointer;
}

.TreeView ul li.selected>.item>a {
    color: crimson;
}

.TreeView ul li.selected>.item>a:hover {
    color: #aaa;
}

.TreeView ul li:not(.disabled)>.item>a:hover {
    color: #e26f6f;
}


/* Root elements */

.TreeView ul.depth-0 {
    padding: 20px;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.4);
    user-select: none;
    transition: all 0.25s;
}


/* Categories : Nodes with children */

.TreeView li.category>.item {
    display: block;
    margin-bottom: 5px;
    transition: all 0.25s ease-in-out;
}

.TreeView li.category:not(.folded)>.item {
    border-bottom: 1px solid crimson;
}


/* Category opener */

.TreeView .opener {
    display: inline-block;
    vertical-align: middle;
    font-size: 20px;
    cursor: pointer;
}

.TreeView .opener::after {
    content: '+';
    display: block;
    transition: all 0.25s;
    font-family: monospace;
}

.TreeView li.category.async>.item>.opener::after {
    /*content: '!';*/
    content: '+';
}

.TreeView .opener:hover {
    color: #e26f6f;
}

.TreeView li.category:not(.folded)>.item>.opener::after {
    color: crimson;
    transform: rotate(45deg);
}

@keyframes spin {
    from {
        transform: rotate(0deg)
    }
    to {
        transform: rotate(360deg)
    }
}

.TreeView li.category.loading>.item>.opener::after {
    animation: spin 1s infinite;
}


/* Animations on fold / unfold */

.TreeViewTransition-enter, .TreeViewTransition-leave-to {
    opacity: 0;
    transform: translateX(-50px);
}

.TreeViewTransition-enter-active, .TreeViewTransition-leave-active {
    transition: all .3s ease-in-out;
}


/* Drag'n'drop */

.TreeView li.dragover, .TreeView ul.dragover {
    box-shadow: 0px 0px 5px #CCC
}

.TreeView ul.dragover {
    background-color: rgba(200, 200, 200, 0.3);
}

.TreeView li.dragover {
    background-color: rgba(100, 100, 100, 0.05);
    padding: 0px 5px;
}

.TreeView li.dragover>span.item {
    border-color: transparent;
}

.TreeView li.nodrop {
    box-shadow: 0px 0px 5px crimson;
    background-color: rgba(255, 20, 60, 0.1);
    padding: 0px 5px;
}
