/**
 * Styling for the newsletter signup form.
 *
 * The form usually sits in a flat colour band near the foot of a page, where a left-aligned
 * row of controls simply disappears. So it is a centred card instead: white, lifted slightly,
 * with a short rule above the heading to give the eye somewhere to land.
 *
 * The palette stays monochrome to match the shop, and nothing here sets a font family — the
 * form inherits the theme's typography on purpose, so the heading keeps the shop's serif.
 *
 * Everything is scoped under .pa-signup so it cannot leak into the theme, and the whole
 * stylesheet can be switched off in the settings if the theme should own the styling.
 */

.pa-signup {
	box-sizing: border-box;
	max-width: 620px;
	margin: 0 auto;
	padding: 44px 36px;
	border: 1px solid rgba(0, 0, 0, .07);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .07);
	text-align: center;
}

.pa-signup *,
.pa-signup *::before,
.pa-signup *::after {
	box-sizing: border-box;
}

/* Short rule above the heading. Lifts the card off a flat background without introducing
   a colour the shop does not already use. */
.pa-signup::before {
	content: "";
	display: block;
	width: 44px;
	height: 2px;
	margin: 0 auto 22px;
	background: #111;
	opacity: .85;
}

.pa-signup__title {
	margin: 0 0 12px;
	font-size: clamp(21px, 2.6vw, 29px);
	line-height: 1.2;
}

.pa-signup__text {
	max-width: 46ch;
	margin: 0 auto 26px;
	font-size: 15px;
	line-height: 1.6;
	opacity: .72;
}

.pa-signup__notice {
	max-width: 460px;
	margin: 0 auto 20px;
	padding: 12px 16px;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 10px;
	background: #f4f4f2;
	font-size: 14px;
	line-height: 1.5;
}

/* Fields on one row, button on its own beneath. Squeezing name, e-mail and button into a
   single row leaves each of them too narrow to read at 460px, and stacking the button also
   makes it the widest thing in the card — which is where the eye should end up. */
.pa-signup__form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 460px;
	margin: 0 auto;
}

.pa-signup__fields {
	display: flex;
	gap: 10px;
	align-items: stretch;
}

.pa-signup__form input[type="email"],
.pa-signup__form input[type="text"] {
	flex: 1 1 auto;
	/* Without this a flex item refuses to shrink below its content width, and the button
	   gets pushed past the edge of the card on narrow screens. */
	min-width: 0;
	padding: 14px 16px;
	border: 1px solid #d6d6d6;
	border-radius: 10px;
	background: #fff;
	color: inherit;
	/* 16px keeps iOS Safari from zooming the page when the field takes focus. */
	font-size: 16px;
	font-family: inherit;
}

.pa-signup__form input::placeholder {
	color: #999;
}

.pa-signup__form input:focus {
	outline: none;
	border-color: #111;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, .08);
}

.pa-signup__form button {
	width: 100%;
	padding: 14px 24px;
	border: 0;
	border-radius: 10px;
	/* Matches the theme's .btn exactly. */
	background: #000;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	/* Same properties, duration and easing as the theme's own .btn, so both buttons on the
	   page react identically. */
	transition: transform .18s, box-shadow .18s;
}

/* Lift and shadow taken from the theme's .btn ("Jetzt bestellen"). Deliberately without a
   colour change: .btn does not change colour either, and adding one here would make the two
   buttons feel different on a page that shows them a few hundred pixels apart. */
.pa-signup__form button:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}

.pa-signup__form button:active {
	transform: translateY(0);
	box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
}

.pa-signup__form button:focus-visible {
	outline: 2px solid #111;
	outline-offset: 3px;
}

/* The e-mail field carries a visually hidden label. Themes normally define this class, but
   the form must not depend on that — a stray "E-Mail-Adresse" above the field would read
   as a bug. */
.pa-signup .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 560px) {

	.pa-signup {
		padding: 32px 22px;
		border-radius: 16px;
	}

	/* Below this width the two fields side by side are too narrow to read a placeholder in. */
	.pa-signup__fields {
		flex-direction: column;
	}
}

/* The lift is decoration, not information. The shadow still appears, so the button keeps a
   visible hover state for anyone who has asked for less motion. */
@media (prefers-reduced-motion: reduce) {

	.pa-signup__form button {
		transition: box-shadow .18s;
	}

	.pa-signup__form button:hover,
	.pa-signup__form button:active {
		transform: none;
	}
}
