/*
 * Form controls.
 *
 * Core's search and comment forms, plain HTML forms and Contact Form 7 share
 * one look. Borders use the "secondary" color, not "line": a control outline
 * needs a 3:1 contrast ratio (WCAG 1.4.11), and "line" is a hairline color.
 */
input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
textarea,
select {
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: var(--wp--custom--radius--small, 6px);
	padding: 0.7rem 0.9rem;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary);
}
/* The search block draws its own border; keep it consistent. */
.wp-block-search__input { border-color: var(--wp--preset--color--secondary); }

/* ---------- Contact Form 7 ---------- */
.wpcf7 form p { margin: 0 0 var(--wp--preset--spacing--30); }
.wpcf7 label { display: block; font-weight: 600; font-size: 0.95em; }
.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.wpcf7 textarea,
.wpcf7 select {
	display: block;
	width: 100%;
	margin-top: 0.35rem;
}
.wpcf7 textarea { min-height: 9rem; resize: vertical; }
/*
 * Only what a button needs beyond the theme's own definition, which the submit
 * input now carries as .wp-element-button (see takt_cf7_button_class()).
 * Restating colour, radius or padding here is what let this button drift away
 * from every other button on the site.
 */
.wpcf7 input[type="submit"] {
	cursor: pointer;
}
.wpcf7 .wpcf7-list-item { margin-left: 0; margin-right: 1rem; }
.wpcf7 .wpcf7-spinner { margin-left: 0.75rem; }
.wpcf7 .wpcf7-not-valid-tip { color: var(--wp--preset--color--primary); font-size: 0.9em; }
.wpcf7 .wpcf7-response-output {
	margin: var(--wp--preset--spacing--30) 0 0;
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: var(--wp--custom--radius--small, 6px);
}
