@charset "utf-8";
/* Shared checkbox contrast. Keep native semantics and existing control dimensions. */
input[type="checkbox"] {
    accent-color: #51453e;
}

.custom-checkbox .custom-control-input[type="checkbox"] ~ .custom-control-label::before {
    background-color: #fff !important;
    border-color: #80736a !important;
}

/* More specific than the theme palette's !important primary-color rules. */
.custom-checkbox .custom-control-input[type="checkbox"]:checked ~ .custom-control-label::before,
.custom-checkbox .custom-control-input[type="checkbox"]:indeterminate ~ .custom-control-label::before,
.custom-switch .custom-control-input[type="checkbox"]:checked ~ .custom-control-label::before {
    background-color: #51453e !important;
    border-color: #51453e !important;
}

.custom-checkbox .custom-control-input[type="checkbox"]:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8l3 3 6-6' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 80% 80%;
}

.custom-checkbox .custom-control-input[type="checkbox"]:indeterminate ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-size: 80% 80%;
}

.custom-checkbox .custom-control-input[type="checkbox"]:focus ~ .custom-control-label::before,
.custom-switch .custom-control-input[type="checkbox"]:focus ~ .custom-control-label::before {
    outline: 2px solid #51453e;
    outline-offset: 2px;
    box-shadow: none !important;
}

.custom-checkbox .custom-control-input[type="checkbox"]:disabled ~ .custom-control-label::before {
    background-color: #eee9e5 !important;
    border-color: #b2aaa4 !important;
}

.custom-checkbox .custom-control-input[type="checkbox"]:disabled:checked ~ .custom-control-label::before,
.custom-checkbox .custom-control-input[type="checkbox"]:disabled:indeterminate ~ .custom-control-label::before,
.custom-switch .custom-control-input[type="checkbox"]:disabled:checked ~ .custom-control-label::before {
    background-color: #81766c !important;
    border-color: #81766c !important;
}

/* GNUBoard's older label/span checkbox skins. */
.chk_box input[type="checkbox"] + label > span:first-child,
.fregister_agree input[type="checkbox"] + label > span:first-child {
    border-color: #80736a !important;
}

.chk_box input[type="checkbox"]:checked + label > span:first-child,
.fregister_agree input[type="checkbox"]:checked + label > span:first-child {
    background-color: #51453e !important;
    border-color: #51453e !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8l3 3 6-6' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 80% 80% !important;
}

.chk_box input[type="checkbox"]:focus + label > span:first-child,
.fregister_agree input[type="checkbox"]:focus + label > span:first-child,
input[type="checkbox"]:not(.custom-control-input):not(.selec_chk):focus-visible {
    outline: 2px solid #51453e;
    outline-offset: 2px;
}

.chk_box input[type="checkbox"]:disabled:checked + label > span:first-child,
.fregister_agree input[type="checkbox"]:disabled:checked + label > span:first-child {
    background-color: #81766c !important;
    border-color: #81766c !important;
}

@media (forced-colors: active) {
    .custom-checkbox .custom-control-input[type="checkbox"]:checked ~ .custom-control-label::before,
    .custom-checkbox .custom-control-input[type="checkbox"]:indeterminate ~ .custom-control-label::before {
        background-color: Highlight !important;
        border-color: Highlight !important;
        forced-color-adjust: none;
    }
    .custom-checkbox .custom-control-input[type="checkbox"]:checked ~ .custom-control-label::after,
    .custom-checkbox .custom-control-input[type="checkbox"]:indeterminate ~ .custom-control-label::after {
        display: grid;
        place-items: center;
        content: "\2713";
        background-image: none !important;
        color: HighlightText;
        font-weight: 900;
        line-height: 1;
        forced-color-adjust: none;
    }
    .custom-checkbox .custom-control-input[type="checkbox"]:indeterminate ~ .custom-control-label::after {
        content: "\2212";
    }
}
