.sp-radio {
    box-sizing: border-box;
    margin: 0 8px 0 0;
    padding: 0;
    color: #000000d9;
    font-size: 14px;
    font-variant: tabular-nums;
    line-height: 1.5715;
    list-style: none;
    font-feature-settings: "tnum";
    position: relative;
    display: inline-flex;
    align-items: baseline;
    cursor: pointer;
    padding-right: 8px;

    &.--disabled {
        color: #00000040;
        position: relative;
        cursor: not-allowed;

        .sp-radio-core {
            cursor: not-allowed;

            input {
                cursor: not-allowed;
            }

            &-inner {
                border-color: #d9d9d9 !important;
                cursor: not-allowed;

                &:after {
                    background-color: #c7c5c5 !important;
                    border-color: #00000040;
                    -webkit-animation-name: none;
                    animation-name: none;
                    border-collapse: separate;
                }

            }
        }
    }

    &.--checked {
        .sp-radio-core {
            &-inner {
                border-color: var(--color-primary);

                &:after {
                    background-color: var(--color-primary);

                    transform: scale(.5);
                    opacity: 1;
                    transition: all .3s cubic-bezier(.78, .14, .15, .86);
                }

            }
        }
    }

    &:hover {
        &-core-input {
            border-color: var(--color-primary);
        }
    }

    &-core {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        color: #000000d9;
        font-size: 14px;
        font-variant: tabular-nums;
        line-height: 1.5715;
        list-style: none;
        font-feature-settings: "tnum";
        position: relative;
        top: 0.2em;
        display: inline-block;
        outline: none;
        cursor: pointer;
        padding-right: 8px;

        &-input {
            position: absolute;
            inset: 0;
            z-index: 1;
            cursor: pointer;
            opacity: 0;
            box-sizing: border-box;
            padding: 0;
            touch-action: manipulation;

            &:hover {
                border-color: var(--color-primary);

            }
        }

        &-inner {
            position: relative;
            top: 0;
            left: 0;
            display: block;
            width: 16px;
            height: 16px;
            background-color: #fff;
            border-color: #d9d9d9;
            border-style: solid;
            border-width: 1px;
            border-radius: 50%;
            transition: all .3s;

            &:after {
                position: absolute;
                top: 50%;
                left: 50%;
                display: block;
                width: 16px;
                height: 16px;
                margin-top: -8px;
                margin-left: -8px;
                background-color: var(--ant-primary-color);
                border-top: 0;
                border-left: 0;
                border-radius: 16px;
                transform: scale(0);
                opacity: 0;
                transition: all .3s cubic-bezier(.78, .14, .15, .86);
                content: " ";
            }
        }
    }
}


.sp-radio-group {
    &[type=button] {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        color: #000000d9;
        font-size: 14px;
        font-variant: tabular-nums;
        line-height: 1.5715;
        list-style: none;
        font-feature-settings: "tnum";
        display: inline-block;
        font-size: 0;

        &[optiontype=button] {
            .sp-radio {
                &.--checked {
                    background: var(--color-primary);
                    color: #fff;
                    border-color: var(--color-primary);

                    &::before {
                        left: -1px;
                    }
                }


            }
        }

        .sp-radio {
            position: relative;
            display: inline-block;
            height: 32px;
            margin: 0;
            padding: 0 15px;
            color: #000000d9;
            font-size: 14px;
            line-height: 30px;
            background: #fff;
            border: 1px solid #d9d9d9;
            border-top-width: 1.02px;
            border-left-width: 0;
            cursor: pointer;
            transition: color .3s, background .3s, border-color .3s, box-shadow .3s;

            &-core {

                &-input,
                &-inner {
                    width: 0;
                    height: 0;
                    opacity: 0;
                    pointer-events: none;
                }

                position: absolute;
                top: 0;
                left: 0;
                z-index: -1;
                width: 100%;
                height: 100%;
            }

            &.--checked {
                z-index: 1;
                color: var(--color-primary);
                background: #fff;
                border-color: var(--color-primary);
                transition: color .3s, background .3s, border-color .3s, box-shadow .3s;
                &::before {
                    position: absolute;
                    content: "";
                    left: -1px;
                    top: -1px;
                    height: calc(100% + 2px);

                    width: 1px;
                    background: var(--color-primary);
                }

                &:first-child {
                    border-left: 1px solid var(--color-primary);

                    &::before {
                        width: 0;
                    }
                }
            }

            &:first-child {
                border-left: 1px solid #d9d9d9;
                border-radius: 2px 0 0 2px;
            }

            &:last-child {
                border-radius: 0 2px 2px 0;
            }
        }
    }
}