/* ============================================================
   Crown — Contact Form 7 integration
   Styles the CF7 output to match the original hand-built forms.
   ============================================================ */

.crown-site .wpcf7 {
	margin: 0;
	padding: 0;
}

.crown-site .wpcf7 form {
	margin: 0;
	padding: 0;
}

.crown-site .wpcf7-form-control-wrap {
	display: block;
}

.crown-site .wpcf7-form-control-wrap[data-name] {
	display: block;
}

/* CF7 wraps every template line in <p> and inserts <br /> after each label.
   The original hand-built forms rely on Bootstrap's `row g-3` gutters only,
   so neutralise the <p> margins and hide the <br />. The form notes keep
   their own margin via .crown-*-note. */
.crown-site .crown-enquiry-form p:not(.crown-enquiry-note):not(.crown-quote-form-note),
.crown-site .crown-quote-form p:not(.crown-enquiry-note):not(.crown-quote-form-note) {
	margin: 0;
}

.crown-site .crown-enquiry-form p br,
.crown-site .crown-quote-form p br {
	display: none;
}

/* CF7 also wraps the [submit] in a <p>; the paragraph's text-node strut
   inflates it (93-97px vs the 52px button). Block button + zero line box. */
.crown-site .crown-enquiry-form p .btn,
.crown-site .crown-quote-form p .btn {
	display: block;
}

.crown-site .crown-enquiry-form p:has(.btn),
.crown-site .crown-quote-form p:has(.btn) {
	font-size: 0;
	line-height: 0;
}

/* Hidden fields injected by CF7 must not create layout space. */
.crown-site .wpcf7-form .wpcf7-form-control-wrap.hidden,
.crown-site .wpcf7-form input[type="hidden"] {
	display: none !important;
}

/* ---- Submit button (input -> button, so ::after icon works) ---- */
.crown-site .crown-enquiry-submit::after,
.crown-site .crown-quote-submit::after {
	content: "\f061";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-style: normal;
	text-decoration: none;
	line-height: 1;
	display: inline-block;
	vertical-align: middle;
}

/* Contact page "Get A Quote" button to match original small size */
.crown-site .crown-header-actions .crown-quote-submit {
	display: inline-block;
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
	border-radius: 6px;
}

/* ---- Validation tips ---- */
.crown-site .wpcf7-not-valid-tip {
	color: #d9381f;
	font-size: 0.78rem;
	margin-top: 0.3rem;
}

.crown-site .wpcf7-form-control.wpcf7-not-valid {
	border-color: #d9381f;
}

/* ---- Response output ---- */
.crown-site .wpcf7-response-output {
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	font-size: 0.88rem;
}

.crown-site .wpcf7-spinner {
	display: none;
}

/* ---- Parts condition checkboxes ---- */
.crown-site .crown-parts-condition.wpcf7-checkbox {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	margin-top: 0.35rem;
}

.crown-site .crown-parts-condition .wpcf7-list-item {
	margin: 0;
}

.crown-site .crown-parts-condition .wpcf7-list-item > label {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0;
	color: var(--crown-navy);
	font-weight: 500;
	cursor: pointer;
}

.crown-site .crown-parts-condition .wpcf7-list-item input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
	accent-color: var(--crown-gold);
	margin: 0;
}

.crown-site .crown-parts-condition .wpcf7-list-item-label {
	line-height: 1.4;
}
