﻿
/*
    these styles add to the new-design-system styles.  razor generated checkboxes have an additional hidden input that was stopping the checkbox from looking checked.
    i've added input[type=hidden] to the styles. this will mean razor generated checkboxes are now also styled the same as default checkboxes.
*/

.nsw-form-checkbox__input:hover + input[type=hidden] + .nsw-form-checkbox__label:before, .nsw-form-checkbox__input:hover + input[type=hidden] + .nsw-form-radio__label:before, .nsw-form-radio__input:hover + input[type=hidden] + .nsw-form-checkbox__label:before, .nsw-form-radio__input:hover + input[type=hidden] + .nsw-form-radio__label:before {
    background-color: rgba(0,133,179,.2)
}

.nsw-form-checkbox__input:checked + input[type=hidden] + .nsw-form-checkbox__label:after, .nsw-form-radio__input:checked + input[type=hidden] + .nsw-form-checkbox__label:after {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg fill='%23fff' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M29.362 3.742L10.495 22.946l-7.857-7.997L0 17.634l9.175 9.34 1.319 1.284 1.318-1.284L31.999 6.427z'/%3E%3C/svg%3E");
    background-color: #002664
}

.nsw-form-checkbox__input:checked + input[type=hidden] + .nsw-form-radio__label:after, .nsw-form-radio__input:checked + input[type=hidden] + .nsw-form-radio__label:after {
    background-color: #002664
}

.nsw-form-checkbox__input:disabled + input[type=hidden] + .nsw-form-checkbox__label, .nsw-form-checkbox__input:disabled + input[type=hidden] + .nsw-form-radio__label, .nsw-form-radio__input:disabled + input[type=hidden] + .nsw-form-checkbox__label, .nsw-form-radio__input:disabled + input[type=hidden] + .nsw-form-radio__label {
    cursor: not-allowed
}

    .nsw-form-checkbox__input:disabled + input[type=hidden] + .nsw-form-checkbox__label:before, .nsw-form-checkbox__input:disabled + input[type=hidden] + .nsw-form-radio__label:before, .nsw-form-radio__input:disabled + input[type=hidden] + .nsw-form-checkbox__label:before, .nsw-form-radio__input:disabled + input[type=hidden] + .nsw-form-radio__label:before {
        border-color: #a0a5ae;
        background-color: #f4f4f7
    }

.nsw-form-checkbox__input:disabled:checked + input[type=hidden] + .nsw-form-checkbox__label:after, .nsw-form-checkbox__input:disabled:checked + input[type=hidden] + .nsw-form-radio__label:after, .nsw-form-radio__input:disabled:checked + input[type=hidden] + .nsw-form-checkbox__label:after, .nsw-form-radio__input:disabled:checked + input[type=hidden] + .nsw-form-radio__label:after {
    background-color: #a0a5ae
}

.nsw-form-checkbox__input:focus + input[type=hidden] + .nsw-form-checkbox__label:before, .nsw-form-radio__input:focus + input[type=hidden] + .nsw-form-checkbox__label:before {
    outline: 3px solid #0085b3;
    outline-offset: 0;
    outline-offset: 3px
}

.nsw-form-checkbox__input:focus + input[type=hidden] + .nsw-form-radio__label:before, .nsw-form-radio__input:focus + input[type=hidden] + .nsw-form-radio__label:before {
    box-shadow: 0 0 0 3px #fff,0 0 0 6px #0085b3
}

.nsw-form-checkbox__input.has-error + input[type=hidden] + .nsw-form-checkbox__label:hover:before, .nsw-form-checkbox__input[aria-invalid=true] + input[type=hidden] + .nsw-form-checkbox__label:hover:before, .nsw-form-radio__input.has-error + input[type=hidden] + .nsw-form-checkbox__label:hover:before, .nsw-form-radio__input[aria-invalid=true] + input[type=hidden] + .nsw-form-checkbox__label:hover:before {
    background-color: #f7e7eb
}

.nsw-form-checkbox__input.has-error + input[type=hidden] + .nsw-form-checkbox__label:before, .nsw-form-checkbox__input[aria-invalid=true] + input[type=hidden] + .nsw-form-checkbox__label:before, .nsw-form-radio__input.has-error + input[type=hidden] + .nsw-form-checkbox__label:before, .nsw-form-radio__input[aria-invalid=true] + input[type=hidden] + .nsw-form-checkbox__label:before {
    border-width: 2px;
    border-color: #b81237
}




