/* Contact Form 7 — theme integration
   ------------------------------------------------------------------ */

/* The theme's .input-group is display:flex. Make each CF7 field-wrap a
   full-width flex item so inputs fill the container (CF7 wraps every control in
   an inline .wpcf7-form-control-wrap). Consent is excluded — its checkbox and
   label must sit side by side. */
.contacts-form .input-group:not(.alfarm-consent) > .wpcf7-form-control-wrap,
.single-form-inner .input-group:not(.alfarm-consent) > .wpcf7-form-control-wrap {
	flex: 1 1 100%;
	width: 100%;
	min-width: 0;
}

/* Consent checkbox. We deliberately do NOT reuse .input-checkbox here: CF7's
   acceptance renders several nested <span>s, and .input-checkbox span:before
   would draw a box on each. Instead we style the real <input> directly, and keep
   the checkbox on one line with its (wrapping) label via flex. */
.alfarm-consent {
	align-items: flex-start;
	gap: 12px;
	flex-wrap: nowrap;
}
.alfarm-consent .wpcf7-form-control-wrap,
.alfarm-consent .wpcf7-acceptance,
.alfarm-consent .wpcf7-list-item {
	margin: 0;
	flex: 0 0 auto;
	width: auto;
	min-width: 0;
}
.alfarm-consent .wpcf7-list-item label {
	margin: 0;
	cursor: pointer;
}
.alfarm-consent input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	margin: 1px 0 0;
	padding: 0;
	background: #fff;
	border: 0;
	border-radius: 0 3px 0 3px;
	cursor: pointer;
	position: relative;
}
.alfarm-consent input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 8px;
	top: 3px;
	width: 7px;
	height: 13px;
	border: solid #BE1622;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.alfarm-consent .consent-text {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 9px;
	line-height: 1.5;
	color: #fff;
}
.alfarm-consent .consent-text a {
	color: #fff;
	text-decoration: underline;
}

/* Submit buttons are <input>, which can't render .button::after — so paint the
   icon as a background image (gray variant for the contact form). */
.contacts-form .wpcf7-submit {
	background-image: url("data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15.4184%202.63544C11.9762%20-0.87848%206.3935%20-0.87848%202.94917%202.63544C-0.495158%206.14936%20-0.492996%2011.8484%202.94917%2015.3646C6.39133%2018.8785%2011.9741%2018.8785%2015.4184%2015.3646C18.8605%2011.8506%2018.8605%206.15156%2015.4184%202.63544ZM3.68431%2014.6141C0.64647%2011.5129%200.64647%206.48706%203.68431%203.3859C6.72215%200.284733%2011.6454%200.284733%2014.6832%203.3859C17.7211%206.48706%2017.7211%2011.5129%2014.6832%2014.6141C11.6454%2017.7153%206.72215%2017.7153%203.68431%2014.6141Z'%20fill='%23B2B2B2'/%3e%3cpath%20d='M6.00648%204.09442C3.3535%206.8027%203.3535%2011.1907%206.00648%2013.899L10.8086%208.99669L6.00648%204.09442Z'%20fill='white'/%3e%3cpath%20d='M2.68973%2015.6294C0.955677%2013.8592%200%2011.5041%200%208.9989C0%206.49369%200.955677%204.14078%202.68973%202.36837L3.99351%203.69933C1.13081%206.62171%201.13081%2011.3761%203.99351%2014.2985L2.68973%2015.6294Z'%20fill='%23BE1522'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 15px center;
	background-size: 18px 18px;
	padding-right: 45px;
}

/* CF7 renders the message textarea at 10 rows — keep it a sensible height. */
.contacts-form textarea.input-control {
	min-height: 100px;
	height: 110px;
}

/* Validation + response messages */
.contacts-form .wpcf7-not-valid-tip,
.presentation-form .wpcf7-not-valid-tip {
	font-size: 11px;
	margin-top: 4px;
}
.wpcf7 .wpcf7-response-output {
	margin: 14px 0 0;
	padding: 8px 12px;
	font-size: 12px;
	border-radius: 4px;
}
.contacts-form .wpcf7-response-output {
	color: #fff;
}
.wpcf7-spinner {
	margin: 0 0 0 8px;
}
