@import '../../core/stylesheets/variables.scss';

$radio-size: 20px;
$radio-ripple-size: 48px;

.md-radio {
  width: auto;
  margin: 16px 8px 16px 0;
  display: inline-flex;
  position: relative;

  .md-radio-container {
    width: $radio-size;
    height: $radio-size;
    position: relative;
    border-radius: 50%;
    border: 2px solid rgba(#000, .54);
    transition: $swift-ease-out;

    &:after {
      position: absolute;
      top: 3px;
      right: 3px;
      bottom: 3px;
      left: 3px;
      border-radius: 50%;
      opacity: 0;
      transform: scale3D(.38, .38, 1);
      transition: $swift-ease-in;
      content: " ";
    }

    input {
      position: absolute;
      left: -999em;
    }

    .md-ink-ripple {
      top: -16px;
      right: -16px;
      bottom: -16px;
      left: -16px;
      border-radius: 50%;
      color: rgba(#000, .54);

      .md-ripple {
        width: $radio-ripple-size !important;
        height: $radio-ripple-size !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
      }
    }
  }

  .md-radio-label {
    height: $radio-size;
    padding-left: 8px;
    line-height: $radio-size;
  }
}

.md-radio.md-checked {
  .md-radio-container {
    &:after {
      opacity: 1;
      transform: scale3D(1, 1, 1);
      transition: $swift-ease-out;
    }
  }
}
