// text
@prefixCls: zk-checkbox;
// color
@border: #dddee1;
@hoverBorder: #bcbcbc;
@blue: #2d8cf0;

.@{prefixCls}-wrapper {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  white-space: nowrap;
}

.@{prefixCls} {
  display: inline-block;
  position: relative;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  outline: none;
  &:hover {
    .@{prefixCls}__inner {
      border-color: @hoverBorder;
    }
  }
}

.@{prefixCls}__inner {
  display: inline-block;
  width: 14px;
  height: 14px;
  position: relative;
  top: 0;
  left: 0;
  border: 1px solid @border;
  border-radius: 2px;
  background-color: #ffffff;
  transition: border-color .2s ease-in-out,background-color .2s ease-in-out;
}

.@{prefixCls}--indeterminate {
  .@{prefixCls}__inner {
    background-color: @blue;
    border-color: @blue;
    &::after {
      content: "\2013";
      transform: scale(1);
      position: absolute;
      color: #fff;
      left: 2.5px;
      top: 0px;
    }
  }
  &:hover {
    .@{prefixCls}__inner {
      border-color: @blue;
    }
  }
}

.@{prefixCls}--checked {
  .@{prefixCls}__inner {
    border-color: @blue;
    background-color: @blue;
    &::after {
      content: "\2713";
      position: absolute;
      color: #fff;
      left: 2px;
      top: 0px;
      transform: scale(1);
      transition: all .2s ease-in-out;
    }
  }
  &:hover {
    .@{prefixCls}__inner {
      border-color: @blue;
    }
  }
}

.@{prefixCls}--disabled {
  cursor: not-allowed;
  .@{prefixCls}__inner {
    background-color: #f3f3f3;
    border-color: @border;
    &::after {
      animation-name: none;
      border-color: #ccc;
    }
  }
  &:hover {
    .@{prefixCls}__inner {
      border-color: @border;
    }
  }
}
