/*
 * Home newsletter „Zostań z nami w kontakcie” (template-parts/home/newsletter.php).
 * No section mockup; from the preview docs/preview/new_home7_2.png: a quiet
 * band, a large envelope with the heading and text on the left, the e-mail
 * field with the button and the consent below on the right. The field has a
 * visible label (the preview has only a placeholder). Field, error and
 * consent styles come from component-contact-form.css.
 */

.hf-newsletter
{
	padding-block: clamp(2rem, 1.4rem + 2vw, 3.25rem);
	border-top: 1px solid var(--hf-color-card-border);
	background: var(--hf-color-band-soft);
}

.hf-newsletter__inner
{
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: var(--hf-space-l);
}

.hf-newsletter__intro
{
	display: flex;
	align-items: flex-start;
	gap: var(--hf-space-m);
}

.hf-newsletter__icon
{
	flex: none;
	width: clamp(2.75rem, 2.2rem + 1.5vw, 3.75rem);
	height: clamp(2.75rem, 2.2rem + 1.5vw, 3.75rem);
	color: var(--hf-color-icon);
}

.hf-newsletter__title
{
	margin: 0 0 var(--hf-space-xs);
	font-size: clamp(1.5rem, 1.2rem + 0.8vw, 2rem);
	text-wrap: balance;
}

.hf-newsletter__text
{
	max-width: 30em;
	margin: 0;
	font-size: var(--hf-text-m);
	line-height: 1.5;
}

/* Field and button in one row; the label above, the error below. */
.hf-newsletter-form__row
{
	display: flex;
	gap: var(--hf-space-s);
}

.hf-newsletter-form__row .hf-contact-form__input
{
	flex: 1 1 auto;
	min-width: 0;
}

.hf-newsletter-form__submit
{
	flex: none;
	cursor: pointer;
}

.hf-newsletter-form__submit:focus-visible,
.hf-newsletter__step .hf-button:focus-visible
{
	outline: 3px solid var(--hf-color-focus);
	outline-offset: 3px;
}

.hf-newsletter-form__submit:disabled
{
	opacity: 0.7;
	cursor: progress;
}

.hf-newsletter-form__consent
{
	margin-top: var(--hf-space-s);
}

.hf-newsletter__result,
.hf-newsletter__step-text
{
	margin: 0 0 var(--hf-space-s);
	font-size: var(--hf-text-m);
	line-height: 1.5;
}

.hf-newsletter__result
{
	padding: var(--hf-space-s) var(--hf-space-m);
	border-left: 3px solid var(--hf-color-primary);
	background: var(--hf-color-surface);
	color: var(--hf-color-heading);
}

.hf-newsletter__result--expired
{
	border-left-color: var(--hf-color-error);
}

.hf-newsletter__step .hf-button
{
	cursor: pointer;
}

@media (max-width: 55.99em)
{
	.hf-newsletter__inner
	{
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 40em)
{
	.hf-newsletter-form__row
	{
		flex-direction: column;
	}

	.hf-newsletter-form__submit
	{
		width: 100%;
	}
}
