.sidebar {
  background-color: var(--white-color);
  transition: transform 0.3s ease;
  font-size: 0.9rem;
  border: 1px solid #d9d9d9;
  width: 240px;
}

.sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar__item {
  position: relative;
}

.sidebar__category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s;
}

.sidebar__category:hover {
  background-color: var(--torr-blue-color);
}

.sidebar__category:hover .sidebar__link,
.sidebar__category:hover .sidebar__arrow {
  color: white;
}

.sidebar__category.active {
  background-color: var(--torr-blue-color);
}

.sidebar__category.active .sidebar__link,
.sidebar__category.active .sidebar__arrow {
  color: white;
}

.sidebar__link {
  color: var(--text-color);
  text-decoration: none;
  /* font-weight: 500;
  flex-grow: 1; */
}

.sidebar__arrow {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
  color: var(--text-color);
}

/* Desktop Styles */
@media screen and (min-width: 1003px) {
  .sidebar__item:hover .sidebar__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    list-style: none;
  }

  .sidebar__submenu {
    position: absolute;
    top: 0;
    left: 100%;
    width: 240px; /* Letak Scroll bar */
    background-color: var(--white-color);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateX(90%);
    transition: all 0.3s ease;
    list-style: none;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Custom scrollbar for submenu- buat warna orange scroll bar */
  .sidebar__submenu::-webkit-scrollbar {
    width: 6px;
  }

  .sidebar__submenu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }

  .sidebar__submenu::-webkit-scrollbar-thumb {
    background: #fe6b16;
    border-radius: 3px;
  }

  .sidebar__submenu::-webkit-scrollbar-thumb:hover {
    background: #e55a0f;
  }
}

.sidebar__sublink {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.8rem;
  transition: background-color 0.2s;
  border-bottom: 1px solid #d9d9d9;
}

.sidebar__sublink:hover {
  background-color: var(--torr-blue-color);
  color: white;
}

.sidebar__sublink.active {
  background-color: var(--torr-blue-color);
  color: white;
  font-weight: 500;
}

/* Mobile Styles */
@media screen and (max-width: 1002px) {
  .sidebar {
    transform: translateX(0%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .sidebar__toggle {
    position: fixed;
    background-color: var(--torr-blue-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 51;
  }

  .sidebar__close {
    opacity: 0;
    transform: rotate(-180deg);
  }

  .sidebar__toggle.show .sidebar__burger {
    opacity: 0;
    transform: rotate(180deg);
  }

  .sidebar__toggle.show .sidebar__close {
    opacity: 1;
    transform: rotate(0);
  }

  .sidebar__submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: var(--white-color-dark);
    list-style: none;
    list-style: none;
  }

  .sidebar__submenu.show-mobile {
    max-height: 500px;
  }

  .sidebar__arrow.rotated {
    transform: rotate(90deg);
  }

  .sidebar__sublink {
    padding-left: 2.5rem;
  }
}
