.rds-switch {
  --rds-switch-focus-ring-width: 2px;
  --rds-switch-disabled-opacity: 0.6;
  --rds-switch-disabled-track-opacity: 0.4;
  --rds-switch-root-width: 44px;
  --rds-switch-root-height: 24px;
  --rds-switch-thumb-size: 20px;
  --rds-switch-thumb-padding: 2px;
  --rds-switch-thumb-translate-x: 20px;
  --rds-switch-thumb-offset-x: 4px;
  --rds-switch-thumb-offset-x-checked: 3px;
  --rds-switch-style1-track-height: 1.5rem;
  --rds-switch-style1-track-width: 5.5rem;
  --rds-switch-style3-track-height: 1.4rem;
  --rds-switch-style4-track-height: var(--rds-spacing-sm, 8px);
  &__track {
    display: block;
  }

  &__thumb {
    display: block;
  }

  &__label {
    display: block;
  }

  &:focus-visible {
    outline: var(--rds-switch-focus-ring-width, 2px) solid var(--rds-color-primary, var(--rds-primary-main));
    outline-offset: var(--rds-focus-ring-offset, 2px);
  }

  &:disabled,
  &__disabled {
    opacity: var(--rds-switch-disabled-opacity, 0.6);
    pointer-events: none;
  }
}

.MuiButtonBase-root.MuiSwitchBase-root.MuiSwitch-switchBase:hover {
  background-color: transparent !important;
}

.MuiButtonBase-root.MuiSwitchBase-root.MuiSwitch-switchBase {
  background-color: transparent !important;
  
  &:hover {
    background-color: transparent !important;
  }
  
  &:focus {
    background-color: transparent !important;
  }
  
  &:active {
    background-color: transparent !important;
  }
  
  .MuiTouchRipple-root {
    display: none !important;
  }
}

.rds-switch .MuiButtonBase-root {
  background-color: transparent !important;
  
  &:hover,
  &:focus,
  &:active {
    background-color: transparent !important;
  }
}

.rds-switch--row {
  display: inline-flex;
  align-items: center;
}

.rds-switch.MuiSwitch-root {
  vertical-align: middle;
}

.rds-switch.MuiSwitch-root,
.rds-switch .MuiSwitch-root {
  width: var(--rds-switch-root-width) !important;
  height: var(--rds-switch-root-height) !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.rds-switch .MuiSwitch-switchBase {
  left: 0 !important;
  right: auto !important;
  top: 0 !important;
  margin: 0 !important;
  padding: var(--rds-switch-thumb-padding) !important;
  transform: translateX(0) !important;
}

.rds-switch .MuiSwitch-switchBase.Mui-checked {
  transform: translateX(var(--rds-switch-thumb-translate-x)) !important;
}

.rds-switch .MuiSwitch-thumb {
  width: var(--rds-switch-thumb-size) !important;
  height: var(--rds-switch-thumb-size) !important;
  box-sizing: border-box;
  margin: 0 !important;
}

.rds-switch .MuiSwitch-track {
  opacity: 1 !important;
  overflow: hidden;
}

.rds-switch--style1 .MuiSwitch-track {
  background: var(--rds-color-switch-track) !important;
  height: 100% !important;
  border-radius: var(--rds-switch-track-border-radius, var(--rds-border-radius-3xl, 1.5rem)) !important;
  width: 100% !important;
}
.rds-switch--style1 .MuiSwitch-thumb {
  background: var(--rds-color-switch-thumb) !important;
}

.rds-switch--style2 .MuiSwitch-track {
  background: var(--rds-color-switch-track) !important;
  height: 100% !important;
  border-radius: var(--rds-border-radius-sm, 4px) !important;
}
.rds-switch--style2 .MuiSwitch-thumb {
  background: var(--rds-color-switch-thumb) !important;
  border-radius: var(--rds-border-radius-sm, 4px) !important;
}

.rds-switch--style3 .MuiSwitch-track {
  background: var(--rds-color-switch-track) !important;
  height: 10px !important;
  border-radius: 999px !important;
  position: absolute !important;
  top: 50% !important;
  left: 0 !important;
  right: 0 !important;
  transform: translateY(-50%) !important;
}
.rds-switch--style3 .MuiSwitch-thumb {
  background: var(--rds-color-switch-thumb) !important;
}

.rds-switch--style3 .MuiSwitch-switchBase {
  top: 2px !important;
}

.rds-switch--style4 .MuiSwitch-track {
  background: var(--rds-color-switch-track) !important;
  height: 100% !important;
  border-radius: calc(2.5 * var(--rds-spacing-xs, 4px)) !important;
  position: relative !important;
}
.rds-switch--style4 .MuiSwitch-thumb {
  background: var(--rds-color-switch-thumb) !important;
}

.rds-switch--style4 .MuiSwitch-track::before {
  content: 'On' !important;
  position: absolute !important;
  left: calc(var(--rds-spacing-xs, 4px) / 2) !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--rds-color-switch-label) !important;
  font-size: var(--rds-font-size-sm, 12px) !important;
}

