/* Theme toggle container at the bottom of sidebar */
.theme-toggle-wrapper {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.theme-toggle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.theme-icon {
  color: var(--primary-text-color);
  margin-top: 5px;
}

/* The switch - the box around the slider */
.theme-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

/* Hide default HTML checkbox */
.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Dark mode theme icon */
.dark-mode .theme-icon i.fa-moon {
  color: #FFD700; /* Golden color for moon */
}

/* Light mode theme icon */
.theme-icon i.fa-sun {
  color: #FFA500; /* Orange color for sun */
}

/* Make theme toggle more visible even in minimal sidebar view */
@media (max-width: 767.98px) {
  .theme-toggle-container {
    transform: scale(0.9);
  }
}

/* Ensure the theme toggle is accessible when scrolling long sidebars */
@media (min-height: 600px) {
  .sidebar {
    display: flex;
    flex-direction: column;
  }
  
  .sidebar-icon {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  
  .sidebar-icon ul {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  

}
