﻿.form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: .125rem;
}

.form-check.custom-card:hover .form-check-label::before, .form-check.custom-card .form-check-input:checked ~ .form-check-label::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-md);
    box-shadow: inset 0 0 0 1px var(--theme-primary) !important;
}

.form-check-input {
    width: 1em;
    height: 1em;
    margin-top: .25em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, 0.25);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color-adjust: exact;
}

    .form-check-input[type='checkbox'] {
        border-radius: var(--border-radius-sm);
    }

.form-switch.form-check {
    padding-left: 2.5em;
}

    .form-switch.form-check .form-check-input {
        margin-left: -2.5em;
    }

.form-switch .form-check-input {
    border-radius: var(--border-radius-md);
}

    .form-switch .form-check-input:focus {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280,0,0,0.25%29'/%3e%3c/svg%3e");
    }

    .form-switch .form-check-input:checked:focus {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    }

.form-check.custom-icon .content {
    display: flex !important;
    flex-direction: column;
}

.form-check.custom-icon .form-check-label {
    padding-top: initial;
}

    .form-check.custom-icon .form-check-label::before {
        width: 26px;
        min-width: 26px;
        height: 26px;
        left: -40px;
        top: 0;
        border-radius: var(--border-radius-xl);
        border-color: var(--muted) !important;
        opacity: 0.3;
    }

.form-check.custom-icon .form-check-input {
    width: 25px;
    height: 25px;
    background: initial !important;
    font-size: 16px;
    text-align: center;
    padding-top: 1px;
    border-radius: var(--border-radius-xl);
    border-color: var(--muted) !important;
    color: var(--muted) !important;
    opacity: 0.3;
    margin-top: 0;
    margin-right: 1rem;
}

    .form-check.custom-icon .form-check-input:checked {
        border-color: var(--theme-primary) !important;
        background: initial !important;
        opacity: 1;
    }

        .form-check.custom-icon .form-check-input:checked:after {
            font-family: 'CS-Interface' !important;
            font-style: normal;
            font-weight: normal;
            font-variant: normal;
            text-transform: none;
            line-height: 1;
            -webkit-font-smoothing: antialiased;
            color: #198754 !important;
            opacity: 1;
            content: '\e913';
        }

    .form-check.custom-icon .form-check-input[type='radio']:checked:after {
        content: '\e922';
    }



.form-check.custom-card .form-check-input {
    border: initial;
    z-index: 999;
    background-color: initial !important;
}

    .form-check.custom-card .form-check-input:checked {
        border: 1px solid var(--theme-primary);
        background-color: #198754 !important;
    }

.form-check-input:checked[type="radio"] {
    background-image: url('data:image/svg+xml,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="-4 -4 8 8"%3e%3ccircle r="2" fill="%23fff"/%3e%3c/svg%3e');
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check .form-check-input {
    float: left;
    margin-top: 1.2em !important;
    margin-right: 1rem !important;
}

.form-check-input {
    width: 16px;
    height: 16px;
}

.form-check .custom-border {
    /* border: initial !important; */
    /* box-shadow: initial !important; */
}

    .form-check .custom-border:hover .form-check-label::before,
    .form-check .custom-border .form-check-input:checked ~ .form-check-label::before {
        box-shadow: inset 0 0 0 1px rgba(var(--theme-primary), 0.5) !important;
    }

    .form-check .custom-border.form-check-label::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: var(--border-radius-md);
        box-shadow: inset 0 0 0 1px var(--separator);
    }

.custom-icon input[type='radio'] .form-check-label::after {
    content: '\e9d3';
}

/* Input Spinner */
.input-group.spinner {
    z-index: 0;
}

    .input-group.spinner .input-group-text {
        flex-direction: column;
        justify-content: center;
        padding-top: 0;
        padding-bottom: 0;
        padding: 0;
    }

        .input-group.spinner .input-group-text .spin-up,
        .input-group.spinner .input-group-text .spin-down {
            display: flex;
            background: none;
            border: none;
            padding: 0;
            height: 40%;
            padding: 0 1rem;
            display: flex;
            align-items: center;
        }

            .input-group.spinner .input-group-text .spin-up.single,
            .input-group.spinner .input-group-text .spin-down.single {
                height: 100%;
                color: var(--alternate);
            }

            .input-group.spinner .input-group-text .spin-up:hover .arrow,
            .input-group.spinner .input-group-text .spin-down:hover .arrow {
                border-color: var(--theme-primary);
            }

            .input-group.spinner .input-group-text .spin-up:hover,
            .input-group.spinner .input-group-text .spin-down:hover {
                color: var(--theme-primary);
            }

            .input-group.spinner .input-group-text .spin-up .arrow,
            .input-group.spinner .input-group-text .spin-down .arrow {
                border: initial;
                border-top: 1px solid var(--alternate);
                border-right: 1px solid var(--alternate);
                width: 5px;
                height: 5px;
                margin: 0 auto;
            }

            .input-group.spinner .input-group-text .spin-up .arrow {
                transform: rotate(-45deg);
            }

            .input-group.spinner .input-group-text .spin-down .arrow {
                transform: rotate(135deg);
            }

.form-check.checked-line-through .form-check-input:checked ~ .form-check-label {
    text-decoration: line-through;
}

    .form-check.checked-line-through .form-check-input:checked ~ .form-check-label span {
        text-decoration: line-through;
    }

.form-check.checked-opacity-100 .form-check-input:checked ~ .form-check-label > span:first-of-type,
.form-check.checked-opacity-100 .form-check-input:checked ~ .form-check-label > div:first-of-type {
    opacity: 1;
}

