﻿form h5 {
    margin-bottom: 8px;
}

form h6 {
    margin-left: 34px;
    height: 40px;
    line-height: 14px;
    visibility: hidden;
    color: var(--error);
    margin-top: 2px;
}

form input, form select, form textarea {
    all: unset;
    position: relative;
    background-color: var(--field-background);
    padding: 12px 32px;
    border-radius: 16px;
    border: 2px solid var(--field-background);
}

form textarea {
    height: 144px;
    word-wrap: break-word;
}

form .textarea-counter {
    margin-left: auto;
    height: 0;
    overflow: visible;
    font-family: 'Montserrat';
    color: var(--grey-05);
    font-weight: 500;
    font-size: 10px;
    line-height: 18px;
}

form select {
    padding-right: 48px;
    background-image: url("/Public/NewImages/dropdown-arrow.svg");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

form.dirty input:invalid, form.dirty select:invalid, form.dirty textarea:invalid {
    border-color: var(--error);
}

form input:focus, form select:focus, form textarea:focus {
    border-color: var(--blue) !important;
}

form.dirty *:invalid + h6, form.dirty textarea:invalid + * + h6 {
    visibility: visible;
}

form .required::after {
    content: '*';
    color: var(--error);
}


/* checkbox */

.checkbox {
    display: inline-flex;
    align-items: center;
    vertical-align: top;
    width: inherit;
    max-width: 100%;
    font-weight: normal;
}

    .checkbox > .checkbox-input + .checkbox-box {
        cursor: pointer;
    }

    .checkbox > .checkbox-input:disabled + .checkbox-box {
        cursor: default;
        filter: none;
    }

.checkbox-input {
    position: absolute;
    appearance: none;
    outline: none;
    border: none;
}

.checkbox-box {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 16px;
    height: 17px;
    background-image: url("../img/border.svg");
}

.checkbox-input:focus + .checkbox-box,
.checkbox:hover > .checkbox-box {
    filter: drop-shadow(var(--icon-shadow));
}

.checkbox-input:disabled + .checkbox-box {
    background-image: url("../img/border-disabled.svg");
}


.checkbox-input:checked + .checkbox-box:before {
    content: '';
    margin-left: 1px;
    width: 9px;
    height: 7px;
    background-image: url("../img/ticked.svg");
    background-repeat: no-repeat;
}

.checkbox-input:checked:disabled + .checkbox-box:before {
    background-image: url('../img/ticked-disabled.svg');
}

.checkbox-text {
    margin-left: 16px;
    margin-right: 8px;
}

.checkbox-input:disabled ~ .checkbox-text {
    color: var(--grey-06);
}
