@import './sidebar1-link';

@mixin keyframes($animation-name) {
  @-webkit-keyframes #{$animation-name} {
    @content;
  }
  @-moz-keyframes #{$animation-name} {
    @content;
  }  
  @-ms-keyframes #{$animation-name} {
    @content;
  }
  @-o-keyframes #{$animation-name} {
    @content;
  }  
  @keyframes #{$animation-name} {
    @content;
  }
}

@include keyframes(fadeIn) {
  0% {display:none; opacity:0;}
  1% {display:block; opacity:0;}
  100% {display:block; opacity:1;}
}
/*This is a fade out example. */
@include keyframes(fadeOut) {
  0% {display:block; opacity:1;}
  40% {display:none; opacity:1;}
  100% {display: none; opacity:0;}
}

@mixin animation($str) {
  -webkit-animation: #{$str};
  -moz-animation: #{$str};
  -ms-animation: #{$str};
  -o-animation: #{$str};
  animation: #{$str};      
}

@-webkit-keyframes slide-down {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-100%);
  }

  50% {
    opacity: 0;
    -webkit-transform: translateY(-50%);
  }

  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
  }
}

@-webkit-keyframes slide-up {
  0% {
    opacity: 1;
    -webkit-transform: translateY(0);
  }

  100% {
    opacity: 0;
    -webkit-transform: translateY(-100%);
  }
}

@-moz-keyframes slide-down {
  0% {
    opacity: 0;
    -moz-transform: translateY(-100%);
  }

  50% {
    opacity: 0;
    -webkit-transform: translateY(-50%);
  }

  100% {
    opacity: 1;
    -moz-transform: translateY(0);
  }
}

@-moz-keyframes slide-down {
  0% {
    opacity: 1;
    -webkit-transform: translateY(0);
  }

  100% {
    opacity: 0;
    -webkit-transform: translateY(-100%);
  }
}

.sidebar {
  position: fixed;
  top: 70px;
  left: 0;
  bottom: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  width: 250px;
  padding-bottom: 70px;
  font-family: 'Poppins', 'Montserrat',  sans-serif;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: .1px;

  &.minimized {
    width: 60px;
  }
}

