/*
 * OCTIV contact form (Contact Form 7). Scoped to .octiv-form, the wrapper in the
 * form template; "body" in front outranks the theme's global form styles.
 */

body .octiv-form {
	--octiv-form-text: #213163;
	--octiv-form-label: #3a4254;
	--octiv-form-placeholder: #8a93a6;
	--octiv-form-field-bg: #f5f6f8;
	--octiv-form-line: #b7bfd0;
	--octiv-form-focus: #213163;
	--octiv-form-error: #b42318;

	display: flex;
	flex-direction: column;
	gap: 24px;
	font-family: inherit;
}

body .octiv-form .octiv-form__field {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

body .octiv-form .octiv-form__field > label {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	color: var(--octiv-form-label);
}

body .octiv-form .wpcf7-form-control-wrap {
	display: block;
}

body .octiv-form input[type="text"],
body .octiv-form input[type="email"],
body .octiv-form textarea {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	color: var(--octiv-form-text);
	background: var(--octiv-form-field-bg);
	border: 1px solid var(--octiv-form-line);
	border-radius: 0;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body .octiv-form input[type="text"],
body .octiv-form input[type="email"] {
	height: 48px;
}

body .octiv-form textarea {
	height: 180px;
	min-height: 120px;
	resize: vertical;
}

body .octiv-form input::placeholder,
body .octiv-form textarea::placeholder {
	color: var(--octiv-form-placeholder);
	opacity: 1;
}

body .octiv-form input[type="text"]:focus,
body .octiv-form input[type="email"]:focus,
body .octiv-form textarea:focus {
	outline: none;
	border-color: var(--octiv-form-focus);
	box-shadow: 0 0 0 1px var(--octiv-form-focus);
}

/* Consent checkbox */
body .octiv-form .wpcf7-acceptance .wpcf7-list-item {
	margin: 0;
}

body .octiv-form .wpcf7-acceptance label {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	line-height: 1.4;
	color: var(--octiv-form-label);
	cursor: pointer;
}

body .octiv-form input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	display: inline-grid;
	place-content: center;
	width: 20px;
	height: 20px;
	margin: 0;
	background: #fff;
	border: 1px solid var(--octiv-form-text);
	border-radius: 0;
	cursor: pointer;
}

body .octiv-form input[type="checkbox"]::before {
	content: "";
	width: 10px;
	height: 5px;
	margin-top: -3px;
	border: solid #fff;
	border-width: 0 0 2px 2px;
	transform: rotate(-45deg) scale(0);
	transition: transform 0.12s ease;
}

body .octiv-form input[type="checkbox"]:checked {
	background: var(--octiv-form-text);
}

body .octiv-form input[type="checkbox"]:checked::before {
	transform: rotate(-45deg) scale(1);
}

body .octiv-form input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--octiv-form-focus);
	outline-offset: 2px;
}

body .octiv-form .wpcf7-list-item-label a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Submit — the theme's "slightly rounded" button style is applied with higher specificity. */
body .octiv-form .octiv-form__actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 8px;
}

body .octiv-form input[type="submit"].octiv-form__submit {
	margin: 0;
	padding: 14px 36px !important;
	font-family: inherit;
	font-size: 18px;
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
	color: #fff;
	background: var(--octiv-form-text);
	border: 0;
	border-radius: 0 !important;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover flips to the brand lavender used by the nav highlight and the section tags. */
body .octiv-form input[type="submit"].octiv-form__submit:hover {
	color: var(--octiv-form-text);
	background: #c0b6fd;
}

body .octiv-form input[type="submit"].octiv-form__submit:focus-visible {
	outline: 2px solid var(--octiv-form-focus);
	outline-offset: 3px;
}

body .octiv-form .wpcf7-spinner {
	margin: 0;
}

/* Validation & response */
body .octiv-form .wpcf7-not-valid {
	border-color: var(--octiv-form-error) !important;
}

body .octiv-form .wpcf7-not-valid-tip {
	margin-top: 6px;
	font-size: 14px;
	color: var(--octiv-form-error);
}

body .wpcf7 form .wpcf7-response-output {
	margin: 24px 0 0;
	padding: 12px 16px;
	font-size: 15px;
	line-height: 1.5;
	border-width: 1px;
	border-radius: 0;
}

body .wpcf7 form.sent .wpcf7-response-output {
	border-color: #213163;
	color: #213163;
}
