@charset "UTF-8";
/**
 * YH-UI Sass Variables
 * 原具体的 CSS 变量输出规则 (:root, html.dark 等) 已移至 root.scss，以防止各组件样式编译时产生重复的全局变量 CSS 冗余。
 */
.yh-switch {
  --yh-switch-on-color: var(--yh-color-primary);
  --yh-switch-off-color: var(--yh-border-color);
  --yh-switch-width: 40px;
  --yh-switch-height: 20px;
  --yh-switch-button-size: 16px;
  --yh-switch-font-size: var(--yh-font-size-base, 14px);
  display: inline-flex;
  align-items: center;
  position: relative;
  font-size: var(--yh-switch-font-size);
  line-height: var(--yh-switch-height);
  height: var(--yh-switch-height);
  vertical-align: middle;
  cursor: pointer;
}
.yh-switch__input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  margin: 0;
}

.yh-switch__label {
  transition: var(--yh-transition-base);
  height: var(--yh-switch-height);
  display: inline-block;
  font-size: inherit;
  font-weight: 500;
  cursor: pointer;
  vertical-align: middle;
  color: var(--yh-text-color-primary);
  white-space: nowrap;
}
.yh-switch__label--left {
  margin-right: 10px;
}

.yh-switch__label--right {
  margin-left: 10px;
}

.yh-switch__label.is-active {
  color: var(--yh-color-primary);
}

.yh-switch__core {
  margin: 0;
  display: inline-block;
  position: relative;
  width: var(--yh-switch-width);
  height: var(--yh-switch-height);
  border: 1px solid var(--yh-switch-off-color);
  outline: none;
  border-radius: calc(var(--yh-switch-height) / 2);
  box-sizing: border-box;
  background: var(--yh-switch-off-color);
  cursor: pointer;
  transition: border-color var(--yh-duration-base), background-color var(--yh-duration-base);
  vertical-align: middle;
}
.yh-switch__inner {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 4px 0 20px;
  transition: all var(--yh-duration-base);
  box-sizing: border-box;
  overflow: hidden;
}
.yh-switch__inner-text {
  font-size: 12px;
  color: var(--yh-color-primary-text, #fff);
  white-space: nowrap;
  user-select: none;
}

.yh-switch__action {
  position: absolute;
  top: 1px;
  left: 1px;
  border-radius: var(--yh-radius-circle);
  transition: all var(--yh-duration-base);
  width: var(--yh-switch-button-size);
  height: var(--yh-switch-button-size);
  background-color: var(--yh-bg-color, #ffffff);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--yh-switch-off-color);
  z-index: 1;
}
.yh-switch__loading-icon {
  width: calc(var(--yh-switch-button-size) * 0.75);
  height: calc(var(--yh-switch-button-size) * 0.75);
  animation: rotating 2s linear infinite;
}

.yh-switch.is-checked .yh-switch__core {
  border-color: var(--yh-switch-on-color);
  background-color: var(--yh-switch-on-color);
}
.yh-switch.is-checked .yh-switch__core .yh-switch__inner {
  padding: 0 20px 0 4px;
}
.yh-switch.is-checked .yh-switch__core .yh-switch__action {
  left: calc(100% - var(--yh-switch-button-size) - 1px);
  color: var(--yh-switch-on-color);
}

.yh-switch.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.yh-switch.is-disabled .yh-switch__core {
  cursor: not-allowed;
}

.yh-switch {
  /* 尺寸变体 */
}
.yh-switch--large {
  --yh-switch-width: 50px;
  --yh-switch-height: 24px;
  --yh-switch-button-size: 20px;
  --yh-switch-font-size: var(--yh-font-size-md, 16px);
}

.yh-switch--small {
  --yh-switch-width: 30px;
  --yh-switch-height: 16px;
  --yh-switch-button-size: 12px;
  --yh-switch-font-size: var(--yh-font-size-xs, 12px);
}