@import '../../scss/variables/colors';

$base-class: 'radio';

.#{$base-class} {
  display: inline-block;

  &__label {
    cursor: pointer;
    display: inline-flex;
    align-items: flex-start;
    width: 100%;
    flex: 0 1 auto;
  }

  &__circle {
    position: relative;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 16px;
    background-color: #f3f7f9;
    border: 1px solid #bcc6d0;
    margin-right: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
  }

  &__inner-circle {
    opacity: 0;
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 8px;
    background-color: $primary-color;
    transition: all 0.2s ease;
  }

  &--selected {
    .#{$base-class}__circle {
      border-color: $primary-color;
    }

    .#{$base-class}__inner-circle {
      opacity: 1;
    }
  }

  &__text {
    font-size: 15px;
    color: $font-primary-color;
    line-height: 20px;
    flex: 1 0 auto;
  }

  &__input {
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }

  &--disabled {
    .#{$base-class} {
      &__circle {
        border-color: $font-tertiary-color;
        opacity: 0.4;
      }

      &__inner-circle {
        background-color: $font-tertiary-color;
      }

      &__label,
      &__input,
      &__text {
        color: $font-tertiary-color;
        cursor: not-allowed;
      }
    }
  }

  &__helper {
    cursor: default;
    margin-left: 24px;
  }
}
