$thesaurusTabHeight: $subTabHeight !default;
.treeview {
    li {
        color: $mediumTextColor;
        vertical-align: middle;
        background-image: none;
    }
    > li.expandable {
        min-height: 50px;
        line-height: 47px;
        vertical-align: middle;
        position: relative;
        background: none;
        padding-top: 0;
        padding-bottom: 0;
        border-bottom: 1px solid $mediumBorderColor;
        > .hitarea {
            height: 51px;
            background: url('#{$iconsPath}sprite_tree_first.png') 99% 22px
                no-repeat;
            border-left: 5px $mediumBackgroundColor solid;
            &:hover,
            &.active {
                border-left: 5px $thesaurusColor solid;
            }
        }
    }
    .hitarea {
        background: none;
        width: 100%;
        height: 100%;
        position: absolute;
    }
    ul {
        li {
            .hitarea {
                background: url('#{$iconsPath}icon_tree.png') 0 0 no-repeat;
                position: relative;
                height: 9px;
                width: 9px;
                margin-top: 5px;
            }
/*
            &:hover {
                color: $textPrimaryColor;
            }
            span {
                color: $mediumTextColor;
                .dragOver {
                    background-color: $highlightBackgroundColor;
                    color: $highlightTextColor;
                }
            }
*/
        }
    }
}

#THPD_T_treeBox,
#THPD_C_treeBox {
    font-size: $xmediumFontSize;
    overflow-x: hidden;
    overflow-y: hidden;
    > div {
        width: 100%;
        display: inline-block;
    }
    &:hover {
        overflow-y: auto;
    }
}

#THPD_T_treeBox::-webkit-scrollbar-track,
#THPD_C_treeBox::-webkit-scrollbar-track {
    border-radius: 0;
    background-color: #1f1f1f;
}

#THPD_T_treeBox::-webkit-scrollbar,
#THPD_C_treeBox::-webkit-scrollbar {
    width: 6px;
    background-color: #474747;
    display: none;
}

/* ==================================
dans l'onglet thesaurus : arbres, menus contextuels
===================================== */
.ui-tabs {
    #thesaurus_tab {
        top: $tabHeight !important;
        border-top: 1px solid $darkBorderColor;
    }
}

#THPD_tabs {
    right: 0;

    .ui-tabs-nav {
        li.th_tab {
            a {
                color: $textPrimaryColor;
            }
            &.th_tab {
                height: $thesaurusTabHeight; // in order to display bottom border
                margin: 0;
                //border-bottom: 1px solid transparent;
                //box-sizing: border-box;
                &.ui-state-active {
                    border-bottom: 3px solid $thesaurusColor;
                }
                a {
                    height: $thesaurusTabHeight;
                    line-height: $thesaurusTabHeight;
                    vertical-align: middle;
                    margin: 0;
                    padding: 0 20px;
                    display: block;
                    text-decoration: none;
                    box-sizing: border-box;
                    border-bottom: 1px solid #303030;
                }
            }
        }
        .ui-state-default A {
            color: $thesaurusContextMenuColor;
        }
        .ui-tabs-active A {
            color: $textPrimaryActiveColor;
            text-decoration: underline;
        }
    }
    .treeview {
        -moz-user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
        user-select: none;
        ul {
            background-color: $darkBackgroundColor;
            margin-left: -16px;
            padding-left: 16px;
            li {
                padding-top: 5px;
                padding-bottom: 5px;
            }
        }
        span.tx_term {
            cursor: pointer;
            color: $mediumTextColor;
            &.h {
                // highlighted (filtered as matching the filter input)
                color: $thesaurusColor;
                font-weight: bold;
            }
            &:hover {
                color: $highlightTextColor;
            }
            /*
            &.dragOver {
                // highlited as a target for dropping
                background-color: $highlightBackgroundColor;
                color: $highlightTextColor;
            }
            */
        }
        /*
        i {
            // count of hits
            color: #80ff80;
            background-color: #606060;
            font-style: normal;
            margin-left: 10px;
            padding-left: 3px;
            padding-right: 3px;
            font-family: courier;
        }
        */
    }
