﻿$baseFontSize: 16;
@function rem($val) {
  @return #{$val / $baseFontSize}rem;
}

.radio-input {
  display: inline-block;
  border: none;
  &:last-child {
    margin-right: 0;
  }
  &.validation__error {
    border: none;
  }
  input {
    position: relative;
    padding: 10px 10px 10px 5px;
    color: $input-text-color;
    &:focus {
      outline: 0;
    }
    &:focus-visible {
      outline: 1px dotted;
      outline: 5px auto -webkit-focus-ring-color;
    }
    border: none;
    width: auto;
    margin-right: 10px;
    top: 0;
    &:before {
      transition: transform 0.4s cubic-bezier(0.45, 1.8, 0.5, 0.75);
      transform: scale(0, 0);
      content: '';
      position: absolute;
      top: 1px;
      left: 1px;
      z-index: 1;
      width: 10px;
      height: 10px;
      background: $primary-color;
      border-radius: 50%;
    }
    &:checked {
      &:before {
        transform: scale(1, 1);
      }
    }
    &:after {
      content: '';
      position: absolute;
      top: -2px;
      left: -2px;
      width: 16px;
      height: 16px;
      background: #fff;
      border: 2px solid $input-border-color;
      border-radius: 50%;
    }
  }
  label {
    top: 0;
    user-select: none;
    pointer-events: auto;
    position: relative;
    display: inline-block;
    cursor: pointer;
  }
}
