// ----------------------------------------------
// SideBar Style
// ----------------------------------------------

.left-sidebar {
  width: $sidebar-width-full;
  background-color: $white;
  position: absolute;
  transition: .2s ease-in;
  height: 100%;
  z-index: 11;

  .scroll-sidebar {
    overflow-y: auto;
    padding: 0 16px;
    height: calc(100vh - 150px);
    border-radius: $border-radius;

    .simplebar-track.simplebar-horizontal {
      visibility: hidden !important;
    }
  }
}

.brand-logo {
  min-height: $header-height;
  padding: 0 28px;
}

.sidebar-divider {
  height: 0.5px;
  display: block;
  margin: 12px 0;
  background: var(--bs-border-color);
  width: 100%;
}

.unlimited-access {
  .unlimited-access-img {
    margin: 0 -30px 0 0;
  }
}

.nav-small-cap {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 0;
  line-height: 26px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bs-heading-color);

  .nav-small-cap-icon {
    display: none;
  }
}

.sidebar-nav {
  ul {
    .sidebar-item {
      .sidebar-link {
        display: flex;
        font-size: 15px;
        white-space: nowrap;
        align-items: center;
        line-height: 26px;
        position: relative;
        padding: 9px 16px;
        border-radius: $border-radius;
        gap: 10px;
        text-decoration: none;
        font-weight: $font-weight-normal;
        margin-bottom: 4px;

        span:first-child {
          display: flex;
        }

        iconify-icon {
          font-size: 18px;
        }

        .ti {
          flex-shrink: 0;
          font-size: 21px;
        }

        &:hover {
          color: var(--bs-primary);

          &.has-arrow::after {
            border-color: var(--bs-primary);
          }
        }
      }

      .sidebar-link.active {
        &:hover {
          &.has-arrow::after {
            border-color: var(--bs-primary);
          }
        }
      }

      .first-level {
        .sidebar-item {
          transition: all 0.4s ease-in-out;
          border-bottom: 0;

          .icon-small {
            width: 6px;
            height: 6px;
            border-radius: 100%;
            background: var(--bs-body-color);
          }

          .sidebar-link {
            &:hover {
              background-color: transparent;
              color: var(--bs-primary);

              .icon-small {
                background: var(--bs-primary);
              }
            }
          }

          .sidebar-link.active {
            &.has-arrow::after {
              border-color: var(--bs-primary);
            }

            .icon-small {
              background: var(--bs-primary);
            }
          }

          & > .sidebar-link {
            padding: 8px 21px;
            font-size: 14px;
            gap: 21px;

            .sidebar-icon {
              flex-shrink: 0;
              margin-left: 12px;
              margin-right: 35px;
              width: 14px;
              height: 14px;
            }
          }

          &:last-child {
            margin-bottom: 16px;
          }
        }

        .sidebar-link {
          .ti {
            font-size: 7px;
          }
        }
      }

      .first-level {
        .sidebar-item {
          .sidebar-link.active {
            background-color: transparent !important;
            color: var(--bs-primary) !important;
          }
        }
      }

      .two-level {
        .sidebar-item {
          .sidebar-link {
            padding: 8px 10px 8px 45px;
          }
        }
      }

      .three-level {
        .sidebar-item {
          .sidebar-link {
            padding: 8px 10px 8px 60px;
          }
        }
      }

      &.selected > .sidebar-link.active,
      &.selected > .sidebar-link,
      > .sidebar-link.active {
        background-color: $primary;
        color: $white;
        box-shadow: 0px 17px 20px -8px #4d5bec3b;
      }
    }

    .sidebar-item.selected {
      .sidebar-link.has-arrow {
        &::after {
          border-color: var(--bs-primary);
        }
      }
    }
  }
}

.collapse.in {
  display: block;
}



// Down arrow

.sidebar-nav .has-arrow {
  position: relative;

  &::after {
    position: absolute;
    content: "";
    width: 8px;
    height: 8px;
    border-width: 1px 0 0 1px;
    border-style: solid;
    border-color: var(--bs-dark-text-emphasis);
    margin-left: 10px;
    -webkit-transform: rotate(-135deg) translate(0, -50%);
    transform: rotate(-135deg) translate(0, -50%);
    -webkit-transform-origin: top;
    transform-origin: top;
    top: 20px;
    right: 17px;
    -webkit-transition: all 0.3s ease-out;
    transition: all 0.3s ease-out;
  }
}

.sidebar-nav li.active>.has-arrow::after,
.sidebar-nav li>.has-arrow.active::after,
.sidebar-nav .has-arrow[aria-expanded="true"]::after {
  border-color: var(--bs-primary);
}