/*
 * Form styling. Contact Form 7 renders the markup; these rules give it the
 * site's look without any `!important` arms race, by scoping to .am-form-shell.
 */

.am-form-shell .wpcf7 {
	position: relative;
}

.am-form-shell .wpcf7-form label {
	display: block;
	margin-bottom: var(--am-space-1);
	font-size: var(--am-text-sm);
	font-weight: 600;
}

.am-form-shell .wpcf7-form br {
	display: none;
}

.am-form-shell .wpcf7-form p,
.am-form-shell .wpcf7-form .mb-3 {
	margin: 0 0 var(--am-space-3);
}

.am-form-shell .wpcf7-form .row {
	display: grid;
	gap: var(--am-space-3);
	grid-template-columns: 1fr 1fr;
	margin: 0 0 var(--am-space-3);
}

.am-form-shell .wpcf7-form .row > * {
	margin: 0;
}

.am-form-shell .wpcf7 input[type="text"],
.am-form-shell .wpcf7 input[type="email"],
.am-form-shell .wpcf7 input[type="tel"],
.am-form-shell .wpcf7 input[type="url"],
.am-form-shell .wpcf7 input[type="date"],
.am-form-shell .wpcf7 input[type="file"],
.am-form-shell .wpcf7 select,
.am-form-shell .wpcf7 textarea {
	display: block;
	width: 100%;
	min-height: 42px;
	padding: 10px 12px;
	border: 1px solid #d7e3d8;
	border-radius: var(--am-radius-sm);
	background: var(--am-surface-soft);
	color: var(--am-ink);
	font: inherit;
	font-size: var(--am-text-sm);
}

.am-form-shell .wpcf7 textarea {
	min-height: 96px;
	resize: vertical;
}

.am-form-shell .wpcf7 input:focus,
.am-form-shell .wpcf7 select:focus,
.am-form-shell .wpcf7 textarea:focus {
	border-color: var(--am-green);
	background: var(--am-surface);
	outline: 2px solid rgba(57, 181, 74, 0.25);
	outline-offset: 0;
}

.am-form-shell .wpcf7 input[type="submit"],
.am-form-shell .wpcf7 button {
	width: 100%;
	padding: 13px 22px;
	border: 0;
	border-radius: var(--am-radius-sm);
	background: var(--am-green-dark);
	color: var(--am-on-dark);
	font-size: var(--am-text-sm);
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background var(--am-fast) var(--am-ease);
}

.am-form-shell .wpcf7 input[type="submit"]:hover,
.am-form-shell .wpcf7 button:hover {
	background: var(--am-green-darker);
}

.am-form-shell .wpcf7-spinner {
	position: absolute;
	margin: 0;
}

.am-form-shell .wpcf7-not-valid-tip {
	display: block;
	margin-top: var(--am-space-1);
	color: var(--am-danger);
	font-size: var(--am-text-xs);
}

.am-form-shell .wpcf7-response-output {
	margin: var(--am-space-3) 0 0 !important;
	padding: var(--am-space-2) var(--am-space-3) !important;
	border-radius: var(--am-radius-sm);
	font-size: 13px;
}

/* Honeypot: present for bots, out of reach for everyone else. */
.am-honeypot {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

.am-notice {
	margin: 0 0 var(--am-space-3);
	padding: var(--am-space-2) var(--am-space-3);
	border-radius: var(--am-radius-sm);
	font-size: var(--am-text-sm);
}

.am-notice-bad {
	background: var(--am-danger-soft);
	color: var(--am-danger);
}

.am-notice-ok {
	background: var(--am-green-soft);
	color: #14521d;
}

@media (max-width: 600px) {
	.am-form-shell .wpcf7-form .row {
		grid-template-columns: 1fr;
	}
}