.rds-switch--style4 .MuiSwitch-track::after {
  content: 'Off' !important;
  position: absolute !important;
  right: calc(var(--rds-spacing-xs, 4px) / 2) !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--rds-color-switch-label) !important;
  font-size: var(--rds-font-size-sm, 12px) !important;
}

.rds-switch--style5 .MuiSwitch-track {
  background: var(--rds-color-switch-track) !important;
  height: 100% !important;
  border-radius: calc(0.75 * var(--rds-spacing-xs, 4px)) !important;
  position: relative !important;
}
.rds-switch--style5 .MuiSwitch-thumb {
  background: var(--rds-color-switch-thumb) !important;
  border-radius: var(--rds-border-radius-sm, 4px) !important;
}

.rds-switch--style4,
.rds-switch--style5 {
  --rds-switch-root-width: 52px;
  --rds-switch-thumb-translate-x: 28px;
}

.rds-switch--style3 {
  --rds-switch-root-width: 40px;
  --rds-switch-root-height: 20px;
  --rds-switch-thumb-size: 16px;
  --rds-switch-thumb-padding: 0px;
  --rds-switch-thumb-translate-x: 24px;
}

.rds-switch--style5 .MuiSwitch-track::before {
  content: 'On' !important;
  position: absolute !important;
  left: calc(var(--rds-spacing-xs, 4px) / 2) !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--rds-color-switch-label) !important;
  font-size: var(--rds-font-size-sm, 12px) !important;
}

.rds-switch--style5 .MuiSwitch-track::after {
  content: 'Off' !important;
  position: absolute !important;
  right: calc(var(--rds-spacing-xs, 4px) / 2) !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--rds-color-switch-label) !important;
  font-size: var(--rds-font-size-sm, 12px) !important;
}

.rds-switch--style1 .Mui-checked + .MuiSwitch-track,
.rds-switch--style1 .MuiSwitch-input:checked + .MuiSwitch-track,
.rds-switch--style2 .Mui-checked + .MuiSwitch-track,
.rds-switch--style2 .MuiSwitch-input:checked + .MuiSwitch-track,
.rds-switch--style3 .Mui-checked + .MuiSwitch-track,
.rds-switch--style3 .MuiSwitch-input:checked + .MuiSwitch-track,
.rds-switch--style4 .Mui-checked + .MuiSwitch-track,
.rds-switch--style4 .MuiSwitch-input:checked + .MuiSwitch-track,
.rds-switch--style5 .Mui-checked + .MuiSwitch-track,
.rds-switch--style5 .MuiSwitch-input:checked + .MuiSwitch-track {
  background: var(--rds-switch-active-bg) !important;
}

.css-i3t01e-MuiButtonBase-root-MuiSwitchBase-root-MuiSwitch-switchBase.Mui-checked:not(.Mui-disabled) + .MuiSwitch-track {
  background: var(--rds-switch-active-bg) !important;
  opacity: 1 !important;
}

.rds-switch--color-primary .Mui-checked + .MuiSwitch-track,
.rds-switch--color-primary .MuiSwitch-input:checked + .MuiSwitch-track {
  background: var(--rds-switch-primary-track-bg, var(--rds-primary-light)) !important;
  opacity: 1 !important;
}

.rds-switch--color-primary .Mui-checked + .MuiSwitch-thumb,
.rds-switch--color-primary .MuiSwitch-input:checked + .MuiSwitch-thumb {
  background: var(--rds-switch-primary-thumb-bg, var(--rds-primary-main)) !important;
}

.rds-switch--color-primary .MuiSwitch-thumb {
  background-color: var(--rds-background-paper) !important;
}

.rds-switch--color-secondary .Mui-checked + .MuiSwitch-track,
.rds-switch--color-secondary .MuiSwitch-input:checked + .MuiSwitch-track {
  background: var(--rds-switch-secondary-track-bg, var(--rds-secondary-light)) !important;
  opacity: 1 !important;
}

.rds-switch--color-secondary .Mui-checked + .MuiSwitch-thumb,
.rds-switch--color-secondary .MuiSwitch-input:checked + .MuiSwitch-thumb {
  background: var(--rds-switch-secondary-thumb-bg, var(--rds-secondary-main)) !important;
}

.rds-switch--color-secondary .MuiSwitch-thumb {
  background: var(--rds-color-switch-thumb) !important;
}

