/*
 * Footer form overrides (CF7 + MailPoet) with shared variables.
 * Tweak the custom properties below to match your palette.
 */

body form.wpcf7-form .FooterForm,
body .mailpoet_form form.mailpoet_form_form {
	--lf-form-bg: #ffffff;
	--lf-form-border: #ffffff;
	--lf-form-text: #0f172a;
	--lf-form-placeholder: #5f6b7a;
	--lf-form-radius: 8px;
	--lf-form-button-bg: #0c1424;
	--lf-form-button-bg-hover: #0c1424;
	--lf-form-button-text: #ffffff;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.2rem;
	align-items: stretch;
	width: 100%;
}

body form.wpcf7-form .FooterForm p,
body .mailpoet_form form.mailpoet_form_form .mailpoet_paragraph {
	margin: 0;
}

body form.wpcf7-form .FooterForm p:last-child,
body .mailpoet_form form.mailpoet_form_form .mailpoet_paragraph:last-child {
	display: flex;
	align-items: stretch;
	gap: 0.15rem;
}

body form.wpcf7-form .FooterForm .wpcf7-form-control.wpcf7-text,
body form.wpcf7-form .FooterForm .wpcf7-form-control.wpcf7-email,
body .mailpoet_form form.mailpoet_form_form input[type='text'],
body .mailpoet_form form.mailpoet_form_form input[type='email'],
body .mailpoet_form form.mailpoet_form_form input[type='tel'],
body .mailpoet_form form.mailpoet_form_form input[type='url'] {
	width: 100%;
	background: var(--lf-form-bg) !important;
	color: var(--lf-form-text) !important;
	border: 1.5px solid var(--lf-form-border) !important;
	border-radius: var(--lf-form-radius) !important;
	padding: 0.9rem 1rem !important;
	font-size: 1rem;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body form.wpcf7-form .FooterForm .wpcf7-form-control::placeholder,
body .mailpoet_form form.mailpoet_form_form input::placeholder {
	color: var(--lf-form-placeholder) !important;
}

body form.wpcf7-form .FooterForm .wpcf7-form-control:focus,
body .mailpoet_form form.mailpoet_form_form input:focus {
	border-color: var(--lf-form-button-bg) !important;
	box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
	outline: none;
}

body form.wpcf7-form .FooterForm input.wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 1rem 1.6rem;
	border-radius: var(--lf-form-radius) !important;
	background: var(--lf-form-button-bg);
	color: var(--lf-form-button-text);
	border: 1.5px solid var(--lf-form-button-bg);
	font-weight: 600;
	letter-spacing: 0.01em;
	text-transform: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	width: 100%;
	min-width: 100%;
	flex: 1 1 auto;
}

body form.wpcf7-form .FooterForm input.wpcf7-submit:not(:hover):not(:focus) {
	background: var(--lf-form-button-bg);
	border-color: var(--lf-form-button-bg);
}

body form.wpcf7-form .FooterForm input.wpcf7-submit:hover,
body form.wpcf7-form .FooterForm input.wpcf7-submit:focus {
	background: var(--lf-form-button-bg-hover);
	border-color: var(--lf-form-button-bg-hover);
	color: var(--lf-form-button-text);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

body form.wpcf7-form .FooterForm .wpcf7-spinner {
	margin-left: 0.5rem;
}

body form.wpcf7-form .FooterForm + .wpcf7-response-output {
	margin-top: 0.75rem;
}

/* MailPoet submit button */
body .mailpoet_form form.mailpoet_form_form input[type='submit'],
body .mailpoet_form form.mailpoet_form_form button[type='submit'],
body .mailpoet_form form.mailpoet_form_form .mailpoet_submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 1rem 1.6rem;
	border-radius: var(--lf-form-radius) !important;
	background: var(--lf-form-button-bg) !important;
	color: var(--lf-form-button-text) !important;
	border: 1.5px solid var(--lf-form-button-bg) !important;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-transform: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	width: 100%;
	min-width: 100%;
	flex: 1 1 auto;
}

body .mailpoet_form form.mailpoet_form_form input[type='submit']:not(:hover):not(:focus),
body .mailpoet_form form.mailpoet_form_form button[type='submit']:not(:hover):not(:focus),
body .mailpoet_form form.mailpoet_form_form .mailpoet_submit:not(:hover):not(:focus) {
	background: var(--lf-form-button-bg) !important;
	border-color: var(--lf-form-button-bg) !important;
}

body .mailpoet_form form.mailpoet_form_form input[type='submit']:hover,
body .mailpoet_form form.mailpoet_form_form input[type='submit']:focus,
body .mailpoet_form form.mailpoet_form_form button[type='submit']:hover,
body .mailpoet_form form.mailpoet_form_form button[type='submit']:focus,
body .mailpoet_form form.mailpoet_form_form .mailpoet_submit:hover,
body .mailpoet_form form.mailpoet_form_form .mailpoet_submit:focus {
	background: var(--lf-form-button-bg-hover) !important;
	border-color: var(--lf-form-button-bg-hover) !important;
	color: var(--lf-form-button-text) !important;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Tighten MailPoet default spacing */
body .mailpoet_form form.mailpoet_form_form .mailpoet_paragraph:last-child .mailpoet_submit {
	margin: 0 !important;
}
