.checkbox {
  position: absolute;
  opacity: 0;

  & + label {
    position: relative;
    margin-bottom: 19px;
    padding: 10px 0 4px;
    padding-left: 30px;
    cursor: pointer;
  }

  & + label::before {
    position: absolute;
    top: 50%;
    left: 0;
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-top: -10px;
    vertical-align: text-top;
    background: $input-bg;
    border: 1px solid $input-border;
    border-radius: 2px;
    transition: all 250ms ease;
    content: "";
  }

  & + label::after {
    position: absolute;
    top: 50%;
    left: 3px;
    width: 18px;
    height: 18px;
    margin-top: -8px;
    background: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 2px;
    transition: all 250ms ease;
    content: "";
  }

  &:hover + label::before {
    background: $input-bg;
  }

  &:checked + label::after {
    background: url("@/images/icons/solid/check-primary.svg");
  }

  &:disabled + label {
    cursor: not-allowed;
    opacity: 0.5;

    &::before {
      box-shadow: 0 0 0 1px $gray inset;
    }
  }

  &:checked {
    &:focus + label::before {
      outline: none;
      box-shadow: 0 0 0 1px $primary inset;
    }
  }
}

.form-group-checkbox-expanded {
  margin-top: 30px;
}
