/* ==========================================================================
   SIDEBAR THEME TOGGLE
   ========================================================================== */

.sidebar__theme-toggle {
  margin-top: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(102, 126, 234, 0.2);
  text-align: center;
}

.sidebar-theme-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.sidebar-theme-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.sidebar-theme-btn:hover::before {
  left: 100%;
}

.sidebar-theme-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.sidebar-theme-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.sidebar-theme-btn i {
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.theme-label {
  transition: all 0.3s ease;
  font-weight: 600;
}

/* Dark mode styles */
[data-theme="dark"] .sidebar__theme-toggle {
  border-top-color: rgba(102, 126, 234, 0.3);
}

[data-theme="dark"] .sidebar-theme-btn {
  background: linear-gradient(135deg, #4299e1 0%, #667eea 100%);
  box-shadow: 0 2px 10px rgba(66, 153, 225, 0.3);
}

[data-theme="dark"] .sidebar-theme-btn:hover {
  box-shadow: 0 4px 15px rgba(66, 153, 225, 0.4);
}

[data-theme="dark"] .sidebar-theme-btn:active {
  box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

/* Icon rotation animation */
.sidebar-theme-btn.switching i {
  transform: rotate(180deg) scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar__theme-toggle {
    margin-top: 1rem;
    padding: 0.75rem 0;
  }
  
  .sidebar-theme-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    max-width: 180px;
  }
  
  .sidebar-theme-btn i {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .sidebar__theme-toggle {
    margin-top: 0.75rem;
    padding: 0.5rem 0;
  }
  
  .sidebar-theme-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    max-width: 160px;
  }
}

/* Animation for theme switching */
@keyframes themeSwitch {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.sidebar-theme-btn.theme-switching {
  animation: themeSwitch 0.3s ease;
}

/* Focus states for accessibility */
.sidebar-theme-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.4);
}

[data-theme="dark"] .sidebar-theme-btn:focus {
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.4);
}
