/*
 * Contact Form 7 6.x compatibility for the legacy reserve and sell forms.
 * Rules are scoped by Contact Form 7 form ID to avoid changing other forms.
 */

/* Keep the fixed-width mobile forms inside narrow viewports. */
[id^="wpcf7-f302-"] .form_inner,
[id^="wpcf7-f720-"] .form_inner {
	width: calc(100vw - 40px);
	max-width: 330px;
}

/* Fit the reserve date and time controls into the available form width. */
[id^="wpcf7-f302-"] .form_content_date_inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(100px, 130px);
	gap: 4px;
}

[id^="wpcf7-f302-"] .form_content_date_item input[type="date"],
[id^="wpcf7-f302-"] .form_content_select_time select {
	width: 100%;
	margin-right: 0;
}

/* Desktop acceptance checkbox: reserve 318 and sell 721. */
[id^="wpcf7-f318-"] .form_content_agree .wpcf7-list-item,
[id^="wpcf7-f721-"] .form_content_agree .wpcf7-list-item {
	margin: 0;
}

/* Mobile acceptance switch: reserve 302 and sell 720. */
[id^="wpcf7-f302-"] .form_content_agree_switch .wpcf7-list-item,
[id^="wpcf7-f720-"] .form_content_agree_switch .wpcf7-list-item {
	margin: 0;
}

[id^="wpcf7-f302-"] .form_content_agree_switch input[type="checkbox"],
[id^="wpcf7-f720-"] .form_content_agree_switch input[type="checkbox"] {
	display: block;
	position: static;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	width: 63px;
	height: 31px;
	margin: 0;
	padding: 0;
	border: solid 1px #3C9E00;
	border-radius: 16px;
	background-color: #FFFFFF;
	background-image: radial-gradient(circle, #3C9E00 0 13px, transparent 14px);
	background-repeat: no-repeat;
	background-position: 1px center;
	background-size: 29px 29px;
	cursor: pointer;
	opacity: 1;
	transition: background-color 0.5s, background-position 0.5s;
}

[id^="wpcf7-f302-"] .form_content_agree_switch input[type="checkbox"]:checked,
[id^="wpcf7-f720-"] .form_content_agree_switch input[type="checkbox"]:checked {
	background-color: #3C9E00;
	background-image: radial-gradient(circle, #FFFFFF 0 13px, transparent 14px);
	background-position: 32px center;
}

[id^="wpcf7-f302-"] .form_content_agree_switch input[type="checkbox"]:focus-visible,
[id^="wpcf7-f720-"] .form_content_agree_switch input[type="checkbox"]:focus-visible {
	outline: 2px solid #1B5E20;
	outline-offset: 3px;
}
