/**Variable**/

/*checkbox*/
.s-checkbox {
  display: inline-block;
  user-select: none;
  cursor: pointer;
  &.size--small,
  &.size--mini {
    font-size: 12px;
  }
  > input {
    display: none;
    &+.checkbox--icon {
      position: relative;
      display: inline-block;
      width: 14px;
      height: 14px;
      border: 1px solid $s-input-border-color;
      background-color: #fff;
      vertical-align: middle;
      border-radius: 2px;
      &:before {
        content: "";
        position: absolute;
      }
    }
    &:checked+.checkbox--icon {
      background-color: $s-primary-color;
      border-color: $s-primary-color;
      &:before {
        height: 8px;
        width: 4px;
        left: 4px;
        top: 1px;
        border-width: 1px;
        border-style: solid;
        border-color: #fff;
        border-left: 0;
        border-top: 0;
        transform: rotate(45deg);
      }
      &+.checkbox--label {
        color: $s-primary-color;
      }
    }
  }
  &.is--indeterminate {
    > input {
      &+.checkbox--icon {
        background-color: $s-primary-color;
        border-color: $s-primary-color;
        &:before {
          top: 50%;
          height: 0;
          width: 100%;
          transform: translateY(-50%) scale(.5);
          border-width: 1px;
          border-style: solid;
          border-color: #fff;
        }
      }
    }
  }
  &.is--disabled {
    cursor: not-allowed;
    > input {
      &+.checkbox--icon {
        border-color: $s-input-border-color;
        background-color: $s-input-disabled-color;
        &:before {
          border-color: #c0c4cc;
        }
      }
      &:checked+.checkbox--icon {
        border-color: $s-input-border-color;
        background-color: $s-input-disabled-color;
        &+.checkbox--label {
          color: $s-input-border-color;
        }
      }
    }
  }
  .checkbox--label {
    padding-left: 5px;
    vertical-align: middle;
    display: inline-block;
  }
}