.rds-switch--color-error .Mui-checked + .MuiSwitch-track,
.rds-switch--color-error .MuiSwitch-input:checked + .MuiSwitch-track {
  background: var(--rds-switch-error-track-bg, var(--rds-error-light)) !important;
  opacity: 1 !important;
}

.rds-switch--color-error .Mui-checked + .MuiSwitch-thumb,
.rds-switch--color-error .MuiSwitch-input:checked + .MuiSwitch-thumb {
  background: var(--rds-switch-error-thumb-bg, var(--rds-error-main)) !important;
}

.rds-switch--color-error .MuiSwitch-thumb {
  background: var(--rds-color-switch-thumb) !important;
}

.rds-switch--color-warning .Mui-checked + .MuiSwitch-track,
.rds-switch--color-warning .MuiSwitch-input:checked + .MuiSwitch-track {
  background: var(--rds-switch-warning-track-bg, var(--rds-warning-light)) !important;
  opacity: 1 !important;
}

.rds-switch--color-warning .Mui-checked + .MuiSwitch-thumb,
.rds-switch--color-warning .MuiSwitch-input:checked + .MuiSwitch-thumb {
  background: var(--rds-switch-warning-thumb-bg, var(--rds-warning-main)) !important;
}

.rds-switch--color-warning .MuiSwitch-thumb {
  background: var(--rds-color-switch-thumb) !important;
}

.rds-switch--color-info .Mui-checked + .MuiSwitch-track,
.rds-switch--color-info .MuiSwitch-input:checked + .MuiSwitch-track {
  background: var(--rds-switch-info-track-bg, var(--rds-info-light)) !important;
  opacity: 1 !important;
}

.rds-switch--color-info .Mui-checked + .MuiSwitch-thumb,
.rds-switch--color-info .MuiSwitch-input:checked + .MuiSwitch-thumb {
  background: var(--rds-primary-main) !important;
}

.rds-switch--color-info .MuiSwitch-thumb {
  background: var(--rds-color-switch-thumb) !important;
}

.rds-switch--color-success .Mui-checked + .MuiSwitch-track,
.rds-switch--color-success .MuiSwitch-input:checked + .MuiSwitch-track {
  background: var(--rds-switch-success-track-bg, var(--rds-success-light)) !important;
  opacity: 1 !important;
}

.rds-switch--color-success .Mui-checked + .MuiSwitch-thumb,
.rds-switch--color-success .MuiSwitch-input:checked + .MuiSwitch-thumb {
  background: var(--rds-switch-success-thumb-bg, var(--rds-success-main)) !important;
}

.rds-switch--color-success .MuiSwitch-thumb {
  background: var(--rds-color-switch-thumb) !important;
}

.css-i3t01e-MuiButtonBase-root-MuiSwitchBase-root-MuiSwitch-switchBase.Mui-disabled + .MuiSwitch-track {
  opacity: var(--rds-switch-disabled-track-opacity, 0.4) !important;
  background: var(--rds-switch-inactive-bg) !important;
}

.css-i3t01e-MuiButtonBase-root-MuiSwitchBase-root-MuiSwitch-switchBase.Mui-checked.Mui-disabled + .MuiSwitch-track {
  opacity: var(--rds-switch-disabled-track-opacity, 0.4) !important;
  background: var(--rds-switch-disabled-bg) !important;
}
.Mui-checked + .MuiSwitch-thumb,
.MuiSwitch-input:checked + .MuiSwitch-thumb {
  background: var(--rds-color-on-primary) !important;
  margin-left: 0 !important;
}

.rds-switch--color-primary .Mui-checked.Mui-disabled + .MuiSwitch-track,
.rds-switch--color-primary .MuiSwitch-input:checked.Mui-disabled + .MuiSwitch-track {
  background: var(--rds-switch-disabled-bg) !important;
  opacity: var(--rds-switch-disabled-track-opacity, 0.4) !important;
}

.rds-switch--color-secondary .Mui-checked.Mui-disabled + .MuiSwitch-track,
.rds-switch--color-secondary .MuiSwitch-input:checked.Mui-disabled + .MuiSwitch-track,
.rds-switch--color-secondary .Mui-disabled + .MuiSwitch-track {
  background: var(--rds-switch-disabled-secondary-bg, rgba(24,39,187,0.24)) !important;
  opacity: var(--rds-switch-disabled-track-opacity, 0.4) !important;
}

.rds-switch--color-warning .Mui-checked.Mui-disabled + .MuiSwitch-track,
.rds-switch--color-warning .MuiSwitch-input:checked.Mui-disabled + .MuiSwitch-track {
  background: var(--rds-switch-disabled-warning-bg, rgba(255,152,0,0.24)) !important;
  opacity: var(--rds-switch-disabled-track-opacity, 0.4) !important;
}

