@import (reference) '../theme/variables/antdVariables.less';
@switch-prefix-cls: ~'@{ant-prefix}-switch';

.@{ant-prefix}-legacy-form-item {
  button.@{switch-prefix-cls} {
    margin: 6px 0 4px;
  }

  button.@{switch-prefix-cls}-small {
    margin: 9px 0 7px;
  }

  .@{ant-prefix}-checked {
    left: calc(100% - 20px);
  }
}

button.@{switch-prefix-cls},
button.@{switch-prefix-cls}-small {
  width: fit-content;
  &:not(.@{switch-prefix-cls}-checked) {
    .@{switch-prefix-cls}-inner {
      margin-right: 7px;
    }
  }
}

button.@{switch-prefix-cls}.@{switch-prefix-cls}-checked,
button.@{switch-prefix-cls}-small.@{switch-prefix-cls}-checked {
  .@{switch-prefix-cls}-inner {
    margin-left: 7px;
  }
}

button.@{switch-prefix-cls}-small {
  .@{switch-prefix-cls}-inner {
    .ued-switch-children {
      transform-origin: left;
      transform: scale(0.8,0.8);
    }
  }
  &.@{switch-prefix-cls}-checked {
    .@{switch-prefix-cls}-inner {
      .ued-switch-children {
        transform-origin: right;
      }
    }
  }
}
