/*
*   BT form CSS
*
*   created by: Luca Vimercati
*/

label {
    margin-bottom: .25rem;
}

.form-group {
    margin-bottom: .5rem;
}

.form-group.textarea-group {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
        -ms-flex-direction: column;
            flex-direction: column;
    width: 100%;
}

.form-group textarea.form-control {
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
        -ms-flex-positive: 1;
            flex-grow: 1;
}

.form-group:not(.is-invalid) .form-control:focus {
    border-color: #336f9f;
    -webkit-box-shadow: 0 0 0 0.2rem rgba(51, 111, 159,.25);
            box-shadow: 0 0 0 0.2rem rgba(51, 111, 159,.25);
}

.form-control:focus {
    border-color: #336f9f;
    -webkit-box-shadow: 0 0 0 0.2rem rgba(51, 111, 159,.25);
            box-shadow: 0 0 0 0.2rem rgba(51, 111, 159,.25);
}

.form-group.is-invalid .form-control:focus {
    border-color: #336f9f;
    -webkit-box-shadow: 0 0 0 0.2rem rgba(243,111,35,.25);
            box-shadow: 0 0 0 0.2rem rgba(243,111,35,.25);
}
.form-group.is-invalid label {
    color: #DC3545;
}
.form-group.is-invalid .form-control {
    border-color: #DC3545;
}

.form-group-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: auto;
    cursor: pointer;
}

.form-group-checkbox label {
    cursor: pointer;
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
        -ms-flex-align: center;
            align-items: center;
    margin: 0;
}

.form-group-checkbox label:before {
    content: "";
    background-color: #fff;
    border: 1px solid #DEDEDE;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    text-align: center;
    color: #FFF;
    background-color: #FFF;
    -webkit-transition: background-color .2s linear 0s, border-color .2s linear 0s;
    -o-transition: background-color .2s linear 0s, border-color .2s linear 0s;
    transition: background-color .2s linear 0s, border-color .2s linear 0s;
}

.form-group-checkbox input[type=checkbox]:checked+label:before {
    content: "\f00c";
    font-weight: 900;
    font-family: "Font Awesome 5 Free";
    background-color: #F36F23;
    border-color: #F36F23;
    font-size: 13px;
}

.inline-checkbox {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

.inline-checkbox>.form-group-checkbox:not(:first-child) {
    padding-left: 10px;
    border-left: 1px solid #DEDEDE;
}

.inline-checkbox>.form-group-checkbox:not(:last-child) {
    padding-right: 10px;
    border-right: 1px solid #DEDEDE;
}

.input-group>.custom-select:not(:last-child), .input-group>.form-control:not(:last-child) {
    border-top-right-radius: .25rem;
    border-bottom-right-radius: .25rem;
}

.input-group>.input-group-append>.btn, .input-group>.input-group-append>.input-group-text, .input-group>.input-group-prepend:first-child>.btn:not(:first-child), .input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child), .input-group>.input-group-prepend:not(:first-child)>.btn, .input-group>.input-group-prepend:not(:first-child)>.input-group-text {
    border-top-left-radius: .25rem;
    border-bottom-left-radius: .25rem;
}

.custom-checkbox .custom-control-input {
    position: absolute;
    z-index: -1;
    opacity: 0;
    outline: none !important;
}

.custom-checkbox .custom-control-input,
.custom-checkbox .custom-control-label {
    cursor: pointer;
}

.custom-checkbox .custom-control-label::before {
    position: absolute;
    top: .15rem;
    left: 0;
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
    content: "";
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: #fff;
    border: 1px solid #DEDEDE;
    border-radius: .25rem;
    -webkit-transition: background-color .2s linear 0s, border-color .2s linear 0s;
    -o-transition: background-color .2s linear 0s, border-color .2s linear 0s;
    transition: background-color .2s linear 0s, border-color .2s linear 0s;
}

.custom-checkbox .custom-control-label::after {
    position: absolute;
    top: .15rem;
    left: 0;
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    content: "";
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 50% 50%;
}

.custom-checkbox .custom-control-input:checked~.custom-control-label::before {
    color: #fff;
    background-color: #F36F23;
    border-color: #F36F23;
}

.custom-checkbox .custom-control-input:checked~.custom-control.custom-checkbox .custom-control-label::after {
    content: "\f00c";
    font-weight: 900;
    font-family: "Font Awesome 5 Free";
    font-size: .75rem;
    color: #fff;

    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
        -ms-flex-pack: center;
            justify-content: center;
}

.custom-control-input:focus~.custom-control-label::before {
    box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(243,111,35,.25);
}

.custom-control-label::before {
    background-color: #fff;
    border: 1px solid #dedede;
}

.custom-radio .custom-control-input:checked~.custom-control-label::before,
.custom-control-input:checked~.custom-control-label::before {
    background-color: #F36F23;
    border-color: #F36F23;
}

.custom-control-input:active~.custom-control-label::before {
    background-color: #F7A373;
}