/**
* DevExtreme (widgets/ios7/checkBox.ios7.less)
* Version: 19.2.7 (build 20134-0312)
* Build date: Wed May 13 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
@import (once) "./validation.ios7.less";

@IOS7_CHECKBOX_SIZE: 25px;
@IOS7_CHECKBOX_CHECKED_ICON_SIZE: 32px;
@IOS7_CHECKBOX_BORDER_RADIUS_ICON_SIZE: 3px;

.dx-checkbox {
    &.dx-state-active {
        .dx-checkbox-icon {
            background-color: @IOS7_CHECKBOX_ACTIVE_BACKGROUND;
        }
    }
}

.dx-checkbox-text {
    margin-left: -25px;
    padding-left: 30px;

    .dx-rtl &,
    .dx-rtl& {
        margin-right: -25px;
        padding-right: 30px;
    }
}

.dx-checkbox-icon {
    width: @IOS7_CHECKBOX_SIZE;
    height: @IOS7_CHECKBOX_SIZE;
    outline: 1px solid transparent;
    border: 1px solid @IOS7_CHECKBOX_BORDER;
    background-color: @IOS7_CHECKBOX_BACKGROUND_COLOR;
    background-size: 100%;
    border-radius: @IOS7_CHECKBOX_BORDER_RADIUS_ICON_SIZE;

    .dx-checkbox-checked & {
        .dx-icon-check;

        color: @IOS7_CHECKBOX_BACKGROUND_COLOR;
        .dx-icon-font-centered-sizing(@IOS7_CHECKBOX_CHECKED_ICON_SIZE);
    }

    .dx-checkbox-indeterminate & {
        &:before {
            content: '';
            width: 15px;
            height: 15px;
            background-color: @IOS7_CHECKBOX_BACKGROUND_COLOR;
            border-radius: @IOS7_CHECKBOX_BORDER_RADIUS_ICON_SIZE;
            position: absolute;
            left: 4px;
            top: 4px;
        }
    }

    .dx-checkbox-indeterminate &,
    .dx-checkbox-checked & {
        background-color: @IOS7_CHECKBOX_CHECKED_BACKGROUND;

        .dx-state-active& {
            &:before {
                content: '';
                background: none;
            }
        }
    }
}

.dx-state-disabled {
    &.dx-checkbox,
    .dx-checkbox {
        opacity: 0.5;
    }
}

.dx-invalid {
    .dx-checkbox-container {
        .dx-checkbox-icon {
            border: 1px solid @IOS7_FADED_INVALID_COLOR;
        }
    }

    &.dx-state-focused {
        .dx-checkbox-container {
            .dx-checkbox-icon {
                border-color: @IOS7_INVALID_COLOR;
            }
        }
    }
}
