/**
 * Newsletter-Formular Styling — "Wald & Leinen" Designsystem
 *
 * Farbpalette via CSS Custom Properties.
 * Responsive, barrierefrei (WCAG AA), kein globales Reset.
 *
 * @package HundezeitUtilities
 */

/* ---------------------------------------------------------------
   CSS-Variablen (nur im Formular-Scope, kein :root-Overflow)
   --------------------------------------------------------------- */
.hz-newsletter-wrap {
	--hz-green:       #4A6B4C;
	--hz-green-dark:  #3A5640;
	--hz-text:        #333331;
	--hz-muted:       #6B6B69;
	--hz-line:        #D5CEC4;
	--hz-bg:          #F4F2EF;
	--hz-white:       #FFFFFF;
	--hz-error:       #9B2335;
	--hz-success-bg:  #EAF2EB;
	--hz-success-txt: #1E4F20;
	--hz-radius:      4px;
	--hz-transition:  0.18s ease;
}

/* ---------------------------------------------------------------
   Wrapper
   --------------------------------------------------------------- */
.hz-newsletter-wrap {
	max-width: 480px;
	margin: 0 auto;
	font-family: Lato, sans-serif;
	color: var(--hz-text);
}

/* ---------------------------------------------------------------
   Erfolgs- und Fehler-Meldungen
   --------------------------------------------------------------- */
.hz-newsletter-wrap .hz-message {
	padding: 12px 16px;
	border-radius: var(--hz-radius);
	margin-bottom: 16px;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.hz-newsletter-wrap .hz-message--success {
	background-color: var(--hz-success-bg);
	color: var(--hz-success-txt);
	border: 1px solid #B8D9BA;
}

.hz-newsletter-wrap .hz-message--error {
	background-color: #FDF2F3;
	color: var(--hz-error);
	border: 1px solid #E8BCC1;
}

/* ---------------------------------------------------------------
   Formular-Layout
   --------------------------------------------------------------- */
.hz-newsletter-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* ---------------------------------------------------------------
   Label
   --------------------------------------------------------------- */
.hz-newsletter-form .hz-field-label {
	display: block;
	font-size: 0.9375rem;
	font-weight: 600;
	margin-bottom: 5px;
	color: var(--hz-text);
}

/* ---------------------------------------------------------------
   E-Mail-Eingabefeld
   --------------------------------------------------------------- */
.hz-newsletter-form .hz-email-input {
	display: block;
	width: 100%;
	padding: 10px 14px;
	font-size: 1rem;
	font-family: inherit;
	color: var(--hz-text);
	background-color: var(--hz-white);
	border: 1px solid var(--hz-line);
	border-radius: var(--hz-radius);
	box-sizing: border-box;
	transition: border-color var(--hz-transition), box-shadow var(--hz-transition);
	-webkit-appearance: none;
	appearance: none;
}

.hz-newsletter-form .hz-email-input:focus {
	outline: none;
	border-color: var(--hz-green);
	box-shadow: 0 0 0 2px rgba(74, 107, 76, 0.25);
}

.hz-newsletter-form .hz-email-input::placeholder {
	color: var(--hz-muted);
}

/* ---------------------------------------------------------------
   Einwilligungs-Checkbox
   --------------------------------------------------------------- */
.hz-newsletter-form .hz-consent-wrap {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.hz-newsletter-form .hz-consent-checkbox {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: var(--hz-green);
	cursor: pointer;
}

.hz-newsletter-form .hz-consent-label {
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--hz-muted);
	cursor: pointer;
}

.hz-newsletter-form .hz-consent-label a {
	color: var(--hz-green);
	text-decoration: underline;
}

.hz-newsletter-form .hz-consent-label a:hover,
.hz-newsletter-form .hz-consent-label a:focus {
	color: var(--hz-green-dark);
}

/* ---------------------------------------------------------------
   Honeypot — für Menschen unsichtbar, für Screenreader korrekt
   --------------------------------------------------------------- */
.hz-newsletter-form .hz-honeypot-field {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------
   Absenden-Button
   --------------------------------------------------------------- */
.hz-newsletter-form .hz-submit-btn {
	display: inline-block;
	padding: 11px 24px;
	font-size: 1rem;
	font-family: inherit;
	font-weight: 600;
	color: var(--hz-white);
	background-color: var(--hz-green);
	border: none;
	border-radius: var(--hz-radius);
	cursor: pointer;
	transition: background-color var(--hz-transition), box-shadow var(--hz-transition);
	align-self: flex-start;
	-webkit-appearance: none;
	appearance: none;
}

.hz-newsletter-form .hz-submit-btn:hover {
	background-color: var(--hz-green-dark);
}

.hz-newsletter-form .hz-submit-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(74, 107, 76, 0.4);
}

.hz-newsletter-form .hz-submit-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media ( max-width: 480px ) {
	.hz-newsletter-form .hz-submit-btn {
		width: 100%;
		text-align: center;
	}
}
