/*
    
    ### HOW TO USE ...

    <link href='../css/mod_checkbox_radio.css' type='text/css' rel='stylesheet'>

    ******************************************************************

    <div class="checkbox_container">
        <input type="checkbox" name="" id=""  checked />
        <label for="squaredThree"></label>
    </div>

    <div class="radio_container">
      <input type="radio" name="" id=""  checked />
      <label for="sss_phil"></label>
    </div>

    ### Input checkbox and radio button must put together with its label on a table
        and seperated with "td" tag.

    ex. 1

    <table>
        <tr>
            <td><input type="checkbox or radio"></td>
            <td><label></label></td>
        </tr>
    </table>

    ex 2 

    <table>
        <tr>
            <td><input type="checkbox or radio"></td>
        </tr>
    </table>

*/

/* ------------------------------ Misc --------------------------------*/

.dis_opa_blur {
    opacity: 0.7;
    background: #aaa !important;
    color: #000;
}
.dis_chk_radio {
    opacity: 0.5;
}
.dis_opa_blur label:after {
    border-color: #fff !important;
}
.dis_opa_blur label:hover:after {
    /*opacity: 0 !important;*/ 
}
._hidden {
    display: none;
}

/* -------------------------------------------------------------------- */


/* --------------------------- Checkbox -----------------------------*/

.checkbox_container {
    width: 17px; height: 17px;
    position: relative;
    border: 1px solid #627d4d;
    /*margin: 0 auto;*/
    background: #fff;
}
.checkbox_container label {
    padding: 0 !important;
    width: 17px !important;
    height: 17px;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    margin: unset !important;
    /*background: -webkit-linear-gradient(top, #eee 50%, #ccc 100%);*/
    /*background: linear-gradient(to bottom, #eee 50%, #ccc 100%);*/
    /*border-radius: 4px;*/
    /*box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.8), 0px 1px 0px rgba(255, 255, 255, 0.4);*/
}
.checkbox_container label:after {
    content: '';
    width: 10px;
    height: 4px;
    position: absolute;
    top: 4px; left: 0; right: 0;
    margin: 0 auto;
    border: 4px solid #627d4d;
    border-top: none;
    border-right: none;
    background: transparent;
    opacity: 0;
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
}
.checkbox_container:active {
    box-shadow: inset 2px 2px 10px rgba(0,0,0,0.15);
}
.checkbox_container label:hover::after {
    /*opacity: 0.5;*/
    /*opacity: 0;*/ /* for mobile */
}
.checkbox_container input[type=checkbox] {
    visibility: hidden;
}
.checkbox_container input[type=checkbox]:checked + label:after {
    opacity: 1;
}

/* ------------------------ Radio Button ---------------------------- */


.radio_container {
    width: 17px;
    height: 17px;
    /*margin: 0 auto;*/
    position: relative;
    /*background: #fcfff4;*/
    border: 1px solid #627d4d;
    /*background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);*/
    /*background: linear-gradient(to bottom, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);*/
    border-radius: 50px;
    /*box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);*/
    background: #fff;
}
.radio_container label {
    padding: 0 !important;
    width: 11px !important;
    height: 11px;
    cursor: pointer;
    position: absolute;
    left: 2px;
    top: 2px;
    margin: unset !important;
    /*background: -webkit-linear-gradient(top, #222222 0%, #45484d 100%);*/
    /*background: linear-gradient(to bottom, #222222 0%, #45484d 100%);*/
    border-radius: 50px;
    /*box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px white;*/
}
.radio_container label:after {
    content: '';
    width: 11px;
    height: 11px;
    position: absolute;
    top: 0;
    left: 0;
    /*background: #27ae60;*/
    background: #627d4d;
    /*background: -webkit-linear-gradient(top, #27ae60 0%, #145b32 100%);*/
    /*background: linear-gradient(to bottom, #27ae60 0%, #145b32 100%);*/
    opacity: 0;
    border-radius: 50px;
    /*box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0, 0, 0, 0.5);*/
}
.radio_container:active {
    box-shadow: inset 2px 2px 10px rgba(0,0,0,0.15);
}
.radio_container label:hover::after {
    /*opacity: 0.5;*/
    /*opacity: 0;*/ /* for mobile */
}
.radio_container input[type=radio] {
    visibility: hidden;
}
.radio_container input[type=radio]:checked + label:after {
    opacity: 1;
}