.sidebar__wrapper {
  padding: 40px 20px 0;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.sidebar__top {
  display: none;
}

.sidebar__close {
  -ms-flex-negative: 0;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: 0 15px 0 -4px;
  font-size: 0;
}

.sidebar__close .icon {
  font-size: 18px;
  fill: #92929D;
}

.sidebar__top .sidebar__logo {
  font-size: 0;
}

.sidebar__top .sidebar__pic {
  width: 112px;

  img {
    max-height: 50px !important;
  }

  svg {
    max-height: 50px !important;
  }
}

.sidebar__top .sidebar__pic_white {
  display: none;
}

.sidebar__group {
  margin-bottom: 10px;
  padding-bottom: 30px;
}

.sidebar__group.bottom {
  margin-top: 10px;
  padding-top: 30px;
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar__category {
  position: relative;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  color: #92929D;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-transition: color .25s;
  -o-transition: color .25s;
  transition: color .25s;
}

.sidebar__category:before {
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 0px;
  height: 0px;
  border-style: solid;
  border-width: 7px 5.5px 0 5.5px;
  border-color: #92929D transparent transparent transparent;
  -webkit-transition: -webkit-transform .25s;
  transition: -webkit-transform .25s;
  -o-transition: transform .25s;
  transition: transform .25s;
  transition: transform .25s, -webkit-transform .25s;
}

.sidebar__category:hover {
  color: #B5B5BE;
}

.sidebar__group.active .sidebar__category:before {
  -webkit-transform: translateY(-50%) rotate(180deg);
  -ms-transform: translateY(-50%) rotate(180deg);
  transform: translateY(-50%) rotate(180deg);
}

.sidebar__inner {
  display: none;
  padding-top: 17px;
  /* transition: all 1s; */
  animation: slide-up .5s;
  /* @include animation('fadeOut 1s 1'); */

  &.active {
    display: block;
    /* @include animation('fadeIn 1s 1'); */
    animation: slide-down .5s;
  }
}

.sidebar__team:not(:last-child) {
  margin-bottom: 30px;
}

.sidebar__line {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  margin-bottom: 15px;
}

.sidebar__team .sidebar__logo {
  font-size: 0;
}

.sidebar__team .sidebar__pic {
  max-width: 32px;
  max-height: 32px;
  border-radius: 7px;
}

.sidebar__company {
  padding-left: 10px;
  line-height: 1.5;
}

.sidebar__add {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #0062FF;
  -webkit-transition: color .25s;
  -o-transition: color .25s;
  transition: color .25s;
}

.sidebar__add:hover {
  color: #50B5FF;
}

.sidebar__menu {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin: 0 -20px auto;
}

.sidebar a.sidebar__item, .sidebar__head {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  height: 52px;
  /* color: #171725; */
  -webkit-transition: color .25s;
  -o-transition: color .25s;
  transition: color .25s;
  cursor: pointer;
}

.sidebar a.sidebar__item {
  margin-bottom: 10px;
}

.sidebar a.sidebar__item .icon, .sidebar__head .icon, .subitem__icon {
  margin-right: 20px;
  font-size: 24px;
  fill: #92929D;
  -webkit-transition: fill .25s;
  -o-transition: fill .25s;
  transition: fill .25s;
}

.sidebar a.sidebar__item:before, .sidebar__head:before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 3px;
  height: 32px;
  border-radius: 0 3px 3px 0;
  /* background: #0062FF; */
  opacity: 0;
  -webkit-transition: opacity .25s;
  -o-transition: opacity .25s;
  transition: opacity .25s;
}

/* .sidebar a.sidebar__item:hover, .sidebar__head:hover {
  color: #0062FF;
} */

/* .sidebar a.sidebar__item:hover .icon, .sidebar__head:hover .icon {
  fill: #0062FF;
} */

.sidebar a.sidebar__item.active, .sidebar__head.active {
  opacity: 1;
}

.sidebar a.sidebar__item.active:before, .sidebar__head.active:before {
  opacity: 1;
}

/* .sidebar a.sidebar__item.active {
  color: #0062FF;
}

.sidebar a.sidebar__item.active .icon {
  fill: #0062FF;
} */

.sidebar__item {
  padding: 0 20px;
  cursor: 'pointer';
}

.sidebar__item:not(:last-child) {
  margin-bottom: 10px;
}

.sidebar__head {
  position: relative;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  cursor: pointer;
}

.sidebar__head:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 12px;
  height: 7px;
  /* background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath fill-rule='evenodd' d='M6 4.586L10.293.293a1 1 0 0 1 1.414 0 1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-5-5A1 1 0 1 1 1.707.293L6 4.586z' fill='%2392929d'/%3E%3C/svg%3E") no-repeat 0 0/100% auto; */
  -webkit-transition: -webkit-transform .25s;
  transition: -webkit-transform .25s;
  -o-transition: transform .25s;
  transition: transform .25s;
  transition: transform .25s, -webkit-transform .25s;
}

.sidebar__head:before {
  left: -20px;
}

.sidebar_expand_icon {
  position: absolute;
  top: 35%;
  right: -9px;
  padding: 0 6px;
  text-align: center;
  -webkit-transition: -webkit-transform .25s;
  transition: -webkit-transform .25s;
  -o-transition: transform .25s;
  transition: transform .25s;
  transition: transform .25s, -webkit-transform .25s;
}

.sidebar__item.active .sidebar_expand_icon {
  -webkit-transform: translate(-10%, -4px) rotate(90deg);
  -ms-transform: translate(-10%, -4px) rotate(90deg);
  transform: translate(-10%, -4px) rotate(90deg);
}

.sidebar__item.active .sidebar__head:before {
  opacity: 1;
}

.sidebar__item.active .sidebar__head:after {
  top: 40%;
  -webkit-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  transform: rotate(90deg);
}

.sidebar__item.disabled {
  cursor: not-allowed !important;
  opacity: 0.5;
}

.sidebar__counter {
  position: absolute;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  right: 20px;
  min-width: 32px;
  padding: 0 6px;
  border-radius: 12px;
  /* background: #FC5A5A; */
  text-align: center;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  line-height: 22px;
  color: #ffffff;
}

