/* iets doen bij required fields */
/*[data-rule-required="true"] {
    border: 3px solid #f00!important
}*/

/* GENERAL FORM */
.content p+.form {
    margin-top: var(--blockpadding);
}

.content .form form {
    width: 100%;
    max-width: 800px;
    position: relative;
}

.content .form form .field {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

/*.content .form form .field:not(.heading):not(.paragraph) { margin-bottom: var(--blockpadding); border-bottom: 1px solid #e5e5e5; }*/


/* FIELD TYPES AND INPUTS */

/* Tekstveld (Algemeen) */
form div.field.bc {
    display: none !important;
}

.content .form form .field>label:not(.error),
.content .form form .field legend {
    margin-top: -5px;
    font-weight: 700;
}

.content .form form .field.textfield {
    margin-bottom: 15px;
}

.content .form form .field-wrap {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.content .form form .field-wrap-wrapper {
    display: flex;
    gap: 15px;
}

/* wrapper for date and time inputs */

.content .form form input[type=text],
.content .form form input[type=number],
.content .form form input[type=email],
.content .form form input[type=tel],
.content .form form input[type=date],
.content .form form input[type=time],
.content .form form input[type=datetime-local],
.content .form form textarea,
.content .form form select,
#mailstage input[type=email] {
    margin-top: 3px;
    padding: 10px;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border: 2px solid var(--bodycolor2);
    border-radius: 5px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--bodycolor2);
}

.content .form form input.phoneNL {
    width: 50%;
    min-width: 160px;
}

.content .form form input.postalcodeNL {
    width: 25%;
    min-width: 120px;
}

.content .form form input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=number]),
.content .form form select {
    margin-bottom: 5px;
    height: 48px;
}

/* consistent height for all (most) input fields */

.content .form form input[aria-invalid=false],
.content .form form textarea[aria-invalid=false],
.content .form form select[aria-invalid=false] {
    border: 2px solid var(--success);
}

/* green border when valid input */

.row:nth-of-type(even) .content .form form input[type=text],
.row:nth-of-type(even) .content .form form input[type=number],
.row:nth-of-type(even) .content .form form input[type=email],
.row:nth-of-type(even) .content .form form input[type=tel],
.row:nth-of-type(even) .content .form form input[type=date],
.row:nth-of-type(even) .content .form form input[type=time],
.row:nth-of-type(even) .content .form form input[type=datetime-local],
.row:nth-of-type(even) .content .form form textarea,
.row:nth-of-type(even) .content .form form select,
.row:nth-of-type(even) .content .form form textarea,
.row:nth-of-type(even) .content .form form select {
    background-color: var(--bodycolor1);
}

/* Nummerveld */
.content .form form .field.numberfield {
    margin-top: 30px;
    margin-bottom: 40px;
}

.content .form form .field-wrap.range-field {
    display: flex;
    align-items: center;
    flex-direction: row;
    column-gap: 1em;
}

.content .form form .field-wrap.range-field .range-output-value {
    padding: 5px 10px;
    background-color: var(--bodycolor2);
    border-radius: 2px;
    color: var(--textcolor1);
    font-size: 0.9em;
    position: relative;
    border-radius: 3px;
}

.content .form form .field-wrap.range-field .range-output-value::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-bottom: 5px solid #fff0;
    border-top: 5px solid #fff0;
    border-right: 7px solid var(--bodycolor2);
    position: absolute;
    top: 50%;
    left: -7px;
    transform: translateY(-50%);
}

.row:nth-of-type(even) .content .form form .field-wrap.range-field .range-output-value {
    background-color: var(--bodycolor1);
}

.row:nth-of-type(even) .content .form form .field-wrap.range-field .range-output-value::before {
    border-right: 7px solid var(--bodycolor1);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    /* width: 25rem; */
    border: none !important;
    border-radius: 2px;
}

input[type="range"]:focus {
    outline: none;
}

/* Chrome, Safari, Opera and Edge Chromium styles */
input[type="range"]::-webkit-slider-runnable-track {
    background-color: var(--bodycolor2);
    border-radius: 0.5rem;
    height: 0.5rem;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -4px;
    background-color: var(--color1);
    border-radius: 0.5rem;
    height: 1rem;
    width: 1rem;
}

