﻿
.FormCheckBox {
}

    .FormCheckBox > span,
    span.FormCheckBox {
        height: auto;
        display: grid;
        grid-template-columns: 24px minmax(0, 1fr);
        grid-template-rows: 24px;
        grid-column-gap: 12px;
    }

        .FormCheckBox > span.aspNetDisabled,
        span.FormCheckBox.aspNetDisabled {
            opacity: 0.6;
        }

        .FormCheckBox > span > input[type=checkbox],
        span.FormCheckBox > input[type=checkbox] {
            opacity: 0 !important;
            width: 100%;
            height: 100%;
            padding: 0 !important;
            margin: 0 !important;
        }

            .FormCheckBox > span > input[type=checkbox] ~ label,
            span.FormCheckBox > input[type=checkbox] ~ label {
                position: relative;
                height: 100%;
                line-height: 40px;
                left: initial !important;
                padding: 0;
                margin: 0;
            }

                .FormCheckBox > span > input[type=checkbox] ~ label:before,
                span.FormCheckBox > input[type=checkbox] ~ label:before {
                    content: '';
                    position: absolute;
                    width: 20px !important;
                    height: 20px !important;
                    top: 2px !important;
                    left: calc(-24px - 12px + 2px) !important;
                    background: transparent;
                    border: 1px solid #4C5356;
                    border-radius: 4px;
                }

        .FormCheckBox > span[data-valid='false'] {
        }

            .FormCheckBox > span[data-valid='false'][title] {
                position: relative !important;
            }

                .FormCheckBox > span[data-valid='false'][title]:before,
                .FormCheckBox > span[data-valid='false'][title]:after {
                    position: absolute;
                    bottom: 4px;
                    color: var(--border-input-error, #DF0024) !important;
                    font-family: var(--font-sans-bold) !important;
                    font-size: 10px !important;
                    font-weight: var(--font-weight-7) !important;
                    opacity: 0;
                    animation: var(--animation-fade-in) forwards, var(--animation-slide-in-down) forwards;
                    animation-timing-function: var(--ease-squish-5);
                }

                .FormCheckBox > span[data-valid='false'][title]:before {
                    content: '\E783';
                    left: calc(40px + 12px); /* checkbox width + gap */
                    display: flex;
                    align-items: center;
                    -moz-osx-font-smoothing: grayscale;
                    -webkit-font-smoothing: antialiased;
                    font-family: 'FabricMDL2Icons';
                    font-style: normal;
                    speak: none;
                }

                .FormCheckBox > span[data-valid='false'][title]:after {
                    content: attr(title);
                    left: calc(40px + 12px + 10px + 4px); /* checkbox width + gap + icon width + gap */
                    display: inline-block;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }

            .FormCheckBox > span[data-valid='false'][data-tooltip]:after {
                content: attr(data-tooltip);
            }

            .FormCheckBox > span[data-valid='false'][title] > input[type=checkbox] ~ label,
            .FormCheckBox > span[data-valid='false'][data-tooltip] > input[type=checkbox] ~ label {
                line-height: 28px !important;
            }

            .FormCheckBox > span[data-valid='false'] > input[type=checkbox] ~ label:before {
                border-color: var(--border-input-error, #DF0024) !important;
            }


        .FormCheckBox > span > input[type=checkbox]:disabled ~ label:before,
        span.FormCheckBox > input[type=checkbox]:disabled ~ label:before {
            background-color: var(--surface-2) !important;
        }

        .FormCheckBox > span > input[type=checkbox][checked=checked] ~ label:before,
        .FormCheckBox > span > input[type=checkbox]:checked ~ label:before,
        span.FormCheckBox > input[type=checkbox][checked=checked] ~ label:before,
        span.FormCheckBox > input[type=checkbox]:checked ~ label:before {
            background-color: var(--color-brand-red-500, #DF0024) !important;
            border-color: var(--color-brand-red-500, #DF0024) !important;
        }

        .FormCheckBox > span > input[type=checkbox][checked=checked] ~ label:after,
        .FormCheckBox > span > input[type=checkbox]:checked ~ label:after,
        span.FormCheckBox > input[type=checkbox][checked=checked] ~ label:after,
        span.FormCheckBox > input[type=checkbox]:checked ~ label:after {
            width: 10px;
            height: 5px;
            top: 9px !important;
            left: -29px !important;
            border: 2px solid #FFF;
            border-top: none;
            border-right: none;
            transform: rotate(-42deg);
        }

td > div.C-L.FormCheckBox {
    height: auto !important;
}

    td > div.C-L.FormCheckBox > span {
        display: grid !important;
    }

div[class^='FormColumns'] .FormLabel ~ .FormCheckBox {
    height: calc(100% - (var(--adjustable-text-base) * 2));
    display: flex !important;
    justify-content: flex-start;
    align-items: center;
}
