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

@checkbox-prefix-cls: ~'@{sino-prefix}-checkbox';

.@{checkbox-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 {
        .@{checkbox-prefix-cls} {
            margin: 0;
        }
    }
}

.@{checkbox-prefix-cls} {
    display: inline-flex;
    align-items: center;
    margin-right: 0.4rem;
    font-size: @checkbox-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: @checkbox-icon-size;
        cursor: pointer;

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

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

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

        &-disabled {
            cursor: not-allowed;

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

            &:not(.@{checkbox-prefix-cls}-icon-checked) {
                .sn-icon {
                    background-color: @checkbox-disabled-icon-background-color;
                    overflow: hidden;
                }
            }
        }
    }

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

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

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