@import '../../imports';

$checkbox-size: 15px;

.checkbox {
  display: inline-block;
  vertical-align: top;
  width: 20px;
  height: 100%;
  cursor: pointer;
  margin-right: 3px;

  .checkbox-body {
    position: absolute;
    left: 0;
    top: 3px;
    background: hsla(0, 0, 0, 0.12);
    width: $checkbox-size;
    height: $checkbox-size;
    border-radius: 2px;
  }

  &.radio {
    .checkbox-body {
      border-radius: 30px;
    }
  }

  &.selected.check,
  &.selected.radio {
    .checkbox-body {
      background: hsla(0, 0, 0, 0.45);
    }
  }

  &.selected.radio {
    .checkbox-body:after {
      content: '';
      position: absolute;
      top: 5px;
      left: 5px;
      width: 5px;
      height: 5px;
      border-radius: 30px;
      background: #fff;
    }
  }

  svg {
    position: absolute;
    top: 4px;
    left: 2px;
    width: 11px;
    height: 14px;

    path {
      fill: $white;
    }
  }
}
