/*
 * mod_visicor_enquiry: uses the brand tokens (--vc-*) from plg_system_visicor. Inputs, buttons and focus rings come
 * from the brand layer (section 10 Forms); this file adds the layout and the error / success states.
 * No colour carries meaning alone: errors always have text and a left rule, required fields an asterisk and
 * aria-required.
 */
.vc-enquiry {
	max-width: 46rem;
	margin-inline: auto;
	scroll-margin-top: var(--vc-header-offset, 96px);
}

.vc-enquiry__required-note { margin: 0 0 1.25rem; font-size: var(--vc-small); }

.vc-enquiry__grid { display: grid; gap: 0 1.5rem; grid-template-columns: 1fr; }

@media (min-width: 768px) {
	.vc-enquiry__grid { grid-template-columns: 1fr 1fr; }
}

.vc-field { margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }

.vc-field label,
.vc-field legend { display: block; margin: 0 0 0.375rem; padding: 0; font-weight: 600; font-size: 1rem; line-height: 1.4; float: none; width: auto; }

.vc-field input[type="text"],
.vc-field input[type="email"],
.vc-field input[type="tel"],
.vc-field select,
.vc-field textarea { display: block; width: 100%; padding: 0.625rem 0.75rem; line-height: 1.4; }

.vc-field textarea { min-height: 9rem; resize: vertical; }

.vc-req { color: #8a1c1c; }
.vc-opt { font-weight: 400; font-size: var(--vc-small); }
.vc-hint { margin: 0.25rem 0 0; font-size: var(--vc-small); color: var(--vc-ink); }

.vc-error { margin: 0.375rem 0 0; font-size: var(--vc-small); }
.vc-error::before { content: "\26A0\FE0E\00a0"; }

.vc-field--error input[type="text"],
.vc-field--error input[type="email"],
.vc-field--error input[type="tel"],
.vc-field--error select,
.vc-field--error textarea { border-color: #8a1c1c; border-width: 2px; }

/* Radios and the consent tick: big enough to hit, label beside the control. */
.vc-choices { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.vc-choice { display: flex; align-items: flex-start; gap: 0.625rem; }
.vc-choice input { flex: none; width: 1.5rem; height: 1.5rem; margin: 0.0625rem 0 0; accent-color: var(--vc-black); }
.vc-choice label { margin: 0; font-weight: 400; }
.vc-field--consent .vc-choice label { font-weight: 400; max-width: var(--vc-measure); }

/* Error summary and success message. */
.vc-enquiry__errors,
.vc-enquiry__success {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	background: var(--vc-cream);
	border-inline-start: 6px solid var(--vc-black);
	border-radius: var(--vc-radius);
}

.vc-enquiry__errors { border-inline-start-color: #8a1c1c; }

.vc-enquiry__errors-title,
.vc-enquiry__success-title { margin: 0 0 0.5rem; font-size: var(--vc-h3); }

.vc-enquiry__errors p,
.vc-enquiry__success p { margin: 0 0 0.5rem; }

.vc-enquiry__errors ul { margin: 0; padding-inline-start: 1.25rem; }
.vc-enquiry__errors a { color: #8a1c1c; font-weight: 600; text-decoration: underline; }

.vc-enquiry__success:focus,
.vc-enquiry__errors:focus { outline: 2px solid var(--vc-black); outline-offset: 2px; }

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.vc-enquiry__hp {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.vc-enquiry__actions { margin: 1.5rem 0 0; }
.vc-enquiry .vc-btn[aria-disabled="true"] { opacity: 0.7; cursor: progress; }

@media (prefers-reduced-motion: reduce) {
	.vc-enquiry * { transition: none !important; animation: none !important; }
}

/* The Regarding select picked up a 38px height and 14px text from the template, which cut its text in half. */
:root:root:root .vc-field select {
	height: auto;
	min-height: 2.75rem;
	font-size: 1rem;
	line-height: 1.4;
	padding: 0.625rem 2.25rem 0.625rem 0.75rem;
}