.sidebar__body {
  display: none;
  padding-left: 44px;
  animation: slide-up .5s;
  &.minimized {
    padding-left: 0px;
  }
}

.sidebar__item.active .sidebar__body {
  display: block;
  animation: slide-down .5s;
}

.sidebar__link__text {
  max-width: 100%;
  overflow-wrap: break-word;
}

.sidebar__link {
  position: relative;
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  height: 52px;
  padding-right: 30px;
  font-weight: 400;
  color: #171725;
  -webkit-transition: color .25s;
  -o-transition: color .25s;
  transition: color .25s;
}

.sidebar__number {
  position: absolute;
  top: 50%;
  right: 0;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  font-family: 'Roboto', sans-serif;
  letter-spacing: 0;
  font-weight: 500;
  color: #B5B5BE;
}

.sidebar .switch {
  position: absolute;
  left: 20px;
  bottom: 20px;
}

body.dark .sidebar {
  -webkit-box-shadow: inset -1px 0px 0px #292932;
  box-shadow: inset -1px 0px 0px #292932;
}

body.dark .sidebar__top {
  border-color: #44444F;
}

body.dark .sidebar__pic_black {
  display: none;
}

body.dark .sidebar__pic_white {
  display: inline-block;
}

body.dark .sidebar__category {
  color: #696974;
}

body.dark .sidebar__category:hover {
  color: #B5B5BE;
}

body.dark .sidebar__company {
  color: #FAFAFB;
}

body.dark .sidebar__add {
  color: #1E75FF;
}

body.dark .sidebar__add:hover {
  color: #50B5FF;
}

body.dark .sidebar__group {
  border-color: #44444F;
}

/* body.dark .sidebar .sidebar__item, body.dark .sidebar__head {
  color: #B5B5BE;
} */

/* body.dark .sidebar .sidebar__item:hover, body.dark .sidebar__head:hover {
  color: #FAFAFB;
}

body.dark .sidebar .sidebar__item:hover .icon, body.dark .sidebar__head:hover .icon {
  fill: #FAFAFB;
} */

/* body.dark .sidebar .sidebar__item:before, body.dark .sidebar__head:before {
  background: #FAFAFB;
} */

/* body.dark .sidebar .sidebar__item.active {
  color: #FAFAFB;
} */

/* body.dark .sidebar .sidebar__item.active .icon {
  fill: #FAFAFB;
} */

/* body.dark .sidebar__item.active .sidebar__head {
  color: #FAFAFB;
} */

/* body.dark .sidebar__item.active .sidebar__head .icon {
  fill: #FAFAFB;
} */

@media only screen and (max-width: 767px) {

  .sidebar .switch {
    bottom: 15px;
  }

  .sidebar a.sidebar__item, .sidebar__head {
    height: 44px;
  }

  .sidebar {
    padding: 60px 0 65px;
  }
  .sidebar__top {
    height: 60px;
  }
  .sidebar__close .icon {
    font-size: 16px;
  }
  .sidebar__group {
    padding-bottom: 20px;
  }
  .sidebar__team:not(:last-child) {
    margin-bottom: 20px;
  }
  
  .sidebar__link {
    height: 44px;
  }

}

@media only screen and (max-width: 1023px) {
  .sidebar {
    top: 0;
    z-index: 10;
    width: 280px;
    padding: 70px 0;
    -webkit-transform: translateX(-100%);
    -ms-transform: translateX(-100%);
    transform: translateX(-100%);
    -webkit-transition: -webkit-transform .25s;
    transition: -webkit-transform .25s;
    -o-transition: transform .25s;
    transition: transform .25s;
    transition: transform .25s, -webkit-transform .25s;
  }
  .sidebar.visible {
    -webkit-transform: translateX(0);
    -ms-transform: translateX(0);
    transform: translateX(0);
  }
  .sidebar__wrapper {
    padding: 20px 20px 0;
  }
  .sidebar__top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    height: 70px;
    padding: 0 20px;
    border-bottom: 1px solid #E2E2EA;
  }
}

@media only screen and (max-width: 1199px) {
  .sidebar__wrapper {
    padding-top: 35px;
  }
}