.nsw-form__checkbox-input:hover + input[type=hidden] + .nsw-form__checkbox-label:before, .nsw-form__checkbox-input:hover + input[type=hidden] + .nsw-form__radio-label:before, .nsw-form__radio-input:hover + input[type=hidden] + .nsw-form__checkbox-label:before, .nsw-form__radio-input:hover + input[type=hidden] + .nsw-form__radio-label:before {
    background-color: rgba(0,133,179,.2)
}

.nsw-form__checkbox-input:checked + input[type=hidden] + .nsw-form__checkbox-label:after, .nsw-form__radio-input:checked + input[type=hidden] + .nsw-form__checkbox-label:after {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg fill='%23fff' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M29.362 3.742L10.495 22.946l-7.857-7.997L0 17.634l9.175 9.34 1.319 1.284 1.318-1.284L31.999 6.427z'/%3E%3C/svg%3E");
    background-color: #002664
}

.nsw-form__checkbox-input:checked + input[type=hidden] + .nsw-form__radio-label:after, .nsw-form__radio-input:checked + input[type=hidden] + .nsw-form__radio-label:after {
    background-color: #002664
}

.nsw-form__checkbox-input:disabled + input[type=hidden] + .nsw-form__checkbox-label, .nsw-form__checkbox-input:disabled + input[type=hidden] + .nsw-form__radio-label, .nsw-form__radio-input:disabled + input[type=hidden] + .nsw-form__checkbox-label, .nsw-form__radio-input:disabled + input[type=hidden] + .nsw-form__radio-label {
    cursor: not-allowed
}

    .nsw-form__checkbox-input:disabled + input[type=hidden] + .nsw-form__checkbox-label:before, .nsw-form__checkbox-input:disabled + input[type=hidden] + .nsw-form__radio-label:before, .nsw-form__radio-input:disabled + input[type=hidden] + .nsw-form__checkbox-label:before, .nsw-form__radio-input:disabled + input[type=hidden] + .nsw-form__radio-label:before {
        border-color: #a0a5ae;
        background-color: #f4f4f7
    }

.nsw-form__checkbox-input:disabled:checked + input[type=hidden] + .nsw-form__checkbox-label:after, .nsw-form__checkbox-input:disabled:checked + input[type=hidden] + .nsw-form__radio-label:after, .nsw-form__radio-input:disabled:checked + input[type=hidden] + .nsw-form__checkbox-label:after, .nsw-form__radio-input:disabled:checked + input[type=hidden] + .nsw-form__radio-label:after {
    background-color: #a0a5ae
}

.nsw-form__checkbox-input:focus + input[type=hidden] + .nsw-form__checkbox-label:before, .nsw-form__radio-input:focus + input[type=hidden] + .nsw-form__checkbox-label:before {
    outline: 3px solid #0085b3;
    outline-offset: 0;
    outline-offset: 3px
}

.nsw-form__checkbox-input:focus + input[type=hidden] + .nsw-form__radio-label:before, .nsw-form__radio-input:focus + input[type=hidden] + .nsw-form__radio-label:before {
    box-shadow: 0 0 0 3px #fff,0 0 0 6px #0085b3
}

.nsw-form__checkbox-input.has-error + input[type=hidden] + .nsw-form__checkbox-label:hover:before, .nsw-form__checkbox-input[aria-invalid=true] + input[type=hidden] + .nsw-form__checkbox-label:hover:before, .nsw-form__radio-input.has-error + input[type=hidden] + .nsw-form__checkbox-label:hover:before, .nsw-form__radio-input[aria-invalid=true] + input[type=hidden] + .nsw-form__checkbox-label:hover:before {
    background-color: #f7e7eb
}

.nsw-form__checkbox-input.has-error + input[type=hidden] + .nsw-form__checkbox-label:before, .nsw-form__checkbox-input[aria-invalid=true] + input[type=hidden] + .nsw-form__checkbox-label:before, .nsw-form__radio-input.has-error + input[type=hidden] + .nsw-form__checkbox-label:before, .nsw-form__radio-input[aria-invalid=true] + input[type=hidden] + .nsw-form__checkbox-label:before {
    border-width: 2px;
    border-color: #b81237
}
