$radio-prefix-cls: "#{$css-prefix}radio";
$radio-group-prefix-cls: "#{$radio-prefix-cls}-group";
$radio-inner-prefix-cls: "#{$radio-prefix-cls}-inner";
$radio-group-button-prefix-cls: "#{$radio-group-prefix-cls}-button";

.#{$radio-prefix-cls} {
  &:hover {
    .#{$radio-inner-prefix-cls} {
      @include active();
    }
  }

  &-inner {
    &::after {
      border-radius: 50%; //为了去除active样式*****************************
    }
  }

  &-inner-focus {
    @include active();
    outline: inherit;//为了去除active样式*****************************
    box-shadow: inherit;//为了去除active样式***************************
  }
}

.#{$radio-prefix-cls}-disabled {
  &:hover {
    .#{$radio-inner-prefix-cls} {
      border-color: $border-color-base;
      outline: inherit;//为了去除active样式*****************************
      box-shadow: inherit;//为了去除active样式***************************
    }
  }
}

span.#{$radio-prefix-cls} + * {
  margin-left: $radio-span-margin-left;
  margin-right: $radio-span-margin-right;
}

// 按钮样式
.#{$radio-group-button-prefix-cls} {
  font-size: 0;
  text-size-adjust: none;
  -webkit-text-size-adjust: none;

  .#{$radio-prefix-cls} {
    width: 0;
    margin-right: 0;
  }

  .#{$radio-prefix-cls}-wrapper {
    display: inline-block;
    height: $radio-btn-height;
    line-height: $radio-btn-height - 2px;
    margin: $radio-group-button-wrapper-margin;
    padding: $radio-group-button-wrapper-padding;
    font-size: $font-size-small;
    color: $btn-default-color;
    transition: all $transition-time ease-in-out;
    cursor: pointer;
    border: 1px solid $border-color-base;
    border-left: 0;
    background: $radio-group-button-wrapper-background;

    > span {
      margin-left: 0;
    }

    &::before {
      content: "";
      position: absolute;
      width: 1px;
      height: 100%;
      left: -1px;
      background: $border-color-base;
      visibility: hidden;
      transition: all $transition-time ease-in-out;
    }

    &:first-child {
      border-radius: $btn-border-radius 0 0 $btn-border-radius;
      border-left: 1px solid $border-color-base;

      &::before {
        display: none;
      }
    }

    &:last-child {
      border-radius: 0 $btn-border-radius $btn-border-radius 0;
    }

    &:first-child:last-child {
      border-radius: $btn-border-radius;
    }

    &:hover {
      position: relative;
      color: $primary-color;
    }

    .#{$radio-prefix-cls}-inner {
      // opacity: 0;
      display: none;
      width: 0;
      height: 0;
    }

    input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    &-checked {
      background: $radio-group-button-wrapper-checked-color;
      border-color: $primary-color;
      color: $primary-color;
      box-shadow: -1px 0 0 0 $primary-color;

      &:first-child {
        border-color: $primary-color;
        box-shadow: none !important;
      }

      &:hover {
        border-color: lighten($primary-color, 10%);
        box-shadow: -1px 0 0 0 tint($primary-color, 20%);
        color: lighten($primary-color, 20%);
      }

      &:active {
        border-color: shade($primary-color, 5%);
        // box-shadow: -1px 0 0 0 shade($primary-color, 5%);
        color: darken($primary-color, 5%);
      }
    }

    &-disabled {
      border-color: $border-color-base;
      background-color: $background-color-base;
      cursor: $cursor-disabled;
      color: $radio-group-button-wrapper-disabled-color;

      &:first-child,
      &:hover {
        border-color: $border-color-base;
        background-color: $background-color-base;
        color: $radio-group-button-wrapper-disabled-hover-color;
      }

      &:first-child {
        border-left-color: $border-color-base;
      }
    }

    &-disabled.#{$radio-prefix-cls}-wrapper-checked {
      color: $radio-group-button-wrapper-disabled-wrapper-checked-color;
      background-color: $radio-group-button-wrapper-disabled-wrapper-checked-background-color;
      border-color: $border-color-base;
      box-shadow: none !important;
    }
    // btn 带按钮--o45
    .#{$radio-prefix-cls}-btnIcon.#{$radio-prefix-cls} {
      width: $radio-group-button-wrapper-btnIcon-width;
      .#{$radio-prefix-cls}-inner {
        // opacity: 1;
        display: inline-block;
        width: $radio-group-button-wrapper-btnIcon-inner-width;
        height: $radio-group-button-wrapper-btnIcon-inner-height;
      }
    }
  }
}

.#{$radio-group-button-prefix-cls}.#{$radio-group-prefix-cls}-large .#{$radio-prefix-cls}-wrapper {
  height: $btn-circle-size-large;
  line-height: $btn-circle-size-large - 2px;
  font-size: $font-size-small;
  .#{$radio-prefix-cls}-btnIcon.#{$radio-prefix-cls} {
    width: $radio-group-button-large-btnIcon-width;
    .#{$radio-prefix-cls}-inner {
      // opacity: 1;
      display: inline-block;
      width: $radio-group-button-large-btnIcon-inner-width;
      height: $radio-group-button-large-btnIcon-inner-height;
    }
  }
}

.#{$radio-group-button-prefix-cls}.#{$radio-group-prefix-cls}-small .#{$radio-prefix-cls}-wrapper {
  height: $btn-circle-size-small;
  line-height: $btn-circle-size-small - 2px;
  padding: $radio-group-button-small-wrapper-padding;
  font-size: $font-size-small;

  &:first-child {
    border-radius: $btn-border-radius-small 0 0 $btn-border-radius-small;
  }

  &:last-child {
    border-radius: 0 $btn-border-radius-small $btn-border-radius-small 0;
  }
  .#{$radio-prefix-cls}-btnIcon.#{$radio-prefix-cls} {
    width: 16px;
    .#{$radio-prefix-cls}-inner {
      // opacity: 1;
      display: inline-block;
      width: $radio-group-button-small-btnIcon-inner-width;
      height: $radio-group-button-small-btnIcon-inner-height;
    }
  }
}

.#{$form-item-prefix-cls}-error {
  .#{$radio-prefix-cls} {
    @include radio-error();

    &-icon {
      color: $error-color;
    }
  }
}
