.monadic-input-choices {
  position: absolute;
  left: -9999px;
  + span {
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: top;
    margin-right: 50px;
  }
  + span:before,
  + span:after {
    position: absolute;
    transition: all .2s;
  }
  + span:before {
    content: '';
  }
}

.monadic-input-choices--checkbox,
.monadic-input-choices--radio {
  + span {
    padding-left: 40px;
  }
  + span:before,
  + span:after {
    left: 0;
    top: 4px;
    width: 20px;
    height: 20px;
    line-height: 20px;
  }
  + span:before {
    border: 1px solid #DDDDDF;
    background: #fff;
    border-radius: 2px;
  }
  + span:after {
    font-size: 20px;
    opacity: 0;
    transform: scale(0);
  }
  &:checked + span:after {
    opacity: 1;
    transform: scale(1);
  }
  &:disabled + span:before,
  &:disabled:checked + span:before {
    background-color: #f1f1f1;
  }
  &:disabled:checked + span:after {
    color: #999;
  }
}

.monadic-input-choices--checkbox {
  + span:after {
    content: "\2713 ";
    text-align: center;
    color: $main_color;
  }
}

.monadic-input-choices--radio {
  + span:before {
    border-radius: 50%;
  }
  + span:after {
    content: '';
    background: $main_color;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 5px 0 0 5px;
  }
}

.monadic-input-choices--switch{
  + span {
    padding-left: 70px;
  }
  + span:before,
  + span:after {
    width: 20px;
    height: 20px;
    display: block;
  }
  + span:before {
    vertical-align: middle;
    top: 2px;
    left: 0;
    width: 55px;
    height: 26px;
    background-color: #f94b3e;
    border-radius: 13px;
    padding: 0;
    transition: background-color 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
  }
  + span:after {
    content: "";
    position: absolute;
    top: 5px;
    left: 2px;
    z-index: 1;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border-radius: 50%;
    transition: all 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
  &:checked + span:before {
    background: #32da4e;
  }
  &:checked + span:after {
    left: 33px;
  }
  &:disabled + span:before,
  &:disabled:checked + span:before {
    background: #cecece;
  }
}

.monadic-field-error {
  box-shadow: 0 0 3px #CC0000
}
