.wp-block-sggw-newsletter {
	box-sizing: border-box;
	display: grid;
	gap: var(--wp--preset--spacing--30);
	max-inline-size: 100%;
}

.wp-block-sggw-newsletter__form {
	display: grid;
	gap: var(--wp--preset--spacing--20);
	margin: 0;
}

.wp-block-sggw-newsletter__label {
	color: var(--wp--custom--component--form-control--label-color);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: var(--wp--custom--typography--font-weight--semibold);
	line-height: var(--wp--custom--typography--line-height--medium);
}

.wp-block-sggw-newsletter__control {
	/* Rebind the complete Filled pair in the newsletter's surface context. */
	--wp--custom--component--button--background: var(--sggw-button-background);
	--wp--custom--component--button--background-hover: var(--sggw-button-background-hover);
	--wp--custom--component--button--background-pressed: color-mix(
		in srgb,
		var(--sggw-button-foreground) var(--wp--custom--state-layer--pressed),
		var(--sggw-button-background)
	);
	--wp--custom--component--button--foreground: var(--sggw-button-foreground);
	--wp--custom--component--button--foreground-hover: var(--sggw-button-foreground-hover);

	align-items: stretch;
	border-radius: var(--wp--custom--radius--small);
	display: flex;
	inline-size: 100%;
	min-inline-size: 0;
}

.wp-block-sggw-newsletter__input {
	border-radius: 0 !important;
	border-end-end-radius: 0 !important;
	border-end-start-radius: var(--wp--custom--radius--small) !important;
	border-inline-end-width: 0;
	border-start-end-radius: 0 !important;
	border-start-start-radius: var(--wp--custom--radius--small) !important;
	flex: 1 1 auto;
	inline-size: auto;
	margin: 0;
	min-inline-size: 0;
}

.wp-block-sggw-newsletter__submit {
	align-items: center;
	background-color: var(--wp--custom--component--button--background);
	border-color: transparent;
	border-radius: 0 !important;
	border-end-end-radius: var(--wp--custom--radius--small) !important;
	border-end-start-radius: 0 !important;
	border-start-end-radius: var(--wp--custom--radius--small) !important;
	border-start-start-radius: 0 !important;
	border-style: solid;
	border-width: var(--wp--custom--line--width);
	box-sizing: border-box;
	color: var(--wp--custom--component--button--foreground);
	cursor: pointer;
	display: inline-flex;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-style: normal;
	font-weight: var(--wp--custom--typography--font-weight--semibold);
	justify-content: center;
	line-height: var(--wp--custom--typography--line-height--medium);
	margin: 0;
	min-block-size: var(--sggw-form-control-block-size);
	padding-block: calc(
		var(--wp--preset--spacing--20) -
			var(--wp--custom--line--width)
	);
	padding-inline: calc(
		var(--wp--preset--spacing--40) -
			var(--wp--custom--line--width)
	);
	white-space: nowrap;
}

.wp-block-sggw-newsletter__submit.has-icon {
	block-size: auto;
	inline-size: var(--sggw-form-control-block-size);
	min-inline-size: var(--sggw-form-control-block-size);
	padding: 0;
}

.wp-block-sggw-newsletter__submit-icon,
.wp-block-sggw-newsletter__message-icon {
	color: currentColor;
	font-family: var(--sggw-icon-font-family);
	font-size: var(--sggw-icon-size-medium);
	font-style: normal;
	font-weight: var(--sggw-icon-font-weight-regular);
	line-height: 1;
}

.wp-block-sggw-newsletter__submit:focus:not(:focus-visible) {
	outline: none;
}

.wp-block-sggw-newsletter__submit:focus-visible {
	outline: var(--wp--custom--line--focus-ring-width) solid
		var(--sggw-line-focus);
	outline-offset: var(--wp--custom--line--focus-ring-offset);
}

.wp-block-sggw-newsletter__control
	:is(.wp-block-sggw-newsletter__input, .wp-block-sggw-newsletter__submit):focus-visible {
	position: relative;
	z-index: 1;
}

.wp-block-sggw-newsletter-consent {
	margin: 0;
}

.wp-block-sggw-newsletter-consent a:not(.wp-element-button) {
	color: var(--sggw-link-foreground);
	text-decoration-color: currentColor;
	text-decoration-line: var(--sggw-inline-link-decoration-rest);
	text-decoration-skip-ink: auto;
	text-decoration-thickness: var(--sggw-link-decoration-thickness);
	text-underline-offset: var(--sggw-link-underline-offset);
}

.wp-block-sggw-newsletter-consent a:not(.wp-element-button):visited {
	color: var(--sggw-link-foreground);
}

.wp-block-sggw-newsletter-consent a:not(.wp-element-button):hover {
	color: var(--sggw-link-foreground);
	text-decoration-line: var(--sggw-link-decoration-interactive);
}

.wp-block-sggw-newsletter-consent a:not(.wp-element-button):active {
	color: var(--sggw-link-foreground);
	text-decoration-line: var(--sggw-link-decoration-interactive);
}

.wp-block-sggw-newsletter-consent a:not(.wp-element-button):focus-visible {
	outline: var(--wp--custom--line--focus-ring-width) solid
		var(--sggw-line-focus);
	outline-offset: var(--wp--custom--line--focus-ring-offset-compact);
	text-decoration-line: var(--sggw-link-decoration-interactive);
}

.wp-block-sggw-newsletter__message {
	align-items: start;
	color: var(--sggw-text-muted);
	display: flex;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--typography--font-weight--semibold);
	gap: var(--wp--preset--spacing--10);
	line-height: var(--wp--custom--typography--line-height--supporting);
	margin: 0;
}

.wp-block-sggw-newsletter__message--success
	.wp-block-sggw-newsletter__message-icon::before {
	content: var(--sggw-icon-glyph-check-circle);
}

.wp-block-sggw-newsletter__message--error
	.wp-block-sggw-newsletter__message-icon::before {
	content: var(--sggw-icon-glyph-warning-circle);
}

@media (hover: hover) {
	.wp-block-sggw-newsletter__submit:hover {
		background-color: var(--wp--custom--component--button--background-hover);
		color: var(--wp--custom--component--button--foreground-hover);
	}
}

.wp-block-sggw-newsletter__submit:active {
	background-color: var(--wp--custom--component--button--background-pressed);
}

@media (forced-colors: active) {
	.wp-block-sggw-newsletter-consent a:not(.wp-element-button),
	.wp-block-sggw-newsletter-consent a:not(.wp-element-button):is(:visited, :hover, :active) {
		color: LinkText;
		forced-color-adjust: none;
		text-decoration-line: underline;
	}

	.wp-block-sggw-newsletter-consent a:not(.wp-element-button):focus-visible {
		outline-color: Highlight;
	}

	.wp-block-sggw-newsletter__submit {
		background-color: ButtonFace;
		border-color: ButtonBorder;
		color: ButtonText;
		forced-color-adjust: none;
	}

	.wp-block-sggw-newsletter__submit:is(:hover, :focus-visible, :active) {
		background-color: Highlight;
		border-color: Highlight;
		color: HighlightText;
	}

	.wp-block-sggw-newsletter__submit:focus-visible {
		outline-color: Highlight;
	}
}
