/* -----------------------------------------
   Checkboxes and radios
----------------------------------------- */
.radio,
.checkbox {
    font-weight: normal;
    .user-select(none);

}
.radio-inline,
.checkbox-inline {
    padding-left: 0;
    padding-right: 20px;
}

div.toggle-custom {
    position: relative;
    margin: 6px 0 10px;

    label.toggle {
        width: 50px;
        position: relative;
        display: inline-block;
        padding: 0;
        height: 22px;
        vertical-align: top;
        min-height: 22px;
        margin-bottom: 0;
        font-weight: normal;
        cursor: pointer;

        &:before {
            content: attr(data-on);
            left: 1px;
        }
        &:after {
            content: attr(data-off);
            right: 1px;
        }
        
        &:after,
        &:before {
            top: 1px;
            width: 25px;
            font-size: 10px;
            color: @text-color;
            position: absolute;
            line-height: 22px;
            text-align: center;
            z-index: 1;
        }

        input[type="checkbox"],
        input[type="radio"] {
            margin: 0;
            opacity: 0;
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;

            &:checked {

                + .button-checkbox,
                + .button-radio {
                    border-color: @green-dark;
                    
                    &:after {
                        left: 24px;
                        #gradient.vertical(#84a758;#a5c96f;0%;100%);
                    }
                }
            }

            + .button-checkbox:after,
            + .button-radio:after {
                content: '';
                position: absolute;            
                z-index: 2;
                display: block;
                top: 1px;
                bottom: 1px;
                left: 1px;
                width: 23px;
                #gradient.vertical(#dd6a47;#ed8157;0%;100%);          
               .transition(all);
               .transition-duration(0.4s);
            }

        }

        .button-checkbox,
        .button-radio {
            background: @white;
            border: 1px solid @border-color;
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            border-radius: @border-radius-base;
        }

        .button-radio {
            border-radius: 20px;
            &:after {
                border-radius: 20px;
            }
        }

        + label {
            font-weight: normal;
            cursor: pointer;
            min-height: 22px;
            padding-left: 5px;
            padding-right: 10px;
            padding-top: 1px;
            margin-bottom: 0;
            .user-select(none);
            line-height: 20px;
        }
    }

    &.toggle-inline {
        float: left;
        margin-right: 10px;
    }
}


/* Custom skin */
div.checkbox-custom {
    position: relative;
    margin-top: 8px;
    label {
        cursor: pointer;
        margin-bottom: 0;
        text-align: left;
        line-height: 1.2;
        font-weight: normal;
        padding-left: 30px;
        .user-select(none);
    }

    input[type=checkbox],
    input[type=radio] {
        opacity: 0;
        position: absolute;
        top: 50%;
        left: 3px;
        margin: -6px 0 0 0;
        z-index: 2;
        cursor: pointer;

        &:checked,
        &:focus { outline: none !important; }

        + label {

            &:before {
                cursor: pointer;
                .transition(all);
                .transition-duration(0.4s);
                content: '';
                position: absolute;
                top: 50%;
                left: 0;
                margin-top: -10px;
                width: 19px;
                height: 18px;
                display: inline-block;
                #gradient.vertical(@checkbox-bg;#f3f3f3;0%;100%);
                border: 1px solid @checkbox-border;
                border-radius: @checkbox-border-radius;
                color: @checkbox-color;
            }
        }

        &:checked {
            + label:after {
                font-family: fontAwesome;
                display: inline-block;
                content: '\f00c';
                position: absolute;
                top: 50%;
                left: 4px;
                margin-top: -6px;
                font-size: 11px;
                line-height: 1;
                width: 16px;
                height: 16px;
                color: @checkbox-color;
            }
        }

        &:hover {
            + label:before { 
                border-color: @checkbox-hover-border; 
                #gradient.vertical(#f3f3f3;@checkbox-bg;0%;100%);
            }
        }

        &:disabled  {
            + label:before {
                background-color: @checkbox-disabled-bg !important;
                border-color: @checkbox-disabled-border !important;
                box-shadow: none !important;
                color: @checkbox-disabled-color;
            }
        }
    }

    &.checkbox-inline {
        padding-top: 0;
        margin-top: 8px;
    }

}

.radio-custom {
    position: relative;
    padding: 0 0 0 25px;
    margin-top: 8px;

    label {
        cursor: pointer;
        margin-bottom: 0;
        text-align: left;
        line-height: 1.2;
        font-weight: normal;
    }

    input[type="radio"] {
        opacity: 0;
        position: absolute;
        top: 50%;
        left: 3px;
        margin: -6px 0 0 0;
        z-index: 2;
        cursor: pointer;

        + label {
            &:before {
                .transition(all);
                .transition-duration(0.4s);
                content: '';
                position: absolute;
                top: 50%;
                left: 0;
                margin-top: -10px;
                width: 18px;
                height: 18px;
                display: inline-block;
                border-radius: 50px;
                #gradient.vertical(@checkbox-bg;#f3f3f3;0%;100%);
                border: 1px solid @checkbox-border;
                color: @checkbox-color;
            }
        }

        &:hover {
            + label:before { 
                border-color: @checkbox-hover-border; 
                #gradient.vertical(#f3f3f3;@checkbox-bg;0%;100%);
            }
        }

        &:checked,
        &:focus { outline: none !important; }

        &:checked {
            + label:after {
                content: '';
                position: absolute;
                top: 50%;
                left: 5px;
                margin-top: -5px;
                display: inline-block;
                font-size: 11px;
                line-height: 1;
                width: 8px;
                height: 8px;
                background-color: @radio-bg;
                border-radius: 50px;
                /* -webkit-box-shadow: 0px 0px 1px #444;
                box-shadow: 0px 0px 1px #444; */
            }
        }
    }

    &.radio-inline {
        padding-top: 0;
        margin-top: 8px;
    }
}