.rds-switch--color-default .Mui-checked.Mui-disabled + .MuiSwitch-track,
.rds-switch--color-default .MuiSwitch-input:checked.Mui-disabled + .MuiSwitch-track {
  background: var(--rds-switch-disabled-default-bg, rgba(158,158,158,0.24)) !important;
  opacity: var(--rds-switch-disabled-track-opacity, 0.4) !important;
}

.rds-switch--color-primary .Mui-checked.Mui-disabled + .MuiSwitch-thumb,
.rds-switch--color-primary .MuiSwitch-switchBase.Mui-checked.Mui-disabled .MuiSwitch-thumb {
  background: var(--rds-color-on-primary) !important;
  opacity: var(--rds-switch-disabled-opacity, 0.6) !important;
}

.rds-switch--color-secondary .Mui-checked.Mui-disabled + .MuiSwitch-thumb,
.rds-switch--color-secondary .MuiSwitch-input:checked.Mui-disabled + .MuiSwitch-thumb,
.rds-switch--color-secondary .MuiSwitch-switchBase.Mui-checked.Mui-disabled .MuiSwitch-thumb {
  background: var(--rds-color-on-secondary) !important;
  opacity: var(--rds-switch-disabled-opacity, 0.6) !important;
}

[data-theme="dark"] .rds-switch--color-secondary .Mui-checked.Mui-disabled + .MuiSwitch-track,
[data-theme="dark"] .rds-switch--color-secondary .MuiSwitch-input:checked.Mui-disabled + .MuiSwitch-track,
[data-theme="dark"] .rds-switch--color-secondary .Mui-disabled + .MuiSwitch-track {
  background: var(--rds-switch-disabled-secondary-dark-bg, var(--rds-switch-disabled-secondary-bg)) !important;
  opacity: 0.85 !important;
}

[data-theme="dark"] .rds-switch--color-secondary .Mui-checked.Mui-disabled + .MuiSwitch-thumb,
[data-theme="dark"] .rds-switch--color-secondary .MuiSwitch-input:checked.Mui-disabled + .MuiSwitch-thumb,
[data-theme="dark"] .rds-switch--color-secondary .MuiSwitch-switchBase.Mui-checked.Mui-disabled .MuiSwitch-thumb {
  background: var(--rds-color-on-secondary) !important;
  opacity: 0.9 !important;
}

.rds-switch--color-warning .Mui-checked.Mui-disabled + .MuiSwitch-thumb,
.rds-switch--color-warning .MuiSwitch-switchBase.Mui-checked.Mui-disabled .MuiSwitch-thumb {
  background: var(--rds-color-on-warning) !important;
  opacity: var(--rds-switch-disabled-opacity, 0.6) !important;
}

.rds-switch--color-default .Mui-checked.Mui-disabled + .MuiSwitch-thumb,
.rds-switch--color-default .MuiSwitch-switchBase.Mui-checked.Mui-disabled .MuiSwitch-thumb {
  background: var(--rds-color-on-default) !important;
  opacity: var(--rds-switch-disabled-opacity, 0.6) !important;
}
.rds-switch--style5 .Mui-checked + .MuiSwitch-track::before,
.rds-switch--style5 .MuiSwitch-input:checked + .MuiSwitch-track::before,
.rds-switch--style4 .Mui-checked + .MuiSwitch-track::before,
.rds-switch--style4 .MuiSwitch-input:checked + .MuiSwitch-track::before {
  color: var(--rds-color-on-primary) !important;
}
.rds-switch--style5 .Mui-checked + .MuiSwitch-track::after,
.rds-switch--style5 .MuiSwitch-input:checked + .MuiSwitch-track::after,
.rds-switch--style4 .Mui-checked + .MuiSwitch-track::after,
.rds-switch--style4 .MuiSwitch-input:checked + .MuiSwitch-track::after {
  color: var(--rds-color-on-primary) !important;
}

.rds-switch--style1.MuiFormControlLabel-root,
.rds-switch--style2.MuiFormControlLabel-root,
.rds-switch--style3.MuiFormControlLabel-root,
.rds-switch--style4.MuiFormControlLabel-root,
.rds-switch--style5.MuiFormControlLabel-root {
  align-items: center !important;
}

.rds-switch--style1 .MuiFormControlLabel-label,
.rds-switch--style2 .MuiFormControlLabel-label,
.rds-switch--style3 .MuiFormControlLabel-label,
.rds-switch--style4 .MuiFormControlLabel-label,
.rds-switch--style5 .MuiFormControlLabel-label {
  margin-top: 0 !important;
  display: inline-flex;
  align-items: center;
}

.MuiSwitch-track .css-1khxa25{
  opacity: var(--rds-switch-disabled-track-opacity, 0.4) !important;
  background: var(--rds-switch-disabled-bg) !important;
}
