/* ===== SWITCH/TOGGLE OVERRIDES ===== */
/* Centralized styles for Material UI switches and custom toggles */

/* Material UI Switch Base Styles */
.MuiSwitch-root {
  width: 52px;
  height: 26px;
  padding: 0;
  display: inline-flex;
}

.MuiSwitch-switchBase {
  padding: 1px;
  transition: all 0.3s ease;
}

.MuiSwitch-switchBase.Mui-checked {
  transform: translateX(26px);
  color: #fff;
}

.MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track {
  background-color: #b9ff66 !important;
  opacity: 1 !important;
}

.MuiSwitch-thumb {
  width: 24px;
  height: 24px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.MuiSwitch-track {
  border-radius: 13px;
  background-color: rgba(255, 255, 255, 0.2);
  opacity: 1;
  transition: background-color 0.3s ease;
}

/* Option Switch Custom Styles */
.option-switch-container {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.option-switch-container:hover {
  background: rgba(255, 255, 255, 0.05);
}

.option-switch-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  user-select: none;
}

/* Form Control Toggle Styles */
.form-control-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 26px;
}

.form-control-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.form-control-toggle .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 13px;
}

.form-control-toggle .slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-control-toggle input:checked + .slider {
  background-color: #b9ff66;
}

.form-control-toggle input:checked + .slider:before {
  transform: translateX(26px);
}

/* Section Toggle Switches */
.section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.section-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.section-toggle-label {
  font-size: 15px;
  font-weight: 600;
  color: #f8f9fa;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-toggle-icon {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
}

/* Panel System Toggle Integration */
.panel-content-body .MuiSwitch-root {
  margin: 0;
}

.carousel-panel .MuiSwitch-root {
  margin: 0;
}

/* Disabled State */
.MuiSwitch-root.Mui-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.MuiSwitch-root.Mui-disabled .MuiSwitch-track {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Focus State */
.MuiSwitch-switchBase.Mui-focusVisible {
  box-shadow: 0 0 0 3px rgba(185, 255, 102, 0.2);
}

/* Size Variations */
.MuiSwitch-sizeSmall {
  width: 40px;
  height: 20px;
}

.MuiSwitch-sizeSmall .MuiSwitch-thumb {
  width: 16px;
  height: 16px;
}

.MuiSwitch-sizeSmall .MuiSwitch-switchBase {
  padding: 2px;
}

.MuiSwitch-sizeSmall .MuiSwitch-switchBase.Mui-checked {
  transform: translateX(20px);
}

/* Dark Mode Specifics (already dark but for consistency) */
body.dark-mode-active .MuiSwitch-track {
  background-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode-active .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track {
  background-color: #b9ff66 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .option-switch-container {
    width: 100%;
    justify-content: space-between;
  }
  
  .section-toggle {
    padding: 10px 12px;
  }
  
  .section-toggle-label {
    font-size: 14px;
  }
}