/*-------------- sidebar -----------------*/
.sidebar{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 280px;
  height: 100%;
  background: $color-dark-blue;
  position: fixed;
  top: 0;
  left: -280px;
  overflow-y: auto;
  z-index: 100;
  transition: left 0.3s ease;


  &__bottom{
    height: 80px;
    padding: 10px 20px;
    border-top: 1px solid rgba(172, 178, 195, 0.3);

    .btn{
      padding: 0 30px;
    }
  }

  // &__btn{
  //     margin-bottom: 40px;
  // }

  // &__btn-item{
  //     margin-bottom: 20px;
  // }

  &__copyright{
    @include font(normal, normal, rem(12px), 1.43, #fff);
  }

  .ic-hamburger-arrow{
    fill: #fff;
  }

  &__top{
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 52px;
    padding: 11px 20px;
    margin-bottom: 25px;
  }

  &__logo{
    width: 109px;
  }
}

.sidebar-mail{
  display: flex;
  align-items: center;
  margin-bottom: 6px;

  &__icon{
    flex: 0 0 16px;
    margin-right: 5px;

    .icon{
      vertical-align: middle;
      width: 16px;
      height: 10px;
      fill: #fff;
    }
  }

  &__text{
    @include font(normal, 600, rem(12px), 1.43, #fff);
  }
}

.sidebar-menu{
  height: calc(100vh - 157px);
  overflow-y: auto;

  &__list,
  &__item,
  &__sub-list,
  &__sub-item{
    padding: 0;
    margin: 0;
    list-style: none;
  }

  &__list{position: relative;}

  &__list:not(:last-child){
    padding-bottom: 7px;
    margin-bottom: 12px;
  }

  &__item{
    margin-bottom: 6px;
  }

  &__main{
    display: flex;
    align-items: center;
    padding: 4px 10px 4px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
  }

  &__main::before{
    content: '';
    display: none;
    width: 6px;
    height: 100%;
    background: $color-purple;
    position: absolute;
    top: 0;
    left: 0;
  }

  &__main:hover{
    text-decoration: none;
    background: rgba(247,249,251,0.15);
  }

  &__img{
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-right: 12px;
  }

  &__icon{
    width: 30px;
  }

  .icon{
    fill: #fff;
    vertical-align: middle;
  }

  &__text{
    width: calc(100% - 80px);
    @include font(normal, normal, rem(14px), 1.43, #fff);
    margin-right: 10px;

    .ic-external-link{
      width: 16px;
      height: 16px;
    }
  }

  &__sub-content{
    padding-left: 40px;
    padding-top: 6px;

    .btn{
      min-width: 0;
      padding: 0 20px;
    }
  }

  &__sub-btn{
    margin-top: 8px;
    padding-left: 20px;
  }

  &__sub-item &__text{
    width: 100%;
    margin-right: 0;
  }

  &__sub-item:not(:last-child){margin-bottom: 5px;}

  &__item.open > &__sub-content{display: block;}
  &__item.open > &__main .ic-pager-arr-right{transform: rotate(90deg);}

  &__item.active > &__main::before,
  &__sub-item.active > &__main::before{
    display: inline-block;
  }

  &__item.active > &__main &__text,
  &__sub-item.active > &__main &__text{
    font-weight: 600;
  }
}

.open-sidebar{
  .header{
    width: calc(100% - 280px);

    &__info .hamburger{display: none;}
  }
  .sidebar{left: 0;}

  main{
    width: calc(100% - 280px);
    left: 280px;
    overflow: auto;
  }

  .footer{width: calc(100% - 280px);}

  .admin-table tr th.admin-table__item_data-sample,
  .admin-table tr th.admin-table__item_name-edit{
    width: 340px;
  }

  .event-map-table{
    .admin-table{
      &__item-prop{width: 200px;}
    }
  }
}

.sidebar-menu::-webkit-scrollbar-track{background-color: transparent}

.sidebar-link{
  &__item{
    display: flex;
    margin-bottom: 4px;
  }

  &__icon{
    flex: 0 0 16px;
    margin-right: 5px;

    .icon{
      max-height: 17px;
      vertical-align: top;
      fill: $color-blue;
    }
  }

  &__text{
    @include font(normal, 600, rem(12px), 1.2, $color-blue);
  }
}

@media (max-width: 1899px) {
  .open-sidebar{
    .admin-table tr th.admin-table__item_data-sample{width: 25%;}
    .admin-table tr th.admin-table__item_name-edit{width: 30%;}
  }
}

@media (max-width: 1480px) {
  .open-sidebar{
    .admin-table tr th.admin-table__item_data-sample{width: 20%;}
    .admin-table tr th.admin-table__item_name-edit{width: 25%;}
  }
}

@media (max-width: 1279px) {
  .open-sidebar{
    .admin-table tr th.admin-table__item_data-sample{width: 22%;}
    .admin-table tr th.admin-table__item_name-edit{width: 20%;}
  }
}

@media (max-width: 767px) {
  .sidebar{width: 275px;left: -275px;}

  .sidebar-menu{
    &__main, &__copyright{padding-left: 15px;}
  }

  .open-sidebar{
    .header{width: calc(100% - 275px);}

    main{
      width: calc(100% - 275px);
      left: 275px;

      // .content-page{
      // 	width: calc(100% + 275px);
      // }
    }
  }

  .open-sidebar{
    .admin-table tr th.admin-table__item_data-sample{width: 100%;}
    .admin-table tr th.admin-table__item_name-edit{width: 100%;}
  }
}
