@use '~@cypress/design-system' as *;

.nav {
  display: grid;
  grid-template-rows: auto 1fr;

  user-select: none;
  white-space: nowrap;

  > .ul {
    // don't hide the a11y box outline for the tree
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;

    overflow-x: hidden;
    overflow-y: auto;
  }
}

.searchInput {
  margin: spacing(m) spacing(s) spacing(s) spacing(s);
}

.ul {
  margin-block-start: 0;
  margin-block-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
  padding-inline-start: 0;
  &:before {
    display: none;
  }
}

.li.li {
  padding-left: 20px;
}


.ul, .li {
  @include text(ms);
  position: relative;
  list-style: none;
  padding: 0;
  line-height: 1.6;
}

.a {
  position: relative;
  color: unset;
  text-decoration: none;
  display: block;
  width: 100%;
  &:hover {
    background: $metal-05;
  }
}

.ul .ul::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: 3px;
  bottom: 0;
  top: 0;
  left: calc(1 * (#{text(xs)}));
  background-size: 3px 3px;
  background-image: radial-gradient(#999999 30%, transparent 0);
  background-position: center;
  display: block;
}

.ul .ul {
  margin-inline-start: text(xs);
}

.li svg {
  margin-right: 0.3em;
}
// TODO: fix this
// .folderIcon, .brandIcon {
//   margin-right: 1em;
// }

.isClosed {
  + .ul, + .li {
    display: none;
  }
}

.isSelected, .isSelected:hover {
  background: $chill-10;
}
