/* --- Input, textarea & select base styles --- */

.wpcf7 input:where(:not([type="submit"]):not([type="checkbox"])) {
	border: 1px solid;
	line-height: inherit;
	font-size: inherit;
}

.wpcf7 input:where(:not([type="submit"]):not([type="checkbox"])),
.wpcf7 textarea,
.wpcf7 select {
	padding: calc(0.667em + 1px);
	width: 100%;
	background-color: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
	border: 1px solid #D8CFC5;
	border-radius: 0.625rem;
	box-sizing: border-box;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7 textarea {
	min-height: 10em;
	resize: vertical;
}

.wpcf7 select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232C2826' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1em center;
	padding-right: 2.5em;
	cursor: pointer;
}

/* --- Field spacing --- */

.wpcf7-form-control-wrap {
	margin-top: 0.6em;
	display: block;
}

.wpcf7-form p {
	margin-bottom: 0;
}

/* --- Acceptance checkbox --- */

.wpcf7-acceptance {
	margin-top: 1em;
}

.wpcf7-acceptance .wpcf7-list-item {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
}

.wpcf7-acceptance input[type="checkbox"] {
	margin-top: 0.25em;
	flex-shrink: 0;
	width: 1.1em;
	height: 1.1em;
	accent-color: #9E5668;
}

/* --- Submit button --- */

.wpcf7 input[type="submit"] {
	background-color: var(--wp--custom--elements--button--color--background);
	color: var(--wp--custom--elements--button--color--text);
	border-radius: var(--wp--custom--elements--button--border--radius);
	border-width: 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: var(--wp--custom--typography--font-weight--medium);
	line-height: inherit;
	padding: calc(0.667em + 2px) calc(1.333em + 2px);
	text-decoration: none;
	cursor: pointer;
	margin-top: 1em;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.wpcf7 input[type="submit"]:hover {
	background-color: var(--wp--custom--elements--button--hover--color--background);
	color: var(--wp--custom--elements--button--hover--color--text);
	transform: scale(1.02);
}

.wpcf7 input[type="submit"]:active {
	transform: scale(0.98);
}

.wpcf7 input[type="submit"]:focus {
	background-color: var(--wp--custom--elements--button--focus--color--background);
	color: var(--wp--custom--elements--button--focus--color--text);
	outline-color: var(--wp--custom--elements--button--focus--color--background);
	outline-width: 2px;
	outline-offset: 2px;
	outline-style: solid;
}

.wpcf7 input[type="submit"]:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* --- Focus states for inputs --- */

.wpcf7 input:where(:not([type="submit"]):not([type="checkbox"])):focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
	outline: none;
	border-color: #9E5668;
	box-shadow: 0 0 0 3px rgba(158, 86, 104, 0.15);
}

/* --- Validation messages --- */

.wpcf7-not-valid-tip {
	color: #B85450;
	font-size: 0.85em;
	margin-top: 0.25em;
}

.wpcf7-not-valid {
	border-color: #B85450;
}

.wpcf7-response-output {
	border-radius: 0.625rem;
	padding: 0.75em 1em;
	margin-top: 1em;
}

/* --- Form wrapper bottom spacing --- */

.wpcf7 {
	margin-bottom: 2rem;
}
