@import '@/assets/_color.scss';

.zy-switch {
  width: 2em;
  height: 1em;
  display: inline-block;
  background: white;
  border: 1rpx solid $border2;
  border-radius: 1em;
  font-size: 50rpx;
  position: relative;
  align-items: center;
  transition: all .3s;
  .zy-switch-item {
    position: absolute;
    width: 1em;
    height: 1em;
    border-radius: 100%;
    box-shadow: 0 6rpx 2rpx 0 rgba(0, 0, 0, 0.05), 0 4rpx 4rpx 0 rgba(0, 0, 0, 0.1), 0 6rpx 6rpx 0 rgba(0, 0, 0, 0.05);
    transition: .3s;
    background: white;
    left: 0;
  }
}
.switch-on {
  flex-direction: row-reverse;
  background: $maincolor;
  .zy-switch-item {
    left: 1em;
  }
}
.switch-disabled {
  opacity: .5;
}