.form-check.checked-opacity-75 .form-check-input:checked ~ .form-check-label > span:first-of-type,
.form-check.checked-opacity-75 .form-check-input:checked ~ .form-check-label > div:first-of-type {
    opacity: 0.75;
}

.form-check.checked-opacity-50 .form-check-input:checked ~ .form-check-label > span:first-of-type,
.form-check.checked-opacity-50 .form-check-input:checked ~ .form-check-label > div:first-of-type {
    opacity: 0.5;
}

.form-check.checked-opacity-25 .form-check-input:checked ~ .form-check-label > span:first-of-type,
.form-check.checked-opacity-25 .form-check-input:checked ~ .form-check-label > div:first-of-type {
    opacity: 0.25;
}

.form-check.checked-opacity-0 .form-check-input:checked ~ .form-check-label > span:first-of-type,
.form-check.checked-opacity-0 .form-check-input:checked ~ .form-check-label > div:first-of-type {
    opacity: 0;
}

.form-check.unchecked-opacity-100 .form-check-input:not(:checked) ~ .form-check-label > span:first-of-type,
.form-check.unchecked-opacity-100 .form-check-input:not(:checked) ~ .form-check-label > div:first-of-type {
    opacity: 1;
}

.form-check.unchecked-opacity-75 .form-check-input:not(:checked) ~ .form-check-label > span:first-of-type,
.form-check.unchecked-opacity-75 .form-check-input:not(:checked) ~ .form-check-label > div:first-of-type {
    opacity: 0.75;
}

.form-check.unchecked-opacity-50 .form-check-input:not(:checked) ~ .form-check-label > span:first-of-type,
.form-check.unchecked-opacity-50 .form-check-input:not(:checked) ~ .form-check-label > div:first-of-type {
    opacity: 0.5;
}

.form-check.unchecked-opacity-25 .form-check-input:not(:checked) ~ .form-check-label > span:first-of-type,
.form-check.unchecked-opacity-25 .form-check-input:not(:checked) ~ .form-check-label > div:first-of-type {
    opacity: 0.25;
}

.form-check.unchecked-opacity-0 .form-check-input:not(:checked) ~ .form-check-label > span:first-of-type,
.form-check.unchecked-opacity-0 .form-check-input:not(:checked) ~ .form-check-label > div:first-of-type {
    opacity: 0;
}

textarea {
    resize: none;
}

.form-check {
    margin-bottom: 0.25rem;
    padding-left: 1.75em;
    line-height: 1.5;
}

.form-check-input[type='checkbox']:indeterminate {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
}

.form-check-input,
.form-check-input label,
.form-check-input input {
    outline: initial !important;
    box-shadow: initial !important;
}

.form-check-input {
    width: 16px;
    height: 16px;
}

.form-check .form-check-input {
    border-color: var(--muted) !important;
    background-color: initial;
    margin-top: 0.2em;
    margin-left: -1.75em;
}

.form-check-input:checked {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary) !important;
}

.form-check-label {
    color: var(--body);
    margin-top: 1px;
}

.form-floating > label {
    color: var(--alternate);
    padding: 0.85rem 0.75rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: var(--muted);
    opacity: 1;
}

.form-floating > textarea.form-control ~ label {
    transition: transform 0.1s ease-in-out, padding 0.1s ease-in-out, background-color 0s ease-in-out, height 0.1s ease-in-out;
}

.form-floating > textarea.form-control:not(:placeholder-shown) ~ label,
.form-floating > textarea.form-control:focus ~ label {
    background-color: var(--foreground);
    padding-top: 0.25rem;
    padding-bottom: 0.05rem;
    border-top-left-radius: var(--border-radius-md);
    height: auto;
    -webkit-transform: scale(0.85) translateY(1px) translateX(0.15rem);
    transform: scale(0.85) translateY(1px) translateX(0.15rem);
    transition: transform 0.1s ease-in-out, padding 0.1s ease-in-out, background-color 0.1s ease-in-out 0.1s, height 0.1s ease-in-out;
}

.form-floating > .form-control,
.form-floating > .form-select {
    height: auto;
    min-height: 52px;
    padding: 0.85rem 0.75rem;
}

    .form-floating > .form-control:focus,
    .form-floating > .form-control:not(:placeholder-shown) {
        padding-top: 1.45rem;
        padding-bottom: 0.25rem;
    }

.form-floating .form-control.form-control-lg {
    min-height: 62px;
    height: auto;
    padding: 1.2rem 0.75rem 1.2rem 0.75rem;
}

    .form-floating .form-control.form-control-lg ~ label {
        padding: 1.2rem 0.75rem 1.2rem 0.75rem;
    }

    .form-floating .form-control.form-control-lg:focus, .form-floating .form-control.form-control-lg:not(:placeholder-shown) {
        padding-top: 2rem;
        padding-bottom: 0.4rem;
    }

.form-floating .form-control.form-control-sm {
    min-height: 44px;
    height: auto;
    padding: 0.7rem 0.75rem 0.8rem 0.75rem;
}

    .form-floating .form-control.form-control-sm ~ label {
        padding: 0.7rem 0.75rem 0.8rem 0.75rem;
    }

    .form-floating .form-control.form-control-sm:focus, .form-floating .form-control.form-control-sm:not(:placeholder-shown) {
        padding-top: 1.4rem;
        padding-bottom: 0.2rem;
    }
