/**
 * The theme's forms.
 *
 * Deliberately plain: the group's six sites share this file, and a form that
 * inherits its type and colour from each site's stylesheet looks native on all
 * of them without a per-site override.
 */

.qh-form {
	max-width: 40rem;
}

.qh-form__field {
	margin-bottom: 1.25rem;
}

.qh-form__field > label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.qh-form__required {
	color: #b32d2e;
}

.qh-form__hint {
	margin: 0 0 0.4rem;
	font-size: 0.9em;
	opacity: 0.8;
}

.qh-form input[type="text"],
.qh-form input[type="email"],
.qh-form input[type="tel"],
.qh-form select,
.qh-form textarea {
	width: 100%;
	padding: 0.7rem 0.8rem;
	border: 1px solid #b6b6b6;
	border-radius: 3px;
	background: #fff;
	font: inherit;
	color: inherit;
}

.qh-form textarea {
	resize: vertical;
	min-height: 8rem;
}

.qh-form input:focus-visible,
.qh-form select:focus-visible,
.qh-form textarea:focus-visible,
.qh-form__submit:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* The invalid state is a colour and a weight, never colour alone. */
.qh-form__field.is-invalid input,
.qh-form__field.is-invalid select,
.qh-form__field.is-invalid textarea {
	border-color: #b32d2e;
	border-width: 2px;
}

.qh-form__error {
	margin: 0.35rem 0 0;
	color: #b32d2e;
	font-weight: 600;
}

.qh-form__error-summary {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-left: 4px solid #b32d2e;
	background: #fcf0f0;
	color: #8a2224;
	font-weight: 600;
}

.qh-form__checkbox {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-weight: 400;
}

.qh-form__checkbox input {
	margin-top: 0.25rem;
	flex: 0 0 auto;
}

.qh-form__submit {
	padding: 0.8rem 2rem;
	border: 0;
	border-radius: 3px;
	background: #503454;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.qh-form__submit:hover {
	background: #3d283f;
}

/*
 * The honeypot. Positioned off screen rather than display:none, because a bot
 * that parses CSS skips a field it can see is hidden, and fills one it cannot.
 */
.qh-form__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.qh-form-success {
	padding: 1.25rem 1.5rem;
	border-left: 4px solid #9B8756;
	background: #f7f4ec;
}

.qh-form-success__message {
	margin: 0;
	font-size: 1.1em;
	font-weight: 600;
}

.qh-form-success__phone {
	margin: 0.5rem 0 0;
}

/*
 * On a purple background: the home page contact section and the purple
 * contact band. Labels take the white sans-serif of the text beside the form,
 * the button turns gold so it stands out against the purple, and everything
 * that was dark-on-light is given a colour that still reads.
 */
#section_contact .qh-form,
.hb-contact-band--purple .qh-form {
	color: #fff;
}

#section_contact .qh-form label,
.hb-contact-band--purple .qh-form label {
	font-family: "avenir-lt-pro", sans-serif;
	font-size: inherit;
	font-weight: 400;
	color: #fff;
}

#section_contact .qh-form input[type="text"],
#section_contact .qh-form input[type="email"],
#section_contact .qh-form input[type="tel"],
#section_contact .qh-form select,
#section_contact .qh-form textarea,
.hb-contact-band--purple .qh-form input[type="text"],
.hb-contact-band--purple .qh-form input[type="email"],
.hb-contact-band--purple .qh-form input[type="tel"],
.hb-contact-band--purple .qh-form select,
.hb-contact-band--purple .qh-form textarea {
	color: #333;
}

#section_contact .qh-form__required,
#section_contact .qh-form__error,
.hb-contact-band--purple .qh-form__required,
.hb-contact-band--purple .qh-form__error {
	color: #ffc9c9;
}

#section_contact .qh-form input:focus-visible,
#section_contact .qh-form select:focus-visible,
#section_contact .qh-form textarea:focus-visible,
#section_contact .qh-form__submit:focus-visible,
.hb-contact-band--purple .qh-form input:focus-visible,
.hb-contact-band--purple .qh-form select:focus-visible,
.hb-contact-band--purple .qh-form textarea:focus-visible,
.hb-contact-band--purple .qh-form__submit:focus-visible {
	outline-color: #C8B484;
}

#section_contact .qh-form__submit,
.hb-contact-band--purple .qh-form__submit {
	background: #C8B484;
	color: #503454;
}

#section_contact .qh-form__submit:hover,
.hb-contact-band--purple .qh-form__submit:hover {
	background: #d8c8a0;
}

/*
 * The thank-you box goes a darker purple than the section, with the lighter
 * gold border the button uses. White text on #3d283f is about 13:1.
 */
#section_contact .qh-form-success,
.hb-contact-band--purple .qh-form-success {
	border-left-color: #C8B484;
	background: #3d283f;
	color: #fff;
}

#section_contact .qh-form-success p,
.hb-contact-band--purple .qh-form-success p {
	color: #fff;
}
