/* Bits shared by every request form - the boat detail page's own contact
form, the partner-request modal, and the standalone /transport /insurance
/financing /expert /contact-other pages. Driven by shared/js/
request-form-utils.js and partner-request-form.js, so the styling belongs
next to them rather than in each group's site.css. */

/* Field the API rejected (request-form-utils.js markFieldErrors(), the blog comment form server-side) - same
background as Bootstrap's own .alert-danger, so the flagged input visually matches the error message above it.
Not by colour alone (owner, 2026-09-25; WCAG 1.4.1 - red is what red-green colour blindness cannot tell apart): a
stronger border and the warning icon of Bootstrap's own .is-invalid at the right end of the field (an inline SVG, no
file to load); aria-invalid tells a screen reader. A select keeps its arrow, the icon sits left of it. */
.boat-contact-field-error,
.form-control.boat-contact-field-error,
.form-select.boat-contact-field-error {
    --field-error-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-color: var(--bs-danger-bg-subtle);
    border-color: var(--bs-danger);
    /* Looks like a 2px border without changing the field's size (a thicker border-width would shift the form). */
    box-shadow: inset 0 0 0 1px var(--bs-danger);
}

.form-control.boat-contact-field-error {
    padding-right: calc(1.5em + .75rem);
    background-image: var(--field-error-icon);
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

textarea.form-control.boat-contact-field-error {
    background-position: top calc(.375em + .1875rem) right calc(.375em + .1875rem);
}

.form-select.boat-contact-field-error:not([multiple]):not([size]) {
    padding-right: 4.125rem;
    background-image: var(--bs-form-select-bg-img), var(--field-error-icon);
    background-position: right .75rem center, center right 2.25rem;
    background-size: 16px 12px, calc(.75em + .375rem) calc(.75em + .375rem);
}

.form-check-input.boat-contact-field-error {
    outline: 2px solid var(--bs-danger);
    outline-offset: 2px;
}

/* Insurance partner logo, next to the "Versicherungs-Anfrage an" heading in
the modal and on the standalone page - capped to the title's own line height
so a wide logo doesn't tower over the text beside it. */
.partner-request-logo {
    max-height: 28px;
    width: auto;
}

/* Messages that get the focus by script for screen readers (request-form-utils.js, blog-comment-form.js):
no ring around a whole text box, it is not a control. */
[data-comment-feedback]:focus,
p.text-success[role="status"]:focus {
    outline: none;
}
