/*! 
 *  Convert select element to checkboxes or radio buttons jQuery plugin.
 *  Copyright (C) 2021  Andrew Wagner  github.com/andreww1011
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 * 
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 * 
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 *  USA
 */
:root {
    --stc-badge-text-color: white;
    --stc-badge-color: var(--primary)
}

.stc .custom-control-input {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.stc .custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
    display: inline-block;   
}

.stc .custom-control-label::before {
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    position: absolute;
    top: 0.15625rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #FFFFFF;
    border: #adb5bd solid 1px
}

.stc .custom-control-label::after {
    position: absolute;
    top: 0.15625rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50% / 50% 50%;
}

.stc .custom-control-input:checked ~ .custom-control-label::before {
    border-color: var(--stc-badge-color);
    background-color: var(--stc-badge-color);
}

.stc .custom-control-input:checked:disabled ~ .custom-control-label::before {
    border-color: var(--stc-badge-color);
    background-color: var(--stc-badge-color);
    filter: grayscale(80%) brightness(150%);
}

.stc .custom-checkbox ~ .custom-control-label::before {
    border-radius: 0.25rem;
}

.stc .custom-checkbox:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23FFFFFF' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

.stc .custom-checkbox:indeterminate ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='%23FFFFFF' d='M0 2h4'/%3e%3c/svg%3e");
}

.stc .custom-radio ~ .custom-control-label::before {
    border-radius: 1.0rem;
}

.stc .custom-radio:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3ccircle cx='2' cy='2' r='1.5' fill='%23FFFFFF'/%3e%3c/svg%3e");
}