@import "../../variables.scss";

.side-nav {
  background: $app-nav-bg;
  width: $sidebar-full-width;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;

  &__head {
    margin: $gap-size 0;
    padding-bottom: 5px;
    border-bottom: 1px solid $sidebar-separator-color;
  }

  &__brand {
    color: $sidebar-brand-color;
    text-decoration: none;
    display: block;
    font-size: 26px;
    line-height: 40px;
    font-weight: bold;
    padding-left: 40px;
    margin-bottom: 10px;
    margin-left: 10px;
    transition: all 0.3s;
    background-size: auto auto;
  }

  &__brand-text {
    padding: 0 $gap-size;
  }

  &__menu {
    margin: 0;
    left: 0;
    padding: 0;
    list-style-type: none;
    transition: width 0.3s;
  }

  &__footer {
    margin-top: auto;
    margin-bottom: $footer-gap-size;
    padding-left: 0;
    padding-right: 0;
  }

  &__item {
    display: block;
    font-size: 14px;
  }

  &__link,
  &__collapse {
    display: block;
    line-height: 24px;
    color: $text-muted-color;
    text-decoration: none;
    padding: 0.8em 0;
    position: relative;

    &_active {
      color: $sidebar-active-text-color;
      border-right: 4px solid $sidebar-active-accent-color;
    }
    &:hover {
      color: $sidebar-hover-text-color;
    }
  }

  &__icon {
    position: absolute;
    left: $gap-size;
    font-size: 22px;
    vertical-align: middle;
    margin: 0 3px;
  }
  &__text {
    padding-left: 55px;
    padding-right: 7px;
  }

  &__language-small {
    display: block;
    text-transform: capitalize;
    padding: 0 5px;
    text-overflow: ".";
    max-width: 30px;
    margin: 0 auto;
  }
  &__collapse {
    cursor: pointer;
    .side-nav__icon {
      left: $gap-size + 5px;
      transition: transform 0.1s;
    }
  }
  &_collapsed {
    width: $sidebar-collapsed;

    .side-nav__collapse .side-nav__icon {
      transform: rotate(180deg);
    }

    .side-nav__text,
    .side-nav__brand-text {
      visibility: hidden;
      opacity: 0;
    }

    .side-nav__collapse,
    .side-nav__link {
      white-space: nowrap;
    }
  }
}

.side-nav__brand {
  background: url("allure_logo.svg") no-repeat left center;
  background-size: 40px;
}
