/**
 * Contact section.
 *
 * Only what Gutenberg and WPForms' own controls cannot do here:
 * the WPForms block style fields stay inert while the form theme sets its
 * variables per form id, so the field and button look is mirrored here in one
 * place, scoped to the card. Gutenberg handles spacing, background, typography
 * and the card itself.
 */

.gofj-contact-card {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
	box-shadow: 0 14px 38px rgba(38, 50, 58, 0.06);
}

/* Same width for the draft's wrapper group, so the card matches the design. */
.gofj-contact {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}

/* The theme adds root padding to every constrained group, which doubles up
   inside the contact stack and squeezes the form on phones. */
.gofj-contact .wp-block-group.is-layout-constrained {
	padding-left: 0;
	padding-right: 0;
}

.gofj-contact-card .wpforms-container {
	margin: 0;
}

/* Keep the submit row in document flow so the card includes it at every width. */
.gofj-contact-card .wpforms-submit-container {
	clear: both;
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 8px 0 0;
	text-align: center;
}

.gofj-contact-card .wpforms-field-label {
	color: #26323A;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 8px;
}

.gofj-contact-card .wpforms-form input[type="text"],
.gofj-contact-card .wpforms-form input[type="email"],
.gofj-contact-card .wpforms-form select,
.gofj-contact-card .wpforms-form textarea {
	border: 1px solid #DDE7ED !important;
	border-radius: 8px !important;
	background: #FFFFFF !important;
	color: #26323A !important;
	padding: 12px 14px !important;
	box-shadow: none !important;
}

.gofj-contact-card .wpforms-form input:focus,
.gofj-contact-card .wpforms-form select:focus,
.gofj-contact-card .wpforms-form textarea:focus {
	border-color: #5392B0 !important;
	box-shadow: 0 0 0 2px rgba(83, 146, 176, 0.14) !important;
}

/* WPForms stretches the submit button to the full row; keep it compact. */
.gofj-contact-card .wpforms-submit {
	display: inline-block !important;
	width: auto !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: #D34C6C !important;
	color: #FFFFFF !important;
	padding: 14px 34px !important;
	font-weight: 700;
	transition: background-color 160ms ease, transform 160ms ease;
}

.gofj-contact-card .wpforms-submit:hover {
	background: #B83D5B !important;
	transform: translateY(-1px);
}

/* Name and Email share a row; every other field keeps the full width. */
@media (min-width: 601px) {
	.gofj-contact-card .wpforms-field-container {
		display: flex !important;
		flex-wrap: wrap;
		column-gap: 16px;
		width: 100% !important;
		align-items: flex-start;
	}

	.gofj-contact-card .wpforms-field {
		flex: 0 0 100%;
		min-width: 0;
		padding: 0 0 18px;
	}

	.gofj-contact-card .wpforms-field-name,
	.gofj-contact-card .wpforms-field-email {
		flex-basis: calc(50% - 8px);
	}

}

@media (max-width: 600px) {
	.gofj-contact-card {
		padding: 24px !important;
	}

	.wp-block-group:has(.gofj-contact-card) h2 {
		font-size: 32px !important;
	}
}
