@import 'style/theming';
$icon-size: 1.25rem;

.menu {
  position: sticky;
  top: 3.2rem;
  left: 0;
  width: $menu-width;
  height: calc(100vh - 3.2rem);

  display: flex;
  flex-direction: column;
  row-gap: 1rem;
  flex-shrink: 0;

  padding: 1rem 0;
  z-index: 20;

  overflow: hidden;
  transition: width .35s;

  @include themed() {
    border-right: 1px solid t(border-color);
    color: t(foreground-color);
    background: t(background-color);

    :deep(svg) {
      fill: t(foreground-color);
    }
  }

  &--hidden {
    width: 0;
  }

  &__entries {
    display: flex;
    flex-direction: column;
    row-gap: 1.2rem;

    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    height: 80vh;
    padding: 0 1rem;
    margin-top: 1rem;
  }

  &__entry {
    // padding: .4rem 0;
    @include themed() {
      &:not(:last-child) {
        padding-bottom: 1rem;
        border-bottom: 1px solid t(border-color);
      }
    }
  }

  &__entry-name {
    font-size: .8rem;
    font-weight: bold;
    text-transform: uppercase;
  }

  &__subroute {
    display: flex;
    column-gap: .6rem;
    width: 100%;
    align-items: center;
    line-height: 100%;

    padding: .3rem .5rem;
    border: 2px solid transparent;
    border-radius: 5px;
    white-space: nowrap;

    @include themed() {
      &--current {
        border-color: t(foreground-color);
        // background: #2060fa;
      }
    }

    &:hover {
      background: #dedede;
    }

    :deep(svg) {
      width: $icon-size;
      fill: #000;
    }
  }

  &__subroute-title {
    white-space: nowrap;
    // opacity: .8;
  }
}