/*
    .treeview LI.selected SPAN {
        background-color: $thesaurusColor !important;
        color: $textPrimaryActiveColor !important;
    }

    .treeview LI.selected SPAN {
        background-color: #ff0000;
    }

    .treeview LI.selected LI SPAN {
        background-color: transparent;
    }

    .context-menu-item-disabled {
        background-color: #ff0000;
    }

 */
}

#THPD_T_tree {
    span.tx_term {
        /*
        cursor: pointer;
        color: $mediumTextColor;
        &.h {
            // highlighted (filtered as matching the filter input)
            color: $thesaurusColor;
            font-weight: bold;
        }
        &:hover {
            color: $highlightTextColor;
        }
        */
        /*
        &.dragOver {
            // highlited as a target for dropping
            background-color: $highlightBackgroundColor;
            color: $highlightTextColor;
        }
        */
    }
    &.draggingOver {
        // something is currently dragged over, we change some hover

        // background-color: #000; // debug purpose

        cursor: not-allowed;
        /*
        &:hover {
            // background-color: #8F0000; // debug purpose
            cursor: not-allowed;
        }
        */
        /*  debug purpose
        span.tx_term:hover {
            color: #ff00ff;
        }
        */

        span.tx_term {
            // color: #7a43b6;          // debug purpose
            color: $mediumTextColor;    // no more highlight
            cursor: not-allowed;
            /*   debug purpose
            &:hover {
                color: #f9a732;
            }
            */
        }

        LI.draggingOver {

            // background-color: #00FF00; // debug purpose

            cursor: default;
            /*
            &:hover {
                // background-color: #008F00; // debug purpose
                cursor: default;
            }
            */
            span.tx_term {
                cursor: copy;

                &:hover {   // NOT WORKING IN SAFARI / WEBKIT : the :hover seems not applied when dragging (click down)
                    // background-color: $highlightBackgroundColor;
                    color: $highlightTextColor;
                    // color: #fceb3f;          // debug purpose
                }
            }
        }
    }
}

#idFrameC .ui-tabs {
    #THPD_C.ui-tabs-panel,
    #THPD_T.ui-tabs-panel {
        top: 46px;
    }
}

#THPD_T,
#THPD_C {
    // margin-top: 10px;
    margin-left: 0px;
}

#THPD_WIZARDS {
    .gform {
        .input-append {
            width: 100%;
            margin: 0;
            padding: 0;
            border: 1px solid $mediumBorderColor;
            border-top: none;
            input.input-medium {
                width: 80%;
                border-radius: 0;
                height: 40px;
                padding: 0 2.5%;
                background: $thesaurusInputBackground;
                border: none;
                float: left;
                margin: 0;
            }
            .th_ok {
                display: none;
                width: 15%;
                line-height: 40px;
                vertical-align: middle;
                padding: 0;
                border-radius: 0;
                background-color: $mediumBackgroundColor;
                color: $mediumTextColor;
                border: none;
                margin: 0;
                outline: none;
                float: left;
                box-shadow: none;
                -webkit-appearance: none;
                -moz-appearance: none;
            }
            .th_cancel {
                display: none;
                width: 15%;
                line-height: 40px;
                vertical-align: middle;
                padding: 0;
                border-radius: 0;
                background-color: $mediumBackgroundColor;
                color: $mediumTextColor;
                border: none;
                margin: 0;
                outline: none;
                float: left;
                box-shadow: none;
                -webkit-appearance: none;
                -moz-appearance: none;
            }
            .th_clear {
                position: relative;
                z-index: 1000;
                float: right;
                margin: -40px 15% 0 0;
                display: none;
                width: 30px;
                line-height: 40px;
                padding: 0;
                border-radius: 0;
                background: url('#{$iconsPath}icon_clear_search.png') 50%
                    no-repeat;
                border: none;
                outline: none;
                box-shadow: none;
                -webkit-appearance: none;
            }
        }
    }
}
