/* Common styles for the tree items */
.treeview .list-group-item {
    cursor: pointer;
    position: relative; /* needed for the absolute lines */
  }
  
  /* LTR: left-side lines, left-aligned text, left padding */
  [dir="ltr"] .treeview .list-group-item {
    text-align: left;
    padding-left: 2rem !important; /* space on the left for lines/icons */
  }
  
  /* RTL: right-side lines, right-aligned text, right padding */
  [dir="rtl"] .treeview .list-group-item {
    text-align: right;
    padding-right: 2rem !important; /* space on the right for lines/icons */
  }
  
  /* ---------- LTR Lines ---------- */
  [dir="ltr"] .treeview .list-group-item::before {
    content: "";
    position: absolute;
    left: 1rem;                  /* vertical line position in LTR */
    border-left: 1px solid #ccc; /* vertical line style */
    height: 100%;
    top: 0;
  }
  [dir="ltr"] .treeview .list-group-item::after {
    content: "";
    position: absolute;
    left: 1rem;                  /* horizontal line start in LTR */
    border-top: 1px solid #ccc;  /* horizontal line style */
    width: 1rem;
    top: 1rem;
  }
  [dir="ltr"] .treeview .list-group-item:last-child::before {
    height: 1rem; /* stop vertical line for the last child */
  }
  
  /* ---------- RTL Lines ---------- */
  [dir="rtl"] .treeview .list-group-item::before {
    content: "";
    position: absolute;
    right: 1rem;                  /* vertical line position in RTL */
    border-right: 1px solid #ccc; /* vertical line style */
    height: 100%;
    top: 0;
  }
  [dir="rtl"] .treeview .list-group-item::after {
    content: "";
    position: absolute;
    right: 1rem;                  /* horizontal line start in RTL */
    border-top: 1px solid #ccc;   /* horizontal line style */
    width: 1rem;
    top: 1rem;
  }
  [dir="rtl"] .treeview .list-group-item:last-child::before {
    height: 1rem;
  }
  .child-highlight {
  background-color: #d4edda!important; /* Light green background */
}