.vxe-switch {
  --vxe-ui-switch-current-font-size: var(--vxe-ui-font-size-default);
  --vxe-ui-switch-current-height: var(--vxe-ui-switch-height-default);
}
.vxe-switch.size--xlarge {
  --vxe-ui-switch-current-font-size: var(--vxe-ui-font-size-xlarge);
  --vxe-ui-switch-current-height: var(--vxe-ui-switch-height-xlarge);
}
.vxe-switch.size--large {
  --vxe-ui-switch-current-font-size: var(--vxe-ui-font-size-large);
  --vxe-ui-switch-current-height: var(--vxe-ui-switch-height-large);
}
.vxe-switch.size--medium {
  --vxe-ui-switch-current-font-size: var(--vxe-ui-font-size-medium);
  --vxe-ui-switch-current-height: var(--vxe-ui-switch-height-medium);
}
.vxe-switch.size--small {
  --vxe-ui-switch-current-font-size: var(--vxe-ui-font-size-small);
  --vxe-ui-switch-current-height: var(--vxe-ui-switch-height-small);
}
.vxe-switch.size--mini {
  --vxe-ui-switch-current-font-size: var(--vxe-ui-font-size-mini);
  --vxe-ui-switch-current-height: var(--vxe-ui-switch-height-mini);
}

.vxe-switch {
  display: inline-block;
  color: var(--vxe-ui-font-color);
  font-size: var(--vxe-ui-switch-current-font-size);
  vertical-align: middle;
  padding: 0.2em;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  text-align: center;
}
.vxe-switch.is--animat .vxe-switch--button {
  transition: border-color 0.3s, background-color 0.3s;
}
.vxe-switch.is--animat .vxe-switch--icon {
  transition: all 0.3s;
}
.vxe-switch.is--on .vxe-switch--button {
  padding-right: 1.7em;
  background-color: var(--vxe-ui-switch-open-background-color);
}
.vxe-switch.is--on .vxe-switch--icon {
  left: 100%;
  transform: translateY(-50%) translateX(calc(var(--vxe-ui-switch-current-height) * -1));
  color: var(--vxe-primary-color);
}
.vxe-switch.is--off .vxe-switch--button {
  padding-left: 1.7em;
  background-color: var(--vxe-ui-switch-close-background-color);
}
.vxe-switch.is--off .vxe-switch--icon {
  left: 0.25em;
  transform: translateY(-50%) translateX(0);
  color: var(--vxe-switch-close-background-color);
}
.vxe-switch.is--on .vxe-switch--label-off, .vxe-switch.is--off .vxe-switch--label-on {
  height: 0;
  visibility: hidden;
  overflow: hidden;
}
.vxe-switch.is--on .vxe-switch--label, .vxe-switch.is--off .vxe-switch--label {
  opacity: 1;
}
.vxe-switch:not(.is--disabled) .vxe-switch--button {
  cursor: pointer;
}
.vxe-switch:not(.is--disabled) .vxe-switch--button:focus {
  box-shadow: 0 0 0.4em 0 var(--vxe-ui-font-primary-color);
}
.vxe-switch.is--disabled .vxe-switch--button {
  cursor: no-drop;
}
.vxe-switch.is--disabled.is--on .vxe-switch--button {
  background-color: var(--vxe-ui-font-primary-lighten-color);
}
.vxe-switch.is--disabled.is--on .vxe-switch--icon {
  color: var(--vxe-primary-lighten-color);
}
.vxe-switch.is--disabled.is--off .vxe-switch--button {
  background-color: var(--vxe-ui-switch-disabled-background-color);
}
.vxe-switch.is--disabled.is--off .vxe-switch--icon {
  color: var(--vxe-switch-disabled-background-color);
}
.vxe-switch.is--readonly .vxe-switch--button {
  cursor: default;
}
.vxe-switch .vxe-switch--button {
  display: block;
  position: relative;
  height: var(--vxe-ui-switch-current-height);
  line-height: 1;
  min-width: calc(var(--vxe-ui-switch-current-height) * 2);
  padding: 0 0.6em;
  border-radius: 1em;
  border: 0;
  outline: 0;
}
.vxe-switch .vxe-switch--label {
  opacity: 0;
  display: block;
  color: var(--vxe-ui-switch-font-color);
  font-size: 0.8em;
}
.vxe-switch .vxe-switch--icon {
  position: absolute;
  top: 50%;
  left: 0;
  width: calc(var(--vxe-ui-switch-current-height) - 4px);
  height: calc(var(--vxe-ui-switch-current-height) - 4px);
  line-height: 1.4em;
  transform: translateY(-50%);
  text-align: center;
  border-radius: 50%;
  background-color: var(--vxe-ui-switch-icon-background-color);
}
.vxe-switch .vxe-switch--label-icon {
  margin-right: 0.25em;
}