.@{surely-radio-prefix-cls} {
  .reset-component();

  position: relative;
  display: inline-block;
  outline: none;
  cursor: pointer;

  .@{surely-radio-prefix-cls}-wrapper:hover &,
  &:hover .@{surely-radio-inner-prefix-cls},
  &-input:focus + .@{surely-radio-inner-prefix-cls} {
    border-color: @surely-radio-dot-color;
  }

  &-input:focus + .@{surely-radio-inner-prefix-cls} {
    box-shadow: @surely-radio-focus-shadow;
  }

  &-checked::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid @surely-radio-dot-color;
    border-radius: 50%;
    visibility: hidden;
    animation: surelyRadioEffect 0.36s ease-in-out;
    animation-fill-mode: both;
    content: '';
    box-sizing: border-box;
  }

  &:hover::after,
  .@{surely-radio-prefix-cls}-wrapper:hover &::after {
    visibility: visible;
  }

  &-inner {
    &::after {
      position: absolute;
      top: ((@surely-radio-size - @surely-radio-dot-size) / 2) - @surely-radio-border-width;
      left: ((@surely-radio-size - @surely-radio-dot-size) / 2) - @surely-radio-border-width;
      display: block;
      width: @surely-radio-dot-size;
      height: @surely-radio-dot-size;
      background-color: @surely-radio-dot-color;
      border-top: 0;
      border-left: 0;
      border-radius: @surely-radio-dot-size;
      transform: scale(0);
      opacity: 0;
      transition: all @surely-radio-duration @ease-in-out-circ;
      content: ' ';
      box-sizing: border-box;
    }

    position: relative;
    top: 0;
    left: 0;
    display: block;
    width: @surely-radio-size;
    height: @surely-radio-size;
    border-color: @border-color-base;
    border-style: solid;
    border-width: @surely-radio-border-width;
    border-radius: 50%;
    transition: all @surely-radio-duration;
    box-sizing: border-box;
  }

  &-input {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    cursor: pointer;
    opacity: 0;
    border-radius: unset;
  }
}

// 选中状态
.@{surely-radio-prefix-cls}-checked {
  .@{surely-radio-inner-prefix-cls} {
    border-color: @surely-radio-dot-color;
    &::after {
      transform: scale(1);
      opacity: 1;
      transition: all @surely-radio-duration @ease-in-out-circ;
    }
  }
}

.@{surely-radio-prefix-cls}-disabled {
  cursor: not-allowed;

  .@{surely-radio-inner-prefix-cls} {
    background-color: ~'var(--@{surely-table-prefix-cls}-disabled-bg)';
    border-color: @border-color-base !important;
    cursor: not-allowed;
    &::after {
      background-color: @surely-radio-dot-disabled-color;
    }
  }

  .@{surely-radio-prefix-cls}-input {
    cursor: not-allowed;
  }

  & + span {
    color: ~'var(--@{surely-table-prefix-cls}-disabled-color)';
    cursor: not-allowed;
  }
}

span.@{surely-radio-prefix-cls} + * {
  padding-right: 8px;
  padding-left: 8px;
}

@keyframes surelyRadioEffect {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}
