/* Keep navigation usable before enhancement and if the dependency cannot load. */
#category-tree.category-tree-fallback ul {
    list-style: none;
    margin: 0;
    padding-left: 16px;
}
#category-tree.category-tree-fallback > ul { padding-left: 0; }
#category-tree.category-tree-fallback ul ul { display: none; }
#category-tree.category-tree-fallback li.expanded > ul { display: block; }
#category-tree.category-tree-fallback li > a {
    display: inline-block;
    padding: 3px 5px;
    color: #000;
    text-decoration: none;
}
#category-tree.category-tree-fallback li.selected > a,
#category-tree.category-tree-fallback li > a:hover,
#category-tree.category-tree-fallback li > a:focus-visible {
    background: #2b84c2;
    color: #fff;
}

/* Keep the native link unpainted; the existing title owns the single hover box. */
#category-tree a.category-tree-link {
    display: inline-block;
    vertical-align: top;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
}

/* Row hover must not highlight a title when the pointer is outside its link. */
#category-tree .fancytree-node > a.category-tree-link > .fancytree-title {
    background-color: transparent;
    border-color: transparent;
    color: #000;
}

#category-tree .fancytree-node.fancytree-selected > a.category-tree-link > .fancytree-title {
    background-color: #2b84c2;
    border-color: #2b84c2;
    color: #fff;
}

#category-tree .fancytree-node > a.category-tree-link:hover > .fancytree-title,
#category-tree .fancytree-node > a.category-tree-link:focus-visible > .fancytree-title {
    background-color: #1b72af;
    border-color: #1b72af;
    color: #fff;
}
