/* Shared public form states. Keep borders the same width in every state. */
:is(#contactForm, #careerForm, #catalogueRequestForm, #form-post-ebulten, #offer-form) {
    --field-border: #c2cece;
    --field-ink: #003b4b;
    --field-error: #a52e35;
}
:is(#contactForm, #careerForm, #catalogueRequestForm, #form-post-ebulten, #offer-form)
:where(input:not([type="checkbox"]):not([type="hidden"]), select, textarea) {
    box-sizing: border-box;
    border: 1px solid var(--field-border);
    border-radius: 6px;
    outline: none;
    box-shadow: none;
    background-color: #fff;
    background-image: none;
    color: var(--field-ink);
    font: inherit;
    font-size: 16px;
    line-height: 1.5;
    padding: 12px 14px;
    min-height: 48px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
:is(#contactForm, #careerForm, #catalogueRequestForm, #form-post-ebulten, #offer-form)
:where(input:not([type="checkbox"]), select, textarea):hover:where(:not(:disabled)) { border-color: #809c9f; }
:is(#contactForm, #careerForm, #catalogueRequestForm, #form-post-ebulten, #offer-form)
:where(input:not([type="checkbox"]), select, textarea):is(:focus, :focus-visible) {
    border-color: #276773;
    outline: none;
    box-shadow: 0 0 0 3px rgb(39 103 115 / 12%);
}
:is(#contactForm, #careerForm, #catalogueRequestForm, #form-post-ebulten, #offer-form)
:where(input, select, textarea)[aria-invalid="true"] {
    border-color: var(--field-error);
}
:is(#contactForm, #careerForm, #catalogueRequestForm, #form-post-ebulten, #offer-form)
:where(input, select, textarea)[aria-invalid="true"]:is(:hover, :focus, :focus-visible) { border-color: var(--field-error); }
:is(#contactForm, #careerForm, #catalogueRequestForm, #form-post-ebulten, #offer-form)
:where(input, select, textarea)[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(165 46 53 / 12%); }
:is(#contactForm, #careerForm, #catalogueRequestForm, #form-post-ebulten, #offer-form) select {
    appearance: none;
    width: 100%;
    padding-right: 44px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23003b4b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-size: 20px;
    background-repeat: no-repeat;
}
#offer-form select[aria-invalid="true"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23003b4b' stroke-width='1.6'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
}
#offer-form select option { color: #003b4b; background: #fff; }
.bolero-form .bolero-field-error {
    display: block;
    margin-top: 7px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--field-error);
    letter-spacing: normal;
}
.bolero-form .bolero-field-error[hidden], .bolero-form .invalid-feedback[hidden] { display: none !important; }
:is(#contactForm, #careerForm, #catalogueRequestForm, #form-post-ebulten, #offer-form) input[type="checkbox"] {
    appearance: auto;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #003b4b;
    background-image: none;
    box-shadow: none;
    border-radius: 3px;
    cursor: pointer;
}
:is(#contactForm, #careerForm, #catalogueRequestForm, #form-post-ebulten, #offer-form) input[type="checkbox"]:focus-visible {
    outline: 2px solid #276773;
    outline-offset: 3px;
    box-shadow: none;
}
.bolero-form .form-check, #offer-form .consent { position: relative; }
#offer-form .consent { flex-wrap: wrap; }
#offer-form .consent > span:not(.bolero-field-error) { flex: 1; }
#offer-form .consent .bolero-field-error { flex-basis: 100%; margin: 0 0 0 30px; }
#form-post-ebulten { --field-error: #ffb5b8; }
#form-post-ebulten .form-content { flex-wrap: wrap; gap: 8px; border: 0; }
#form-post-ebulten .form-content input { flex: 1; min-width: 0; }
#form-post-ebulten .form-content .bolero-field-error { order: 3; flex-basis: 100%; text-align: left; }
.bolero-form input[type="file"] { padding: 8px; }
.bolero-form input[type="file"]::file-selector-button {
    border: 0;
    border-radius: 3px;
    background: #edf2f2;
    color: #003b4b;
    padding: 7px 12px;
    margin-right: 12px;
    cursor: pointer;
    font: inherit;
}
.bolero-form button[type="submit"]:focus-visible { outline: 2px solid #276773; outline-offset: 3px; box-shadow: none; }
.swal2-confirm.custom-primary { background: #003b4b; color: #fff; border: 0; border-radius: 6px; padding: 12px 24px; }
.swal2-confirm.custom-primary:hover { background: #145565; }
.swal2-confirm.custom-primary:focus-visible { outline: 2px solid #276773; outline-offset: 3px; box-shadow: none; }

/* Telephone controls keep the country code separate from the editable number. */
.bolero-form .iti { display: block; width: 100%; color: #003b4b; }
#offer-form .fields .iti { margin-top: 10px; }
.bolero-form .iti__selected-country {
    border: 0;
    background: transparent;
    border-radius: 5px 0 0 5px;
    padding-right: 12px;
    font: inherit;
    font-size: 14px;
    box-shadow: none;
}
.bolero-form .iti__selected-country:hover { background: #edf3f3; }
.bolero-form .iti__selected-country:focus-visible { outline: 2px solid #276773; outline-offset: -3px; }
.bolero-form input.iti__tel-input::placeholder { color: #839598; opacity: 1; }
.bolero-form .iti input.iti__tel-input { width: 100%; }
.iti {
    --iti-border-color: #c2cece;
    --iti-icon-color: #527b80;
    --iti-hover-color: #edf3f3;
    --iti-mobile-popup-margin: 20px;
    font-family: Outfit, Arial, sans-serif;
    color: #003b4b;
    font-size: 15px;
}
.iti--detached-country-selector { z-index: 10000; }
.iti__country-selector { border-radius: 8px; overflow: hidden; }
.iti--inline-country-selector .iti__country-selector { box-shadow: 0 8px 28px rgb(0 59 75 / 12%); }
.iti .iti__search-input {
    min-height: 48px;
    padding: 12px 36px;
    margin: 0;
    border: 0;
    border-radius: 0;
    font: inherit;
    background: #fff;
    color: #003b4b;
    outline: none;
    box-shadow: none;
}
.iti .iti__search-input:focus { box-shadow: inset 0 -2px #276773; }
.iti .iti__country { padding-block: 12px; }
.iti .iti__country-list { max-height: 270px; }
.iti--fullscreen-popup .iti__country-list { max-height: none; }
.bolero-submit-loading {
    display: inline-flex;
    align-items: center;
    gap: .4em;
}
.bolero-submit-loading::before {
    content: "";
    width: .85em;
    height: .85em;
    flex: none;
    border: 2px solid currentColor;
    border-inline-end-color: transparent;
    border-radius: 50%;
    animation: bolero-submit-spin .75s linear infinite;
}
@keyframes bolero-submit-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .bolero-submit-loading::before { animation: none; }
    .bolero-form input, .bolero-form select, .bolero-form textarea { transition: none; }
}
