// 
//  Sidebar
// 
.left-sidebar {
  position: absolute;
  width: $sidebar-width-full;
  height: 100%;
  top: 0px;
  z-index: 10;
  padding-top: 60px;
  background: $sidebar;
  box-shadow: $shadow;
  transition: 0.2s ease-in;
}

.material.left-sidebar{
  box-shadow: 1px 0px 20px rgba(0, 0, 0, 0.08);
}

// 
// Scroll Sidebar
// 
.scroll-sidebar {
  height: calc(100% - 20px);
  position: relative;
}

.ps-scrollbar-y-rail {
    z-index: 1;
}

.sidebar-nav {
  ul {
    .sidebar-item {
      width: $sidebar-width-full;
      background: inherit;
      .sidebar-link {
        color: $sidebar-text;
        padding: $sidebar-link-padding;
        display: flex;
        white-space: nowrap;
        align-items: center;
        line-height: 25px;
        opacity: 0.8;
        font-weight: 300;
        i {
          font-style: normal;
          width: 35px;
          line-height: 25px;
          font-size: $sidebar-icon-size;
          color: $sidebar-icons;
          display: inline-block;
          text-align: center;
        }
        &.active,
        &:hover {
          opacity: 1;
        }
      }
      .sidebar-link.profile-dd{
        opacity: 1;
        span{
          margin-left: 10px;
          color: $sidebar-text;
          opacity: 0.8;
        }
      }
      &:hover{
        background: rgba(0, 0, 0, 0.07);
      }
      &.selected > .sidebar-link {
        /*background: rgba(0, 0, 0, 0.04);*/
        opacity: 1;
        background-color: $danger;
        border-left:3px solid transparent;
        font-weight: 500;
      }
      // 
      // First level
      // 
      .first-level {
        // padding: $sidebar-first-level-padding;
        .sidebar-item {
          background: unset;
          &:hover{
            background: unset;
          }
        }
        .sidebar-item.active > .sidebar-link {
          opacity: 1;
          font-weight: 500;
        }
        .sidebar-item .sidebar-link {
          padding: $sidebar-first-level-link-padding;
          i {
            font-size: $sidebar-first-level-icon-size;
            visibility: hidden;
          }
        }
      }
    }
    // 
    // Small cap
    // 
    .nav-small-cap {
      font-size: 12px;
      padding: $sidebar-link-padding;
      white-space: nowrap;
      display: flex;
      align-items: center;
      line-height: 30px;
      margin-top: 10px;
      color: $sidebar-text;
      opacity: 1;
      text-transform: uppercase;
      i {
        line-height: 30px;
        margin: 0 5px;
      }
    }
  }
}

.user-profile{
  position: relative;
  z-index: 1;
}

// 
// Remove unnecessary margin-padding
// 
.sidebar-nav{
    ul {
    	margin: 0;
        padding-left: 0;
        li {
            list-style: none;
        }
    }
}
.collapse.in {
	display: block;
}

// 
// Down arrow
// 
.sidebar-nav .has-arrow {
	position: relative;
    &::after {
        position: absolute;
        content: '';
        width: 7px;
        height: 7px;
        border-width: 1px 0 0 1px;
        border-style: solid;
        border-color: $sidebar-text;
        margin-left: 10px;
        top: 26px;
        right: 15px;
        @extend %sidebar_arrow_transform;
    }
}

// Active state of sidebar down arrow
// ################################################
/*.sidebar-nav .active > .has-arrow::after,*/
/*.sidebar-nav li.selected > .has-arrow::after,*/
.sidebar-nav li.active > .has-arrow::after,
.sidebar-nav li > .has-arrow.active::after,
.sidebar-nav .has-arrow[aria-expanded="true"]::after {
    @extend %sidebar_arrow_active_transform;
}

// 
// User Profile
// 

.sidebar-nav .has-arrow.profile-dd{
  &::after{
    top: 33px;
    opacity: .8;
  }
} 

.sidebar-nav{
  .devider{
    margin: 7px 0;
    border-top: 1px solid $sidebar-text;
    opacity: .1;
  }
}