/* ===== THEME SWITCHER STYLES ===== */

/* Theme Toggle Switch Container */
.theme-toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  margin-right: 25px;
}

/* Toggle Track */
.toggle-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  border-radius: 50px;
  padding: 4px;
  width: 60px;
  height: 30px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Dark mode track styling */
[data-theme="dark"] .toggle-track {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  border-color: #495057;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}



/* Toggle Slider - Now a circle with icon */
.toggle-slider {
  position: absolute;
  top: 50%;
  left: 0px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #dee2e6;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Icon inside the slider circle */
.toggle-slider-icon {
  font-size: 14px;
  transition: all 0.3s ease;
  color: #495057;
}

/* Dark mode slider */
[data-theme="dark"] .toggle-slider {
  background: linear-gradient(135deg, #495057 0%, #343a40 100%);
  border-color: #6c757d;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  transform: translateY(-50%) translateX(29px);
}

/* Dark mode slider icon */
[data-theme="dark"] .toggle-slider-icon {
  color: #ffffff;
}

/* Hover Effects */
.theme-toggle-switch:hover .toggle-track {
  border-color: #007bff;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 0 0 3px rgba(0,123,255,0.1);
}

[data-theme="dark"] .theme-toggle-switch:hover .toggle-track {
  border-color: #007bff;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3), 0 0 0 3px rgba(0,123,255,0.2);
}

.theme-toggle-switch:hover .toggle-slider {
  box-shadow: 0 6px 12px rgba(0,0,0,0.2), 0 3px 6px rgba(0,0,0,0.15);
}

[data-theme="dark"] .theme-toggle-switch:hover .toggle-slider {
  box-shadow: 0 6px 12px rgba(0,0,0,0.4), 0 3px 6px rgba(0,0,0,0.3);
}

/* Active State Animation */
.theme-toggle-switch:active .toggle-slider {
  transform: translateY(-50%) scale(0.95);
}

[data-theme="dark"] .theme-toggle-switch:active .toggle-slider {
  transform: translateY(-50%) translateX(30px) scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
  .toggle-track {
    width: 50px;
    height: 36px;
  }
  
  .toggle-slider {
    width: 28px;
    height: 20px;
  }
  
  .toggle-slider-icon {
    font-size: 8px;
  }
  

  
  [data-theme="dark"] .toggle-slider {
    transform: translateY(-50%) translateX(20px); /* 50px - 28px - 2px */
  }
}

@media (max-width: 480px) {
  .toggle-track {
    width: 40px;
    height: 32px;
  }
  
  .toggle-slider {
    width: 24px;
    height: 24px;
  }
  
  .toggle-slider-icon {
    font-size: 10px;
  }
  

  
  [data-theme="dark"] .toggle-slider {
    transform: translateY(-50%) translateX(14px); /* 40px - 24px - 2px */
  }
}

/* Navbar Integration */
.navbar .theme-toggle-switch {
  margin-right: 15px;
}

.navbar-nav .nav-item {
  align-items: center;
}

/* Ensure theme toggle has proper spacing */
#theme-toggle-btn {
  margin-right: 15px;
}

/* When theme toggle is standalone */
.navbar-nav .nav-item:has(#theme-toggle-btn) {
  margin-right: 0;
}

/* Additional responsive breakpoints */
@media (max-width: 576px) {
  .toggle-track {
    width: 35px;
    height: 30px;
  }
  
  .toggle-slider {
    width: 22px;
    height: 22px;
  }
  
  .toggle-slider-icon {
    font-size: 9px;
  }
  

  
  [data-theme="dark"] .toggle-slider {
    transform: translateY(-50%) translateX(11px); /* 35px - 22px - 2px */
  }
}


