.l-switch {
  font: var(--td-font-body-medium);
  color: var(--td-text-color-primary);
  box-sizing: border-box;
  list-style: none;
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  outline: none;
  border: 0;
  padding: 0;
  margin: 0;
  height: var(--td-comp-size-xxs);
  line-height: var(--td-comp-size-xxs);
  border-radius: calc(var(--td-comp-size-xxs) / 2);
  min-width: calc(var(--td-comp-size-xxs) / 0.618);
  transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
  background-color: var(--td-bg-color-secondarycomponent);
  cursor: pointer;
  user-select: none;
}
.l-switch:hover {
  background-color: var(--td-bg-color-secondarycomponent-hover);
}
.l-switch__handle {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 4px;
  left: 4px;
  width: calc(var(--td-comp-size-xxs) - 2 * 4px);
  height: calc(var(--td-comp-size-xxs) - 2 * 4px);
  border-radius: var(--td-radius-extraLarge);
  transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
  box-shadow: var(--td-shadow-1);
}
.l-switch__handle .l-icon {
  font-size: calc(var(--td-comp-size-xxs) - 4px);
  color: transparent;
}
.l-switch__handle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--td-radius-extraLarge);
  background-color: #fff;
  transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
}
.l-switch:active:not(.l-is-disabled):not(.l-is-loading) .l-switch__handle::before {
  left: 0;
  right: -6px;
}
.l-switch:active:not(.l-is-disabled):not(.l-is-loading).l-is-checked .l-switch__handle::before {
  right: 0;
  left: -6px;
}
.l-switch:active:not(.l-is-disabled):not(.l-is-loading) .l-switch__content {
  opacity: 0;
}
.l-switch__content {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  color: var(--td-text-color-anti);
  padding: 0 var(--td-comp-margin-xs) 0 calc(calc(var(--td-comp-size-xxs) / 0.618) / 2 + 2px);
  font-size: var(--td-font-size-body-small);
  min-width: calc(var(--td-comp-size-xxs) / 0.618);
  transition: padding 0.2s cubic-bezier(0.38, 0, 0.24, 1), opacity 0.2s linear;
}
.l-switch__content .l-icon {
  font-size: var(--td-font-size-body-large);
}
.l-switch.l-is-checked {
  background-color: var(--td-brand-color);
}
.l-switch.l-is-checked:hover {
  background-color: var(--td-brand-color-hover);
}
.l-switch.l-is-checked .l-switch__handle {
  left: calc(100% - 2.5px);
  transform: translate(-100%, 0);
  width: calc(var(--td-comp-size-xxs) - 2 * 2.5px);
  height: calc(var(--td-comp-size-xxs) - 2 * 2.5px);
  top: 2.5px;
}
.l-switch.l-is-checked .l-switch__content {
  padding: 0 calc(calc(var(--td-comp-size-xxs) / 0.618) / 2 + 2px) 0 var(--td-comp-margin-xs);
  color: var(--td-text-color-anti);
}
.l-switch.l-is-loading {
  cursor: not-allowed;
  background-color: var(--td-bg-color-component-disabled);
}
.l-switch.l-is-loading .l-loading {
  display: inline-flex;
}
.l-switch.l-is-loading .l-switch__handle .l-icon {
  color: var(--td-bg-color-component-disabled);
}
.l-switch.l-is-loading.l-is-checked {
  background-color: var(--td-brand-color-focus);
}
.l-switch.l-is-loading.l-is-checked .l-switch__handle .l-icon {
  color: var(--td-brand-color-focus);
}
.l-switch.l-is-disabled {
  cursor: not-allowed;
  background-color: var(--td-bg-color-component-disabled);
}
.l-switch.l-is-disabled .l-switch__handle {
  box-shadow: none;
}
.l-switch.l-is-disabled.l-is-checked {
  background-color: var(--td-brand-color-disabled);
}
.l-switch.l-is-disabled.l-is-checked .l-switch__handle {
  box-shadow: none;
}
.l-switch.l-is-disabled.l-is-checked .l-switch__handle .l-icon {
  color: var(--td-brand-color-disabled);
}
.l-switch.l-size-l {
  min-width: calc(var(--td-comp-size-xs) / 0.618);
  height: var(--td-comp-size-xs);
  line-height: var(--td-comp-size-xs);
  border-radius: calc(var(--td-comp-size-xs) / 2);
}
.l-switch.l-size-l:active:not(.l-is-disabled):not(.l-is-loading) .l-switch__handle::before {
  left: 0;
  right: -8px;
}
.l-switch.l-size-l:active:not(.l-is-disabled):not(.l-is-loading).l-is-checked .l-switch__handle::before {
  right: 0;
  left: -8px;
}
.l-switch.l-size-l .l-switch__handle {
  top: 5px;
  left: 5px;
  width: calc(var(--td-comp-size-xs) - 2 * 5px);
  height: calc(var(--td-comp-size-xs) - 2 * 5px);
}
.l-switch.l-size-l .l-switch__handle .l-icon {
  font-size: calc(var(--td-comp-size-xs) - 4px);
}
.l-switch.l-size-l .l-switch__content {
  padding: 0 var(--td-comp-margin-s) 0 calc(calc(var(--td-comp-size-xs) / 0.618) / 2 + 4px);
  min-width: calc(var(--td-comp-size-xs) / 0.618);
  font-size: 9px;
}
.l-switch.l-size-l .l-switch__content .l-icon {
  font-size: var(--td-font-size-body-large);
}
.l-switch.l-size-l.l-is-checked .l-switch__handle {
  left: calc(100% - 3px);
  top: 3px;
  width: calc(var(--td-comp-size-xs) - 2 * 3px);
  height: calc(var(--td-comp-size-xs) - 2 * 3px);
}
.l-switch.l-size-l.l-is-checked .l-switch__content {
  padding: 0 calc(calc(var(--td-comp-size-xs) / 0.618) / 2 + 4px) 0 var(--td-comp-margin-s);
}
.l-switch.l-size-s {
  min-width: calc(var(--td-comp-size-xxxs) / 0.618);
  height: var(--td-comp-size-xxxs);
  line-height: var(--td-comp-size-xxxs);
  border-radius: calc(var(--td-comp-size-xxxs) / 2);
}
.l-switch.l-size-s:active:not(.l-is-disabled):not(.l-is-loading) .l-switch__handle::before {
  left: 0;
  right: -4px;
}
.l-switch.l-size-s:active:not(.l-is-disabled):not(.l-is-loading).l-is-checked .l-switch__handle::before {
  right: 0;
  left: -4px;
}
.l-switch.l-size-s .l-switch__handle {
  top: 3px;
  left: 3px;
  width: calc(var(--td-comp-size-xxxs) - 2 * 3px);
  height: calc(var(--td-comp-size-xxxs) - 2 * 3px);
}
.l-switch.l-size-s .l-switch__handle .l-icon {
  font-size: calc(var(--td-comp-size-xxxs) - 4px);
}
.l-switch.l-size-s .l-switch__content {
  padding: 0 var(--td-comp-margin-xxs) 0 calc(calc(var(--td-comp-size-xxxs) / 0.618) / 2 + 2px);
  min-width: calc(var(--td-comp-size-xxxs) / 0.618);
  font-size: 9px;
}
.l-switch.l-size-s .l-switch__content .l-icon {
  font-size: var(--td-font-size-body-large);
}
.l-switch.l-size-s.l-is-checked .l-switch__handle {
  left: calc(100% - 2px);
  top: 2px;
  width: calc(var(--td-comp-size-xxxs) - 2 * 2px);
  height: calc(var(--td-comp-size-xxxs) - 2 * 2px);
}
.l-switch.l-size-s.l-is-checked .l-switch__content {
  padding: 0 calc(calc(var(--td-comp-size-xxxs) / 0.618) / 2 + 2px) 0 var(--td-comp-margin-xxs);
}
