﻿/* Hide the default checkbox */
.icontainer input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.icontainer {
    display: block;
    position: relative;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
}

/* Create a custom checkbox */
.checkmark {
    position: relative;
    top: 0;
    left: 0;
    height: 1.3em;
    width: 1.3em;
    background-color: #ccc;
    transition: all 0.3s;
    border-radius: 5px;
}

/* When the checkbox is checked, add a blue background */
.icontainer input:checked ~ .checkmark {
    background-color: #47da99;
    animation: pop 0.5s;
    animation-direction: alternate;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.icontainer input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.icontainer .checkmark:after {
    left: 0.55em;
    top: 0.35em;
    width: 0.25em;
    height: 0.5em;
    border: solid white;
    border-width: 0 0.15em 0.15em 0;
    transform: rotate(45deg);
}

@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}
