/* BOVF Forms — inherits theme colours via the theme.json presets. */

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

.bovf-field {
	margin-bottom: 1.5rem;
}

.bovf-field label,
.bovf-field legend {
	display: block;
	margin-bottom: 0.4rem;
	font-weight: 600;
}

.bovf-field fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}

.bovf-required {
	color: var(--wp--preset--color--red, #D7263D);
}

.bovf-help {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	opacity: 0.8;
}

.bovf-form input[type="text"],
.bovf-form input[type="email"],
.bovf-form input[type="tel"],
.bovf-form input[type="url"],
.bovf-form select,
.bovf-form textarea {
	width: 100%;

	/* Without this the padding and border are added to the 100%, so every
	   field is wider than the column holding it — invisible on a desktop
	   where there is slack either side, and on a phone it pushes the whole
	   page sideways: 388px of content in a 375px window. */
	box-sizing: border-box;

	padding: 0.85rem 1rem;
	font: inherit;
	color: inherit;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--wp--preset--color--line, rgba(255, 255, 255, 0.12));
	border-radius: 4px;
}

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

.bovf-form :focus-visible {
	outline: 2px solid var(--wp--preset--color--red, #D7263D);
	outline-offset: 2px;
}

/* Choice rows: label beside the control, whole row tappable. */
.bovf-choice {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	margin-bottom: 0.6rem;
	min-height: 44px;
}

.bovf-choice input {
	margin-top: 0.35rem;
	width: 1.15rem;
	height: 1.15rem;
	flex: none;
}

.bovf-choice label {
	margin: 0;
	font-weight: 400;
}

.bovf-field.has-error input,
.bovf-field.has-error select,
.bovf-field.has-error textarea {
	border-color: #E4736B;
}

.bovf-error {
	margin: 0.4rem 0 0;
	color: #E4736B;
	font-size: 0.9375rem;
}

.bovf-form-errors {
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid #E4736B;
	border-radius: 4px;
}

.bovf-form-errors ul {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}

.bovf-form-success {
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--wp--preset--color--green, #145A32);
	border-radius: 4px;
}

.bovf-submit {
	width: 100%;
	padding: 1rem 1.75rem;
	font: inherit;
	font-weight: 700;
	color: var(--wp--preset--color--paper, #FFFFFF);
	background: var(--wp--preset--color--red, #D7263D);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 150ms ease;
}

.bovf-submit:hover,
.bovf-submit:focus-visible {
	background: #B81E32;
}

@media (min-width: 601px) {
	.bovf-submit {
		width: auto;
	}
}

/* Honeypot: hidden from sight and from assistive technology. */
.bovf-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
