Nest subcategories under their parent categories in the sidebar

I am wondering if we could maybe simplify this?

In Category Hider theme component a toggle was added to hide all subcategories

.hamburger-panel .category-link.subcategory {
      display:none;
}

Prior to this component I had manually his all subcategories targeting each one individually. Till someone shared a 1 line code that hid all subcategories

li.sidebar-section-link-wrapper {
  .category-link.subcategory {
    margin-left: 1em;
  }
}

Will test the above code momentarily.

Unfortunately this does not work. :sad_but_relieved_face:. Might there be a way to adjust this code to work?