//
// SideBar Style
//
.side-mini-panel {
  position: fixed;
  left: 0px;
  width: $sidebar-width-mini;
  height: 100%;
  background: var(--bs-white);
  top: 0;
  z-index: 99;
  transition: all 0.4s ease-in-out;

  .sidebartoggler {
    color: var(--bs-dark-text-emphasis);
  }

  .scroll-sidebar {
    overflow-y: auto;
    height: calc(100vh - 50px);

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

  // iconbar
  .mini-nav {
    height: 100vh;
    z-index: 99;
    position: relative;
    background: $themeBodyBg;

    ul.mini-nav-ul {
      height: calc(100vh - 70px);
    }

    .mini-nav-item {
      > a {
        display: flex;
        width: 100%;
        font-size: 18px;
        text-align: center;
        color: var(--bs-body-color);
        position: relative;
        background: $themeBodyBg;
        z-index: 99;
        height: 48px;
        margin-bottom: 8px;
        align-items: center;
        justify-content: center;

        iconify-icon {
          z-index: 2;
          position: relative;
          color: var(--bs-heading-color);
        }

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

          &:before {
            content: "";
            background: var(--bs-primary-bg-subtle);
            width: 48px;
            height: 48px;
            display: block;
            position: absolute;
            left: 0;
            right: 0;
            margin: 0 auto;
            top: 0;
            border-radius: $border-radius;
            z-index: 1;
          }
        }
      }

      &.selected > a {
        iconify-icon {
          color: var(--bs-white);
        }

        &:before {
          content: "";
          background: var(--bs-primary);
          width: 48px;
          height: 48px;
          display: block;
          position: absolute;
          left: 0;
          right: 0;
          margin: 0 auto;
          top: 0;
          border-radius: $border-radius;
          z-index: 1;
        }
      }
    }
  }

  .sidebarmenu .sidebar-nav {
    position: absolute;
    height: 100%;
    width: $sidebar-width-full;
    background: var(--bs-white);
    top: $headerHeight;
    transition: left 0.4s ease-in-out;
    left: $sidebar-width-mini;
    display: none;
    padding: 0 20px 24px 20px;
    z-index: 98;
  }
}

.nav-logo {
  position: absolute;
  left: $sidebar-width-mini;
  top: 0;
  padding: 0 24px;
  transition: left .4s ease-in-out;
}

.simplebar-scrollbar:before {
  background: rgba(0, 0, 0, 0.5) !important;
}

.brand-logo {
  min-height: $headerHeight;
  z-index: 98;
  //position: relative;
}

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

// -----------------------------------
// Sidebar list
// -----------------------------------
.sidebar-nav {
  ul {
    .sidebar-item {
      .sidebar-link {
        display: flex;
        font-size: 15px;
        white-space: nowrap;
        align-items: center;
     //   line-height: 26px;
        position: relative;
        padding: 11px 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;
          color: var(--bs-heading-color);
          opacity: 0.8;
        }

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

        &:hover {
          color: var(--bs-primary);
          iconify-icon {
            color: var(--bs-primary);
            opacity: 1;
          }

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

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

      .link-disabled {
        opacity: $link-disabled;
      }

      .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 {
            box-shadow: none !important;
            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: var(--bs-primary);
        color: var(--bs-white);
        iconify-icon {
          color: var(--bs-white);
        }
        &.has-arrow::after {
          border-color: var(--bs-white);
        }
        box-shadow: 0px 17px 20px -8px #4d5bec3b;
      }
    }

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

.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;
  }
}

.collapse.in {
  display: block;
}

// -----------------------------------
// Sidebar Type : Minisidebar
// -----------------------------------

// About LG Screen
@include media-breakpoint-up(lg) {
  [data-layout="vertical"] {
    [data-sidebartype="mini-sidebar"] {
      .side-mini-panel .sidebarmenu .sidebar-nav,
      .nav-logo {
        left: -$sidebar-width-full;
      }

      .side-mini-panel .sidebarmenu.hovermenus .sidebar-nav.left-none {
        left: 80px;
      }
    }
  }
}

// Down LG Screen
@include media-breakpoint-down(xl) {
  #main-wrapper {
    &.show-sidebar {
      .left-sidebar {
        left: 0;
      }
    }
  }

  .show-sidebar + .dark-transparent {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
  }

  .close-btn {
    width: 40px;
    height: 40px;
    position: absolute;
    right: -241px;
    top: 15px;
  }

  .side-mini-panel {
    left: -330px;
  }

  .show-sidebar {
    .side-mini-panel {
      left: 0;
    }
  }
}

@import "./sidebar-arrow";

.hover-border {
  transition-duration: 0.3s;
  transition-property: all;

  border: 1px dashed transparent;
  width: 40px;
  height: 40px;

  &:hover {
    border: 1px dashed var(--bs-primary);
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@include media-breakpoint-up(xl) {
  [data-layout="vertical"] [data-sidebartype="full"] {
    .body-wrapper {
      margin-left: 0;
    }
  }
}