input[type="range"]:focus::-webkit-slider-thumb {
    outline: 3px solid var(--color1);
    outline-offset: 0.125rem;
}

.row:nth-of-type(even) input[type="range"]::-webkit-slider-runnable-track {
    background-color: var(--bodycolor1);
}

/* Firefox styles */
input[type="range"]::-moz-range-track {
    background-color: var(--bodycolor2);
    border-radius: 0.5rem;
    height: 0.5rem;
}

input[type="range"]::-moz-range-thumb {
    background-color: var(--color1);
    border: none;
    border-radius: 0.5rem;
    height: 1rem;
    width: 1rem;
}

input[type="range"]:focus::-moz-range-thumb {
    outline: 3px solid var(--color1);
    outline-offset: 0.125rem;
}

.row:nth-of-type(even) input[type="range"]::-moz-range-track {
    background-color: var(--bodycolor1);
}

/* Tekstblok */
.content .form form textarea {
    min-height: 150px;
    max-height: 300px;
    max-width: 100%;
    resize: none;
}

/* Checkboxes en Radiobuttons */
.content .form form .field.checkbox label,
.content .form form .field.checkboxes label,
.content .form form .field.radio label {
    display: flex;
    flex-direction: row;
    cursor: pointer;
}

.content .form form .field.checkbox label span,
.content .form form .field.checkboxes label span,
.content .form form .field.radio label span {
    width: calc(100% - 25px);
}

.content .form form input[type=checkbox],
.content .form form input[type=radio] {
    margin: 0;
    margin-top: 0;
    margin-right: 10px;
    padding: 0;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    transform: translateY(5px);
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--bodycolor2);
}

.content .form form input[type=checkbox]:hover,
.content .form form input[type=radio]:hover {
    background-color: var(--bodycolor3);
}

.content .form form input[type=checkbox]:checked,
.content .form form input[type=radio]:checked {
    background-color: var(--success);
    background-color: var(--success);
    background-image: url('/images/icons/checkmark-checkbox-radio.svg');
    background-size: 16px;
    background-position: center;
    background-repeat: no-repeat;
}

.row:nth-of-type(even) form input[type=checkbox],
.row:nth-of-type(even) form input[type=radio] {
    background-color: var(--bodycolor1);
}


/* Checkbox (enkel) */
.content .form form .field.checkbox {
    margin-top: 30px;
}

/* Checkboxset */

/* Radiobuttons */
.content .form form input[type=radio] {
    border-radius: 100%;
}

/* Select */
.content .form form select {
    background-image: url('/images/icons/arrow-dropdown.svg');
    background-position: right 10px center;
    background-size: 16px;
    background-repeat: no-repeat;
}

/* specific icons */

/* Datumkeuze / Tijdkeuze / Datum-/tijdkeuze */
.content .form form input::-webkit-calendar-picker-indicator {
    position: relative;
    right: 0;
    width: calc(22px + 15px);
    height: 22px;
    /*background-color: rgba(0,0,0,0.1);*/
}

.content .form form input[type=date],
.content .form form input[type=time],
.content .form form input[type=datetime-local] {
    background-image: url(/images/icons/arrow-dropdown.svg);
    background-position: right 10px center;
    background-size: 16px;
    background-repeat: no-repeat;
}
/* Disable dropdown icon for firefox since it overlaps with the calendar icon */
@-moz-document url-prefix() {
    .content .form form input[type=date],
    .content .form form input[type=time],
    .content .form form input[type=datetime-local] {
        background-image: none;
    }
}

/* dropdown icon */

/* Datumkeuze */
.content .form form input[type=date]::-webkit-calendar-picker-indicator {
    top: -1px;
    background-image: url("/images/icons/date-dropdown.svg");
}

/* Tijdkeuze */
.content .form form input[type=time]::-webkit-calendar-picker-indicator {
    background-image: url("/images/icons/time-dropdown.svg");
}

/* Datum-/Tijdkeuze */
.content .form form input[type=datetime-local]::-webkit-calendar-picker-indicator {
    top: -1px;
    background-image: url("/images/icons/datetime-dropdown.svg");
}

/* Koptekst */
.content .form form .field.heading {
    margin-bottom: 0;
}

