﻿/*
    https://stackoverflow.com/questions/30663562/use-images-like-checkboxes
    de aici am luat codul
    view il gasesti in Pages/Components/RzvAfisareServiciuControl/Default.cshtml
*/

ul.costum-checkbox-image {
    list-style-type: none;
}

li.costum-checkbox-image {
    display: inline-block;
}

input[type="checkbox"][id^="cb"].costum-checkbox-image {
    display: none;
}

label.costum-checkbox-image {
    border: 1px solid #fff;
    padding: 10px;
    display: block;
    position: relative;
    margin: 10px;
    cursor: pointer;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

    label.costum-checkbox-image::before {
        background-color: white;
        color: white;
        content: " ";
        display: block;
        border-radius: 50%;
        border: 1px solid grey;
        position: absolute;
        top: -5px;
        left: -5px;
        width: 25px;
        height: 25px;
        text-align: center;
        line-height: 28px;
        transition-duration: 0.4s;
        transform: scale(0);
    }

    label.costum-checkbox-image img.costum-checkbox-image {
        height: 100px;
        width: 100px;
        transition-duration: 0.2s;
        transform-origin: 50% 50%;
    }

:checked + label.costum-checkbox-image {
    border-color: #ddd;
}

    :checked + label.costum-checkbox-image::before {
        content: "✓";
        background-color: grey;
        transform: scale(1);
    }

    :checked + label.costum-checkbox-image img.costum-checkbox-image {
        transform: scale(0.9);
        box-shadow: 0 0 5px #333;
        z-index: -1;
    }
