/* Radio Box */

.rdiobox {
  font-weight: normal;
  position: relative;
  display: block;
  line-height: 18px;

  span {
    padding-inline-start: 15px;

    &:before, &:after {
      line-height: 18px;
      position: absolute;
    }

    &:before {
      content: '';
      width: 16px;
      height: 16px;
      background-color: rgb($white) ;
      border: 1px solid #{$form-border};
      border-radius: 50px;
      inset-block-start: 2px;
      inset-inline-start: 0;
    }

    &:after {
      content: '';
      width: 6px;
      height: 6px;
      background-color: rgb($white) ;
      border-radius: 50px;
      inset-block-start: 7px;
      inset-inline-start: 5px;
      display: none;
    }

    &:empty {
      padding-inline-start: 0;
      width: 16px;
      display: block;
    }
  }

  input[type='radio'] {
    opacity: 0;
    margin: 0;

    &:checked + span {
      &:before {
        border-color: transparent;
        background-color: #{$primary};
      }

      &:after {
        display: block;
      }
    }

    &[disabled] + span {
      opacity: .75;

      &:before, &:after {
        opacity: .75;
      }
    }
  }
}

.rdiobox-inline {
  display: inline-block;
}

.form-group-rdiobox {
  display: flex;
  align-items: center;

  .rdiobox {
    margin-block-end: 0;

    + .rdiobox {
      margin-inline-start: 30px;
    }

    span {
      padding-inline-start: 0;
    }
  }
}