.l-switch {
  box-sizing: border-box;
  color: var(--td-text-color-primary);
  font-size: var(--td-font-size-body-medium);
  font-family: var(--td-font-family);
  list-style: none;
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  outline: none;
  border: 0;
  padding: 0;
  margin: 0;
  height: 20px;
  line-height: 20px;
  border-radius: 10px;
  min-width: 36px;
  transition: all 0.2s cubic-bezier(0, 0, 0.15, 1);
  background-color: var(--td-gray-color-5);
  cursor: pointer;
  user-select: none;
}
.l-switch__handle {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: var(--td-radius-extraLarge);
  transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
}
.l-switch__handle .l-icon {
  font-size: 16px;
  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: var(--td-text-color-anti);
  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 6px 0 20px;
  font-size: var(--td-font-size-body-small);
  min-width: 36px;
  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 .l-switch__handle {
  left: calc(100% - 2px);
  transform: translate(-100%, 0);
}
.l-switch.l-is-checked .l-switch__content {
  padding: 0 20px 0 6px;
  color: var(--td-text-color-anti);
}
.l-switch.l-is-loading {
  cursor: not-allowed;
  background-color: var(--td-bg-color-page);
}
.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-page);
}
.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-is-checked {
  background-color: var(--td-brand-color-disabled);
}
.l-switch.l-is-disabled.l-is-checked .l-switch__handle .l-icon {
  color: var(--td-brand-color-disabled);
}
.l-switch.l-size-large {
  min-width: 44px;
  height: 24px;
  line-height: 24px;
  border-radius: 12px;
}
.l-switch.l-size-large:active:not(.l-is-disabled):not(.l-is-loading) .l-switch__handle::before {
  left: 0;
  right: -8px;
}
.l-switch.l-size-large:active:not(.l-is-disabled):not(.l-is-loading).l-is-checked .l-switch__handle::before {
  right: 0;
  left: -8px;
}
.l-switch.l-size-large .l-switch__handle {
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
}
.l-switch.l-size-large .l-switch__handle .l-icon {
  font-size: 20px;
}
.l-switch.l-size-large .l-switch__content {
  padding: 0 8px 0 24px;
  min-width: 44px;
  font-size: 9px;
}
.l-switch.l-size-large .l-switch__content .l-icon {
  font-size: var(--td-font-size-body-large);
}
.l-switch.l-size-large.l-is-checked .l-switch__handle {
  left: calc(100% - 2px);
}
.l-switch.l-size-large.l-is-checked .l-switch__content {
  padding: 0 24px 0 8px;
}
.l-switch.l-size-small {
  min-width: 28px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
}
.l-switch.l-size-small:active:not(.l-is-disabled):not(.l-is-loading) .l-switch__handle::before {
  left: 0;
  right: -4px;
}
.l-switch.l-size-small:active:not(.l-is-disabled):not(.l-is-loading).l-is-checked .l-switch__handle::before {
  right: 0;
  left: -4px;
}
.l-switch.l-size-small .l-switch__handle {
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
}
.l-switch.l-size-small .l-switch__handle .l-icon {
  font-size: 12px;
}
.l-switch.l-size-small .l-switch__content {
  padding: 0 5px 0 16px;
  min-width: 28px;
  font-size: 9px;
}
.l-switch.l-size-small .l-switch__content .l-icon {
  font-size: var(--td-font-size-body-large);
}
.l-switch.l-size-small.l-is-checked .l-switch__handle {
  left: calc(100% - 2px);
}
.l-switch.l-size-small.l-is-checked .l-switch__content {
  padding: 0 16px 0 5px;
}
