$prefixCls: $lib-name + "-checkbox";

.#{$prefixCls}-wrapper {
  cursor: pointer;
  display: inline-block;
  // hack inline-block gap
  font-size: 0;
  line-height: 1px;
  color: $content-color-light;

  .#{$prefixCls},
  .#{$prefixCls}-inner {
    position: relative;
    display: inline-block;
  }

  .#{$prefixCls} {
    cursor: pointer;
    top: 2px;
    height: 14px;
    line-height: 14px;
    .#{$prefixCls}-inner {
      &:after {
        position: absolute;
        top: 0;
        left: 3px;
        width: 4px;
        height: 8px;
        border: 2px solid $background-color-base;
        border-top: 0;
        border-left: 0;
        transform: rotate(45deg) scale(0);
        transition: all $transition-time ease-in-out;
        content: "";
        box-sizing: content-box;
      }
    }
  }
  .#{$prefixCls}-checked {
    .#{$prefixCls}-inner {
      border-color: $primary-color;
      background-color: $primary-color;
      &:after {
        transform: rotate(45deg) scale(0.8);
      }
    }
  }
  .#{$prefixCls}-inner {
    width: 14px;
    height: 14px;
    top: 0;
    left: 0;
    border: 1px solid $border-color-base;
    border-radius: 2px;
    box-sizing: border-box;
    background-color: $background-color-base;
    transition: border-color $transition-time ease-in-out, background-color $transition-time ease-in-out;
  }

  .#{$prefixCls}-input {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    cursor: pointer;
    opacity: 0;
    margin: 0;
  }
  .checkbox-label {
    display: inline-block;
    font-size: 14px;
    padding-left: 8px;
    line-height: 20px;
  }
}
.#{$prefixCls}-wrapper {
  &.#{$prefixCls}-wrapper-disabled {
    color: $disabled-text-color-light;
    cursor: not-allowed;
    .#{$prefixCls} {
      cursor: not-allowed;
    }
    .#{$prefixCls}-input {
      cursor: not-allowed;
    }
    .#{$prefixCls}-inner {
      border: 1px solid $disabled-text-color-light;
      background-color: $content-color-dark;
      &:after {
        border-color: $disabled-text-color-light;
      }
    }
  }
}
.#{$prefixCls}-group {
  .#{$prefixCls}-wrapper + .#{$prefixCls}-wrapper {
    margin-left: 10px;
  }
}
