/*
* created by zhongzheng at 2020.02.10
*/
@import "../style/themes/default.less";

@radio-prefix-cls: ~"@{sino-prefix}-radio";

.@{radio-prefix-cls}-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    &&-justify-around {
        justify-content: space-around;
    }

    &&-justify-between {
        justify-content: space-between;
    }

    &&-justify-around,
    &&-justify-between {
        .@{radio-prefix-cls} {
            margin: 0;
        }
    }
}

.@{radio-prefix-cls} {
    display: inline-flex;
    align-items: center;
    margin-right: .4rem;
    font-size: @radio-size;
    overflow: hidden;
    cursor: pointer;
    user-select: none;

    &:last-child {
        margin-right: 0;
    }

    &-disabled {
        cursor: not-allowed;
    }

    &-label-disabled {
        cursor: default;
    }

    &-icon {
        line-height: 0;
        font-size: @radio-icon-size;
        cursor: pointer;

        .sn-icon {
            color: @radio-icon-color;
            transition-duration: @radio-transition-duration;
            transition-property: color, border-color, background-color;
        }

        &-round {
            .sn-icon {
                border-radius: 100%;
            }
        }

        &&-checked {
            .sn-icon {
                color: @radio-checked-icon-color;
            }
        }

        &-disabled {
            cursor: not-allowed;

            .sn-icon {
                opacity: @disabled-opacity;
            }

            &:not(.@{radio-prefix-cls}-icon-checked) {

                .sn-icon {
                    background-color: @radio-disabled-icon-background-color;
                    border-radius: 50%;
                    overflow: hidden;
                }
            }
        }
    }

    &-label {
        margin-left: @radio-label-margin;
        line-height: @radio-icon-size;
        color: @radio-label-color;

        &-left {
            margin: 0 @radio-label-margin 0 0;
        }

        &-disabled {
            opacity: @disabled-opacity;
        }
    }
}
