

.tscrm-subscribe--zeile {
	container-type: inline-size;
	margin: 1.5em 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--sd-line);
	color: var(--sd-text);
	scroll-margin-top: 24px;
}

.tscrm-subscribe__eyebrow {
	display: block;
	margin: 0 0 2px;
	font-size: var(--sd-fs-eyebrow);
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--sd-gold-dark);
}

.tscrm-subscribe--zeile .tscrm-subscribe__text {
	margin: 0 0 10px;
	font-size: var(--sd-fs-sm);
	color: var(--sd-muted);
}

.tscrm-subscribe--zeile .tscrm-subscribe__form {
	margin: 0;
}

.tscrm-subscribe__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

.tscrm-subscribe--zeile .tscrm-subscribe__email {
	flex: 1 1 10em;
	min-width: 0;
	min-height: 44px;
	margin: 0;
	padding: 6px 10px;
	border: 1px solid var(--sd-field-line);
	border-radius: var(--sd-radius-sm);
	background: var(--sd-field-bg);
	color: var(--sd-text);
	font: inherit;
	font-size: var(--sd-fs-base);
	box-shadow: none;
}

/* Same focus ring as the buttons: --sd-focus is a box-shadow value. */
.tscrm-subscribe--zeile .tscrm-subscribe__email:focus-visible {
	outline: none;
	box-shadow: var(--sd-focus);
}

/*
 * Consent — the configurator's switch pattern (configurator.css, .tssd-cfg__switch):
 * the real checkbox lies transparently over the whole label, so the target is the label
 * (44 px high) and not an 18 px box; the visible box is drawn from tokens.
 */
.tscrm-subscribe__consent {
	position: relative;
	flex: 0 1 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	font-size: var(--sd-fs-sm);
	color: var(--sd-text);
	cursor: pointer;
}

.tscrm-subscribe__consent input {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.tscrm-subscribe__box {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 18px;
	height: 18px;
	border: 2px solid var(--sd-muted);
	border-radius: var(--sd-radius-sm);
	background: var(--sd-field-bg);
}

.tscrm-subscribe__consent input:checked + .tscrm-subscribe__box {
	border-color: var(--sd-gold-dark);
	background: var(--sd-gold);
}

/* The tick: two borders of a turned rectangle. */
.tscrm-subscribe__consent input:checked + .tscrm-subscribe__box::after {
	content: "";
	width: 5px;
	height: 9px;
	border: solid var(--sd-gold-ink);
	border-width: 0 2px 2px 0;
	transform: translateY(-1px) rotate(45deg);
}

.tscrm-subscribe__consent input:focus-visible + .tscrm-subscribe__box {
	box-shadow: var(--sd-focus);
}

.tscrm-subscribe__row .sd-btn {
	flex: 0 0 auto;
	margin: 0;
}

.tscrm-subscribe__legal {
	margin: 8px 0 0;
}

.tscrm-subscribe__legal a {
	color: var(--sd-link);

	text-decoration-line: underline;
}

.tscrm-subscribe--zeile .sd-msg {
	margin: 4px 0 0;
}

@container (max-width: 560px) {
	.tscrm-subscribe--zeile .tscrm-subscribe__email,
	.tscrm-subscribe__consent,
	.tscrm-subscribe__row .sd-btn {
		flex-basis: 100%;
	}
}

body:has(.tscrm-subscribe[data-deferred]:not([hidden] *)) .tscrm-subscribe[data-fallback],
body:has(.tscrm-subscribe[data-deferred]:not([hidden] *)) .ct-footer [data-column] > .widget:has(> .tscrm-subscribe[data-fallback]) {
	display: none;
}

/*
 * Footer (approval F4: band ABOVE the menu "Footer (oben)").
 *
 * Blocksy names a footer column after its FIRST item (data-column="menu"), and the
 * menu's styling hangs on exactly that name. The widget area therefore sits as the
 * SECOND item in the column and is moved to the front here — otherwise the menu would
 * lose its alignment and spacing.
 */
.ct-footer [data-column] > .widget:has(.tscrm-subscribe--zeile) {
	order: -1;
	align-self: stretch;

	margin-top: 30px;
}

/* WordPress wraps the shortcode block in an empty paragraph before the band (~24 px). */
.ct-footer .widget:has(.tscrm-subscribe--zeile) > p:empty {
	display: none;
}

/* When the server renders nothing (form elsewhere on the page, subscriber, feature off),
   Blocksy still prints the widget wrapper with an empty paragraph. It takes no part.
   Only a wrapper that holds an empty paragraph and nothing else — a block with plain
   text (no element child) stays visible. */
.ct-footer [data-column] > .widget_block:has(> p:empty):not(:has(> :not(p:empty))) {
	display: none;
}

.ct-footer .tscrm-subscribe--zeile {
	margin: 0 0 14px;
	padding: 16px 20px 18px;
	border: 0;
	border-radius: var(--sd-radius-lg);
	background: var(--sd-surface);
	box-shadow: var(--sd-shadow-sm);
	text-align: start;
}

/* Last resort for the feedback (its place is gone on the target page). */
.tscrm-subscribe--late {
	padding: 12px 16px;
}
