/**
 * Based on: http://cssdeck.com/labs/css-checkbox-styles
 */

input[type=checkbox] {
    visibility: hidden;
}

.rounded(@radius: 2px) {
    -webkit-border-radius: @radius;
    -moz-border-radius: @radius;
    border-radius: @radius;
}

.boxit(@color1, @color2) {
    -webkit-box-shadow: inset 0px 1px 1px @color1, 0px 1px 0px @color2;
    -moz-box-shadow: inset 0px 1px 1px @color1, 0px 1px 0px @color2;
    -o-box-shadow: inset 0px 1px 1px @color1, 0px 1px 0px @color2;
    -ms-box-shadow: inset 0px 1px 1px @color1, 0px 1px 0px @color2;
    box-shadow: inset 0px 1px 1px @color1, 0px 1px 0px @color2;
}

.gradit(@one, @two, @three) {
    background: -webkit-linear-gradient(top, @one 0%, @two 40%, @three 100%);
    background: -moz-linear-gradient(top, @one 0%, @two 40%, @three 100%);
    background: -o-linear-gradient(top, @one 0%, @two 40%, @three 100%);
    background: -ms-linear-gradient(top, @one 0%, @two 40%, @three 100%);
    background: linear-gradient(top, @one 0%, @two 40%, @three 100%);
}

.checkbox {
    width: 75px;
    height: 26px;
    background: #333;
    position: relative;
    line-height: normal;
    //margin: 20px auto;

    .rounded(50px);
    .boxit(rgba(0,0,0,0.5), rgba(255,255,255,0.2));

    &:after {
        content: 'OFF';
        font: 12px/26px Arial, sans-serif;
        color: #000;
        position: absolute;
        right: 10px;
        z-index: 0;
        font-weight: bold;
        text-shadow: 1px 1px 0px rgba(255,255,255,.15);
    }

    &:before {
        content: 'ON';
        font: 12px/26px Arial, sans-serif;
        color: #00bf00;
        position: absolute;
        left: 10px;
        z-index: 0;
        font-weight: bold;
    }

    & + span {
        position: relative;
        display: block;
        top: -25px;
        left: 90px;
        width: 200px;
        color: #fcfff4;
        font-size: 1.1em;
    }

    input[type=checkbox]:checked + label {
        left: 38px;
    }


    label {
        display: block;
        width: 34px;
        height: 20px;

        -webkit-border-radius: 50px;
        -moz-border-radius: 50px;
        border-radius: 50px;

        -webkit-transition: all .4s ease;
        -moz-transition: all .4s ease;
        -o-transition: all .4s ease;
        -ms-transition: all .4s ease;
        transition: all .4s ease;
        cursor: pointer;
        position: absolute;
        top: 3px;
        left: 3px;
        z-index: 1;

        background: #fcfff4;
        .gradit(#fcfff4, #dfe5d7, #b3bead);
        //.rounded(@cb_radius);
        //.boxit(@cb_accent_start, @cb_accent_stop);

        -webkit-box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.3);
        -moz-box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.3);
        box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.3);
    }
}
