.affiliate-newsletter-form-wrap,
.affiliate-contact-form-wrap {
	--afl-form-surface: var(--theme-palette-color-8, #ffffff);
	--afl-form-surface-soft: var(--theme-palette-color-8, #ffffff);
	--afl-form-text: var(--theme-palette-color-3, #111827);
	--afl-form-muted: var(--theme-palette-color-5, #6b7280);
	--afl-form-placeholder: color-mix(in srgb, var(--theme-palette-color-3, #111827) 80%, #ffffff 20%);
	--afl-form-border: var(--theme-palette-color-5, #6b7280);
	--afl-form-focus: var(--theme-palette-color-1, #2563eb);
	--afl-form-button-bg: var(--theme-palette-color-1, #2563eb);
	--afl-form-button-hover-bg: var(--theme-palette-color-2, #1d4ed8);
	--afl-form-button-text: #ffffff;
	--afl-form-radius: var(--theme-form-field-border-radius, 10px);
	color: var(--afl-form-text);
	max-width: 760px;
	width: 100%;
}

.affiliate-contact-form-wrap {
	max-width: 720px;
}

.afl-form,
.afl-form * {
	box-sizing: border-box;
}

.afl-form {
	color: var(--afl-form-text);
}

.afl-form__copy {
	margin-bottom: 1rem;
}

.afl-form__title {
	color: var(--afl-form-text);
	font-size: clamp(1.35rem, 2vw, 1.8rem);
	line-height: 1.2;
	margin: 0 0 0.4rem;
}

.afl-form__description {
	color: var(--afl-form-muted);
	margin: 0;
}

.afl-form__controls {
	display: flex;
	gap: 0.75rem;
	width: 100%;
}

.afl-form__controls--newsletter {
	align-items: stretch;
	flex-direction: row;
}

.afl-form__controls--contact {
	align-items: flex-start;
	flex-direction: column;
}

.afl-form__field {
	-webkit-appearance: none;
	appearance: none;
	background-color: var(--theme-palette-color-8, #ffffff);
	border: 1px solid var(--afl-form-border);
	border-radius: var(--afl-form-radius);
	caret-color: var(--afl-form-text);
	color: var(--afl-form-text);
	font: inherit;
	min-height: 48px;
	padding: 0.75rem 1rem;
	transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
	width: 100%;
}

.afl-form input.afl-form__field,
.afl-form input.afl-form__field:is([type="email"], [type="text"]),
.afl-form textarea.afl-form__field {
	background-color: var(--theme-palette-color-8, #ffffff);
	border-color: var(--theme-palette-color-5, #6b7280);
	color: var(--theme-palette-color-3, #111827);
}

.afl-form__field--email {
	flex: 1 1 auto;
	min-width: 0;
}

.afl-form__field:focus {
	background-color: var(--theme-palette-color-8, #ffffff);
	border-color: var(--afl-form-focus);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
	color: var(--afl-form-text);
	outline: none;
}

.afl-form input.afl-form__field:focus,
.afl-form input.afl-form__field:is([type="email"], [type="text"]):focus,
.afl-form textarea.afl-form__field:focus {
	background-color: var(--theme-palette-color-8, #ffffff);
	border-color: var(--theme-palette-color-1, #2563eb);
	color: var(--theme-palette-color-3, #111827);
}

.afl-form__field:-webkit-autofill,
.afl-form__field:-webkit-autofill:hover,
.afl-form__field:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--afl-form-text);
	box-shadow: 0 0 0 1000px var(--theme-palette-color-8, #ffffff) inset;
	caret-color: var(--afl-form-text);
}

.afl-form__message {
	resize: vertical;
}

.afl-form__button {
	-webkit-appearance: none;
	appearance: none;
	align-items: center;
	background: var(--afl-form-button-bg);
	border: 1px solid var(--afl-form-button-bg);
	border-radius: var(--afl-form-radius);
	color: var(--afl-form-button-text);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	justify-content: center;
	line-height: 1.2;
	min-height: 48px;
	padding: 0.75rem 1.25rem;
	text-decoration: none;
	transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
	white-space: nowrap;
	width: auto;
}

.afl-form__button:hover,
.afl-form__button:focus-visible {
	background: var(--afl-form-button-hover-bg);
	border-color: var(--afl-form-button-hover-bg);
	box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
	color: var(--afl-form-button-text);
	transform: translateY(-1px);
}

.afl-form__button:focus-visible {
	outline: 2px solid rgba(37, 99, 235, 0.5);
	outline-offset: 3px;
}

.afl-form__button[disabled] {
	cursor: progress;
	opacity: 0.75;
	transform: none;
}

.afl-field--hidden {
	height: 1px;
	left: -9999px;
	overflow: hidden;
	position: absolute;
	top: auto;
	width: 1px;
}

.afl-form__ajax-message,
.afl-newsletter-message {
	background: var(--afl-form-surface-soft);
	border: 1px solid var(--afl-form-border);
	border-left: 4px solid var(--afl-form-muted);
	border-radius: var(--afl-form-radius);
	color: var(--afl-form-text);
	margin-top: 1rem;
	padding: 0.75rem 1rem;
}

.afl-newsletter-message--success {
	background: #f0fdf4;
	border-color: #bbf7d0;
	border-left-color: #16a34a;
	color: #14532d;
}

.afl-newsletter-message--error {
	background: #fef2f2;
	border-color: #fecaca;
	border-left-color: #dc2626;
	color: #7f1d1d;
}

.afl-form.is-submitted .afl-form__copy,
.afl-form.is-submitted .afl-form__controls {
	display: none;
}

/* Legacy aliases retained for sites that target pre-shared form classes. */
.afl-newsletter-form__copy {
	margin-bottom: 1rem;
}

.afl-newsletter-form__title {
	color: var(--afl-form-text);
}

.afl-newsletter-form__description {
	color: var(--afl-form-muted);
}

.afl-newsletter-form__controls {
	display: flex;
	gap: 0.75rem;
	width: 100%;
}

.afl-contact-form__controls {
	flex-direction: column;
}

.afl-newsletter-form__email,
.afl-contact-form__field {
	max-width: 100%;
}

.afl-contact-form__message {
	resize: vertical;
}

.afl-newsletter-form.is-submitted .afl-newsletter-form__copy,
.afl-newsletter-form.is-submitted .afl-newsletter-form__controls {
	display: none;
}

@media (max-width: 600px) {
	.afl-form__controls--newsletter {
		flex-direction: column;
	}

	.afl-form--newsletter .afl-form__button {
		width: 100%;
	}
}

.afl-form input.afl-form__field::placeholder,
.afl-form textarea.afl-form__field::placeholder {
	color: var(--afl-form-placeholder);
	opacity: 1;
}