/* ============================================================
   ASTROLOOP OPEN MCT SIDEBAR SELECTION FIX
   Highlight only the selected ROW, never the whole subtree.
   ============================================================ */


/* ------------------------------------------------------------
   1. OUTER TREE ITEMS
   Never paint these because they may contain child tree items.
   ------------------------------------------------------------ */

html[data-astroloop-shell="true"]
#app
.c-tree__item,

html[data-astroloop-shell="true"]
#app
.c-tree__item.is-selected,

html[data-astroloop-shell="true"]
#app
.c-tree__item.selected,

html[data-astroloop-shell="true"]
#app
.c-tree__item.c-tree__item--selected,

html[data-astroloop-shell="true"]
#app
.c-tree__item[aria-selected="true"] {
    background: transparent !important;
    background-color: transparent !important;
}


/* ------------------------------------------------------------
   2. NORMAL CLICKABLE ROW
   ------------------------------------------------------------ */

html[data-astroloop-shell="true"]
#app
.c-tree__item > .c-object-label,

html[data-astroloop-shell="true"]
#app
.c-tree__item > .c-tree__item__row,

html[data-astroloop-shell="true"]
#app
.c-tree__item > .c-tree__item__content {
    background: transparent !important;
    background-color: transparent !important;
}


/* ------------------------------------------------------------
   3. HOVER
   Apply hover only to the actual row/label.
   ------------------------------------------------------------ */

html[data-astroloop-shell="true"]
#app
.c-tree__item > .c-object-label:hover,

html[data-astroloop-shell="true"]
#app
.c-tree__item > .c-tree__item__row:hover,

html[data-astroloop-shell="true"]
#app
.c-tree__item > .c-tree__item__content:hover {
    background: rgba(113, 128, 135, 0.18) !important;
    background-color: rgba(113, 128, 135, 0.18) !important;
}


/* ------------------------------------------------------------
   4. SELECTED TREE ROW
   Background goes ONLY on the immediate child row.
   ------------------------------------------------------------ */

html[data-astroloop-shell="true"]
#app
.c-tree__item.is-selected > .c-object-label,

html[data-astroloop-shell="true"]
#app
.c-tree__item.selected > .c-object-label,

html[data-astroloop-shell="true"]
#app
.c-tree__item.c-tree__item--selected > .c-object-label,

html[data-astroloop-shell="true"]
#app
.c-tree__item[aria-selected="true"] > .c-object-label,

html[data-astroloop-shell="true"]
#app
.c-tree__item.is-selected > .c-tree__item__row,

html[data-astroloop-shell="true"]
#app
.c-tree__item.selected > .c-tree__item__row,

html[data-astroloop-shell="true"]
#app
.c-tree__item.c-tree__item--selected > .c-tree__item__row,

html[data-astroloop-shell="true"]
#app
.c-tree__item[aria-selected="true"] > .c-tree__item__row,

html[data-astroloop-shell="true"]
#app
.c-tree__item.is-selected > .c-tree__item__content,

html[data-astroloop-shell="true"]
#app
.c-tree__item.selected > .c-tree__item__content,

html[data-astroloop-shell="true"]
#app
.c-tree__item.c-tree__item--selected > .c-tree__item__content,

html[data-astroloop-shell="true"]
#app
.c-tree__item[aria-selected="true"] > .c-tree__item__content {
    background: #626a6e !important;
    background-color: #626a6e !important;
}


/* ------------------------------------------------------------
   5. Some Open MCT versions put selection directly on label.
   ------------------------------------------------------------ */

html[data-astroloop-shell="true"]
#app
.c-object-label.is-selected,

html[data-astroloop-shell="true"]
#app
.c-object-label.selected,

html[data-astroloop-shell="true"]
#app
.c-object-label[aria-selected="true"] {
    background: #626a6e !important;
    background-color: #626a6e !important;
}


/* Children of selected objects MUST remain transparent. */

html[data-astroloop-shell="true"]
#app
.c-tree__item.is-selected
.c-tree
.c-tree__item,

html[data-astroloop-shell="true"]
#app
.c-tree__item.is-selected
.c-tree
.c-object-label {
    background: transparent !important;
    background-color: transparent !important;
}

