$radio-width: 16px !default;
$radio-height: $radio-width !default;
$radio-text-margin: 10px !default;
$radio-top-left: -15px !default;

md-radio-button,
.md-switch-thumb { // Used in switch
  box-sizing: border-box;
  display: block;
  margin: 15px;
  white-space: nowrap;
  cursor: pointer;

  .md-container {
    box-sizing: border-box;
    position: relative;
    top: 4px;
    display: inline-block;
    width: $radio-width;
    height: $radio-width;
    cursor: pointer;

    .md-ripple-container {
      position: absolute;
      display: block;
      width: $radio-width * 3;
      height: $radio-width * 3;
      left: -$radio-width;
      top: -$radio-width;
    }

    &:before {
      box-sizing: border-box;
      background-color: transparent;
      border-radius: 50%;
      content: '';
      position: absolute;
      display: block;
      height: auto;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
      transition: all 0.5s;
      width: auto;
    }
  }

  &.md-align-top-left > div.md-container {
     top: $radio-top-left;
   }

  .md-off {
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    width: $radio-width;
    height: $radio-width;
    border-style: solid;
    border-width: 2px;
    border-radius: 50%;
    transition: border-color ease 0.28s;
  }

  .md-on {
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    width: $radio-width;
    height: $radio-width;
    border-radius: 50%;
    transition: transform ease 0.28s;
    transform: scale(0);
  }

  &.md-checked .md-on {
    transform: scale(0.50);
  }

  .md-label {
    box-sizing: border-box;
    position: relative;
    display: inline-block;

    @include rtl(margin-left, $radio-text-margin, 0);
    @include rtl(margin-right, 0, $radio-text-margin);

    vertical-align: middle;
    white-space: normal;
    pointer-events: none;
    width: auto;
  }

  .circle {
    border-radius: 50%;
  }

}
md-radio-group {
  &:focus {
    outline: none;
  }
  &.md-focused {
    .md-checked .md-container:before {
      left: -8px;
      top: -8px;
      right: -8px;
      bottom: -8px;
    }
  }
}

@media screen and (-ms-high-contrast: active) {
  md-radio-button.md-default-theme .md-on {
    background-color: #fff;
  }
}
