/* 
    Inteligentny checkbox
    Created on : 6 wrz 2023, 14:49:21
    Author     : wat
*/

input[type=checkbox], input[type=radio] {
    width: 30px;
    /*margin: 10px;*/
    margin-top: 2px;
    /*float:left;*/
}

/** obsługa styli na checkboxie */
input[type=checkbox] {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: 0;
    background: white;
    height: 16px;
    width: 16px;
    border: solid 1px #A9A9A9;
}

input[type=checkbox].error,
input[type=checkbox]:invalid
{
    background-color: #ffE0E0;
    border: solid 1px red;
}

input[type=checkbox]:checked {
    border: solid 1px #A9A9A9;
    background: white;
}

input[type=checkbox]:hover {
    filter: brightness(90%);
}

input[type=checkbox]:disabled {
    background: #A9A9A9;
    opacity: 0.6;
    pointer-events: none;
}

input[type=checkbox]:after {
    content: '';
    position: relative;
    left: 30%;
    top: 0%;
    width: 25%;
    height: 70%;
    color: white;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
}

input[type=checkbox]:checked:after {
    display: block;
}

input[type=checkbox]:disabled:after {
    border-color: #222;
}