.content .form form .field.heading h3 {
    margin-bottom: 30px;
}

/* Paragraaf */
.content .form form .field.paragraph {
    font-size: 0.9em;
}

.content .form form .field.heading+.field.paragraph {
    margin-top: -20px;
}

.content .form form .field span.form-note {
    font-size: 0.8em;
    font-style: italic;
    display: block;
    opacity: 0.7;
    line-height: 1;
    margin-bottom: 10px;
}

/* Bestand uploaden */
input[type=file]::-ms-browse {
    color: #f00;
}

.content .form form input[type=file] {
    border-radius: 5px;
}

.content .form form input[type=file],
.content .form form input[type=file]::-webkit-file-upload-button {
    font-family: inherit;
    font-size: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.content .form form input[type=file] {
    -webkit-appearance: none;
    appearance: none;
    margin-top: 7px;
}

.content .form form input[type=file]::-webkit-file-upload-button {
    margin-right: 15px;
    padding: 10px 15px;
    color: var(--textcolor1);
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--bodycolor2);
}

.content .form form input[type=file]::-webkit-file-upload-button:hover {
    filter: brightness(1.02);
}

.row:nth-of-type(even) .content .form form input[type=file]::-webkit-file-upload-button {
    background-color: var(--bodycolor1);
}

.field.fileupload input {
    border-radius: 5px;
}


/* SUBMIT BUTTON */
.content .form form .btn.submit {
    margin-top: 10px;
}

/* THANKS MESSAGE */
.form-thanks {
    background: var(--color1);
    color: var(--bodycolor1);
    padding: var(--blockpadding);
    border-radius: var(--blockradius);
    display: none;
}

/* REQUIRED FIELDS/STARS */
.content .form form .field.field-required>label:not(.error):after,
.content .form form .field.field-required.checkbox label:not(.error):after,
.content .form form .field.field-required fieldset legend:after {
    content: " *";
}

.content .form form .field.field-required.checkbox label:not(.error):after {
    padding-left: 5px;
}

.content .form form .field.field-required.radio label:after,
.content .form form .field.field-required.checkboxes label:after {
    display: none;
}

/* ERROR/VALIDATION LABELS */
#mailstage form label.error,
.content .form form label.error {
    display: block;
    width: auto;
    line-height: 1;
    border-radius: 100%;
    font-size: 0.8em;
    margin-bottom: 5px;
    color: var(--error);
}

.content .form form label.error.checked {
    position: absolute;
    display: none !important;
    top: 10px;
    right: 0;
    margin: 0;
    color: var(--color1);
    width: 30px;
    height: 30px;
    background-color: var(--color1);
    background-image: url('/images/icons/form-checkmark.svg');
    background-position: center;
    background-size: 16px;
    background-repeat: no-repeat;
}

.content .form form .field.field-required.radio label.error,
.content .form form .field.field-required.checkboxes label.error {
    /*position: absolute; left: 0; bottom: -20px;*/
}

.content .form form label.error:after {
    content: "";
}

.content .form form label.error.checked:after {
    border-top-color: var(--color1);
}


@media screen and (max-width: 1000px) {

    /* FIELD TYPES AND INPUTS */

    /* Tekstveld (Algemeen) */
    .content .form form .field>label {
        pointer-events: none;
    }

    .content .form form .field-wrap-wrapper {
        flex-direction: column;
    }

    .content .form form input.phoneNL {
        width: 75%;
    }

    .content .form form input.postalcodeNL {
        width: 50%;
    }

    /* Datumkeuze / Tijdkeuze / Datum-/tijdkeuze */
    .content .form form input::-webkit-calendar-picker-indicator {
        display: none;
    }

    .content .form form input[type=date],
    .content .form form input[type=time],
    .content .form form input[type=datetime-local] {
        background-position: right 10px center;
        background-size: 22px;
        background-repeat: no-repeat;
    }

    .content .form form input[type=date] {
        background-image: url(/images/icons/date-dropdown.svg);
    }

    .content .form form input[type=time] {
        background-image: url(/images/icons/time-dropdown.svg);
    }

    .content .form form input[type=datetime-local] {
        background-image: url(/images/icons/datetime-dropdown.svg);
    }

}
