$checkbox-size: 18px;
$radio-size: 16px;

.form-type-checkbox {
  line-height: $checkbox-size;
  & > .description {
    margin-left: 0;
  }
}
.form-type-radio {
  height: $radio-size;
  line-height: $radio-size;
}

.form-type-checkbox,
.form-type-radio {
  position: relative;

  input {
    display: none;
  }
  label {
    cursor: pointer;
  }

  .pseudo-box {
    position: absolute;
    top: 0;
    width: $checkbox-size;
    height: $checkbox-size;
    background: $border-color;
    border-radius: $border-radius;

    @include vendor-values(box-shadow, 'inset 0 1px 1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .4)', webkit);

    &:before {
      display: none;
    }

    &.checkbox {
      &:after {
        width: 7px;
        height: 4px;
        background: transparent;
        border: 3px solid #45484d;
        border-top: none;
        border-right: none;
        @include vendor-values(transform, rotate(-45deg), webkit, moz, ms, o);
      }
    }
    &.radio {
      width: $radio-size;
      height: $radio-size;
      border-radius: 50%;
      &:after {
        width: $radio-size / 2;
        height: $radio-size / 2;
        border-radius: 50%;
        background: #45484d;
      }
    }

    &:after {
      content: '';
      position: absolute;
      top: 4px;
      left: 4px;
      opacity: 0;
    }

    &:hover::after {
      opacity: .3;
    }
  }
  .option {
    padding-left: $checkbox-size + 7px;
  }

  input:checked + .pseudo-box:after {
    opacity: 1;
  }

  .form-radio, .form-checkbox {
    & + label {
      padding: 0;
    }
  }
}
