/* ────────────────────────────────────────────────────────────
   03-text-form-center.css — Text + Form: Center
   Class chain: core/group outer (bg via Style panel, alignfull)
                → gb element .text-form-center (section)
                → gb element .text-form-center__inner (div)
                  → heading / intro / gform_wrapper
   ──────────────────────────────────────────────────────────── */

/* ── Section wrapper ──────────────────────────────────────── */
.text-form-center {
	padding: var(--spacing-4xl) var(--spacing-md);
	text-align: center;
}

/* ── Inner — constrain to readable width ─────────────────── */
.text-form-center__inner {
	max-width: var(--container-narrow);
	margin-inline: auto;
}

/* ── Heading ──────────────────────────────────────────────── */
.text-form-center__heading {
	margin-bottom: var(--spacing-sm);
}

/* ── Intro paragraph ──────────────────────────────────────── */
.text-form-center__intro {
	font-size: var(--text-heading-sm);
	margin-block-start: 0;
	margin-bottom: 0;
}

/* ── GF: hide required legend (heading is in the pattern) ─── */
.text-form-center .gform_heading {
	display: none;
}

.text-form-center .gform_wrapper {
	margin-top: var(--spacing-xl);
}

/* ── GF: inline layout — fields + submit button in one row ── */
.text-form-center .gform_wrapper form {
	display: flex;
	align-items: flex-end;
	gap: var(--spacing-md);
	text-align: left;
}

.text-form-center .gform-body,
.text-form-center .gform_body {
	flex: 1;
	min-width: 0;
}

.text-form-center .gform-footer,
.text-form-center .gform_footer {
	flex: 0 0 auto;
	align-self: flex-end;
	display: flex;
	align-items: flex-end;
	padding: 0 !important;
	margin: 0 !important;
}

/* Reset field bottom margin so it doesn't push the button down */
.text-form-center .gfield {
	margin-bottom: 0;
}

/* ── GF: submit button — match primary button style ──────── */
.text-form-center .gform_button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: var(--spacing-xs) var(--spacing-xl);
	background-color: var(--color-orange-primary);
	color: var(--color-white);
	border: 0;
	font-family: var(--font-primary);
	font-size: var(--text-body-base);
	font-weight: var(--font-weight-medium);
	line-height: var(--line-height-snug);
	cursor: pointer;
	white-space: nowrap;
	margin: 0 !important;
	transition: background-color 0.2s ease-in-out;
}

.text-form-center .gform_button:hover {
	background-color: #B74A1E;
}

.text-form-center .gform_button:active {
	background-color: #9A3F19;
}

/* ── Dark-bg overrides ────────────────────────────────────── */
.is-style-bg-dark .text-form-center__heading {
	color: var(--color-text-body-inverse);
}

/* intro p: caught by global .is-style-bg-dark p — correct */

/* GF field labels on dark bg */
.is-style-bg-dark .text-form-center .gfield_label {
	color: var(--color-white);
}

/* Submit button: keep orange on dark bg (global inversion doesn't touch gform_button) */
.is-style-bg-dark .text-form-center .gform_button {
	background-color: var(--color-orange-primary);
	color: var(--color-white);
}

.is-style-bg-dark .text-form-center .gform_button:hover {
	background-color: #B74A1E;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
	.text-form-center {
		padding: var(--spacing-xl) var(--spacing-sm);
	}
}

@media (max-width: 768px) {
	.text-form-center .gform_wrapper form {
		flex-direction: column;
		align-items: stretch;
	}

	.text-form-center .gform_footer {
		align-self: center;
	}
}
