/*
 * Bausteine aus dem Plugin smellypassion-core: Beiträge-Raster, Formulare, Extras.
 * Übernommen aus dem früheren Astra-Child-Theme.
 */

/* [sp_neueste_beitraege]: Karten wie der frühere „Post Grid“ (Unlimited Elements) auf der Startseite. */
.sp-posts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}
/* Knopf unter den Karten („Alle News anzeigen“) mit Abstand (Wunsch Betreiber 2026-11-25). */
.sp-posts + .wp-block-buttons {
	margin-top: 40px;
}
.sp-posts__item {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 20px;
}
.sp-posts__image img {
	display: block;
	width: 100%;
	height: 400px;
	object-fit: cover;
	object-position: center top;
	transition: transform 0.3s;
}
.sp-posts__image:hover img {
	transform: scale(1.03);
}
.sp-posts__content {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 30px;
	background: #eee;
}
.sp-posts__title {
	margin: 0 0 10px;
	font-family: Poppins, sans-serif;
	font-size: 21px;
	font-weight: 400;
	line-height: 39px;
}
.sp-posts .sp-posts__title a,
.sp-posts a.sp-posts__button {
	text-decoration: none;
}
.sp-posts__title a {
	color: #000;
	text-decoration: none;
}
.sp-posts__button {
	align-self: flex-start;
	margin-top: auto;
	padding: 10px 20px;
	border-radius: 25px;
	background: #8e43f0;
	color: #fff;
	font-family: Poppins, sans-serif;
	font-size: 15px;
	text-decoration: none;
	transition: background 0.3s;
}
.sp-posts__button:hover,
.sp-posts__button:focus {
	background: #7a2fe0;
	color: #fff;
}
/* Handy/Tablet (Wunsch Betreiber 2026-11-24): zwei kleine Karten nebeneinander, weitere ausgeblendet – darunter führt
   der Knopf „Alle News anzeigen“ der Startseite zur Beitragsseite. */
@media (max-width: 921px) {
	.sp-posts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.sp-posts__item:nth-child(n+3) {
		display: none;
	}
	.sp-posts__item {
		border-radius: var(--sp-ecke, 15px);
	}
	.sp-posts__image img {
		height: auto;
		aspect-ratio: 3 / 4;
	}
	.sp-posts__content {
		padding: 12px;
	}
	.sp-posts__title {
		margin-bottom: 8px;
		font-size: 15px;
		line-height: 1.35;
	}
	.sp-posts__button {
		padding: 7px 14px;
		font-size: 13px;
	}
}

/* Formulare [sp_kontaktformular] und [sp_bewerbung] (Modul forms): Abschnitte als weiße Karten, große Felder und
   Auswahl-Kacheln zum Antippen (auch auf dem Handy), Foto-Upload wie bei der Registrierung (.sp-upload). */
.sp-form {
	display: grid;
	gap: 20px;
	max-width: 760px;
	margin: 0 auto;
}
.sp-form__abschnitt {
	display: grid;
	gap: 20px;
	padding: 28px;
	border: 1px solid #e7e2ee;
	border-radius: var(--sp-ecke);
	background: var(--sp-weiss);
}
.sp-form__heading {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	color: var(--sp-dunkel);
	font-size: 20px;
	line-height: 1.3;
}
.sp-form__nr {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--sp-lila);
	color: var(--sp-weiss);
	font-size: 15px;
	font-weight: 600;
}
.sp-form__field label,
.sp-form__field legend,
.sp-form__label {
	display: block;
	margin: 0 0 8px;
	color: var(--sp-dunkel);
	font-weight: 500;
	line-height: 1.45;
}
.sp-form__field fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}
.sp-form input[type="text"],
.sp-form input[type="email"],
.sp-form input[type="tel"],
.sp-form input[type="number"],
.sp-form input[type="date"],
.sp-form textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 52px;
	padding: 12px 16px;
	border: 1.5px solid #ddd5e8;
	border-radius: var(--sp-ecke-klein);
	background: var(--sp-weiss);
	color: var(--sp-dunkel);
	font-size: 16px; /* 16 px: iPhone zoomt beim Tippen nicht hinein. */
	font-family: inherit;
}
.sp-form input[type="date"] {
	-webkit-appearance: none;
	appearance: none;
	display: block;
}
.sp-form textarea {
	min-height: 130px;
}
.sp-form input:focus,
.sp-form textarea:focus {
	border-color: var(--sp-lila);
	outline: none;
	box-shadow: 0 0 0 3px rgba(142, 67, 240, 0.18);
}
.sp-form__choices {
	display: grid;
	gap: 10px;
}
.sp-form .sp-form__choice {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 54px;
	margin: 0;
	padding: 12px 16px;
	border: 1.5px solid #e2dcea;
	border-radius: var(--sp-ecke-klein);
	background: var(--sp-weiss);
	color: var(--sp-text);
	font-weight: 400;
	line-height: 1.4;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}
.sp-form__field--consent .sp-form__choice {
	align-items: flex-start;
	font-size: 14px;
}
.sp-form .sp-form__choice input {
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--sp-lila);
	cursor: pointer;
}
.sp-form__field--consent .sp-form__choice input {
	margin-top: 1px;
}
.sp-form .sp-form__choice:hover {
	border-color: #c9b5ef;
}
.sp-form .sp-form__choice:has(input:checked) {
	border-color: var(--sp-lila);
	background: #f6f0fe;
	color: var(--sp-dunkel);
}
.sp-form .sp-form__choice:has(input:focus-visible) {
	box-shadow: 0 0 0 3px rgba(142, 67, 240, 0.25);
}
.sp-form__html p {
	margin: 0 0 10px;
}
.sp-form__html p:last-child {
	margin-bottom: 0;
}
.sp-form__req {
	color: #c0392b;
}
.sp-form__help {
	margin: 8px 0 0;
	font-size: 13px;
	opacity: 0.8;
}
.sp-form__field--error input,
.sp-form__field--error textarea,
.sp-form__field--error .sp-form__choice,
.sp-form__field--error .sp-upload__wahl {
	border-color: #c0392b;
}
.sp-form__errors,
.sp-form__success {
	padding: 16px 20px;
	border-radius: var(--sp-ecke-klein);
}
.sp-form__errors {
	background: #fdecea;
	color: #8a1f11;
}
.sp-form__errors ul {
	margin: 6px 0 0 1.2em;
}
.sp-form__success {
	background: #eaf7ee;
	color: #1d5e33;
	font-weight: 500;
}
.sp-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.sp-form__actions {
	margin: 0;
	text-align: center;
}
.sp-form__submit {
	min-width: 260px;
	min-height: 54px;
	padding: 14px 38px;
	border: 0;
	border-radius: 999px;
	background: var(--sp-lila);
	color: var(--sp-weiss);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
}
.sp-form__submit:hover,
.sp-form__submit:focus {
	background: var(--sp-lila-dunkel);
}
/* Bedingte Felder (z. B. Plattformen nur bei „Ja“): ohne JavaScript per :has(). */
@supports selector(:has(*)) {
	.sp-form__cond {
		display: none;
	}
	.sp-form:has(input[name="erfahrung"][value="Ja"]:checked) [data-if="erfahrung=Ja"],
	.sp-form:has(input[name="social"][value="Ja"]:checked) [data-if="social=Ja"] {
		display: block;
	}
}
@media (min-width: 600px) {
	/* Kurze Antworten (Ja/Nein, Auftreten) nebeneinander. */
	.sp-form__field--radio .sp-form__choices {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	}
	/* Lange Antworten (z. B. „Ich bin …“ bei Bild melden): höchstens zwei nebeneinander. */
	.sp-form__field--lang.sp-form__field--radio .sp-form__choices {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 599px) {
	.sp-form__abschnitt {
		padding: 22px 18px;
	}
	.sp-form__heading {
		font-size: 18px;
	}
	.sp-form__submit {
		width: 100%;
		min-width: 0;
	}
}

/* Foto-Upload (Bewerbung: Echtheitsfoto, Registrierung: Ausweis-Foto): großer Knopf, gewählte Dateien darunter. */
.sp-form__field--files {
	position: relative;
}
.sp-upload__feld {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}
.sp-upload__wahl {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 20px 14px;
	border: 2px dashed var(--sp-lila);
	border-radius: var(--sp-ecke-klein);
	background: var(--sp-hell);
	cursor: pointer;
	text-align: center;
}
.sp-upload__knopf {
	display: inline-block;
	padding: 12px 22px;
	border-radius: 999px;
	background: var(--sp-lila);
	color: var(--sp-weiss);
	font-weight: 600;
	line-height: 1.3;
}
.sp-upload__datei {
	font-size: 13px;
	overflow-wrap: anywhere;
}
.sp-upload__datei:empty {
	display: none;
}
.sp-upload__wahl.is-gewaehlt {
	border-style: solid;
	border-color: #2e8540;
}
.sp-upload__wahl.is-gewaehlt .sp-upload__datei {
	color: #2e8540;
	font-weight: 600;
}
.sp-upload__feld:focus-visible + .sp-upload__wahl {
	outline: 2px solid var(--sp-lila-dunkel);
	outline-offset: 2px;
}
.sp-upload__schutz {
	margin: 10px 0 0;
	font-size: 12px;
}
.sp-upload__schutz::before {
	content: "🔒 ";
}

/* Extras am Produkt (Modul extras, Ersatz für WowAddons; Maße/Farben wie bisher). */
.sp-extras {
	margin: 0 0 24px;
	width: 100%;
	color: #0b0e04;
}
.sp-extras-section {
	border: 1px solid #c8c8c8;
	border-radius: 4px;
	margin-bottom: 24px;
}
.sp-extras-section-head {
	padding: 16px;
	border-bottom: 1px solid #c8c8c8;
}
.sp-extras-section-body {
	padding: 16px;
}
.sp-extras-field {
	margin-bottom: 24px;
}
.sp-extras-section-body > .sp-extras-field:last-child {
	margin-bottom: 0;
}
.sp-extras-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 4px;
}
.sp-extras-title {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
}
.sp-extras-section-head .sp-extras-title {
	margin-bottom: 2px;
}
.sp-extras-desc {
	font-size: 14px;
	line-height: 1.4;
	margin-bottom: 8px;
}
.sp-extras-options {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 10px;
}
/* Kästchen | Name | Preis: Preise stehen rechtsbündig untereinander (Wunsch Betreiber 2026-11-20). */
.sp-extras-option {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	column-gap: 10px;
	font-size: 15px;
	line-height: 1.6;
	cursor: pointer;
	margin: 0;
}
.sp-extras-option input {
	accent-color: #0b0e04;
	margin: 0;
	flex: none;
	cursor: pointer;
}
.sp-extras-checkbox input {
	width: 16px;
	height: 16px;
}
.sp-extras-radio input {
	width: 22px;
	height: 22px;
}
.sp-extras-price {
	color: #6b6b6b;
	font-size: 14px;
	white-space: nowrap;
	text-align: right;
}
.sp-extras-input,
.sp-extras select.sp-extras-input {
	width: 100%;
	margin-top: 8px;
	padding: 9px 16px;
	border: 1px solid #c8c8c8;
	border-radius: 4px;
	font-size: 15px;
	background: #fff;
}
.sp-extras-content {
	margin-top: 4px;
}
.sp-extras-summary {
	margin-top: 8px;
	font-size: 15px;
	line-height: 1.9;
}
.sp-extras-summary strong {
	font-weight: 600;
}

/* ---------- Newsletter im Footer (Plugin: forms/footer-newsletter.php) ---------- */
.monoletter-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 340px;
}
.monoletter-form input[type="email"] {
	width: 100%;
	padding: 12px 14px;
	border-radius: 6px;
}
.monoletter-form label {
	position: relative;
	display: block;
	padding-left: 24px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--sp-text);
}
.monoletter-form label input[type="checkbox"] {
	position: absolute;
	top: 2px;
	left: 0;
	margin: 0;
	accent-color: var(--sp-lila);
}
.monoletter-form label a {
	text-decoration: underline;
}
.monoletter-form button {
	align-self: flex-start;
	padding: 14px 28px;
	border: 0;
	border-radius: 50px;
	background: var(--sp-lila);
	color: var(--sp-weiss);
	font-family: var(--sp-schrift);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 2px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s;
}
.monoletter-form button:hover {
	background: var(--sp-lila-dunkel);
}
.monoletter-form button:disabled {
	opacity: 0.6;
	cursor: wait;
}
/* Antwort des Newsletter-Dienstes unter dem Formular. */
.monoletter-message {
	margin: 12px 0 0;
	padding: 10px 14px;
	border-radius: var(--sp-ecke-klein);
	font-size: 0.9em;
	line-height: 1.5;
}
.monoletter-message[hidden] {
	display: none;
}
.monoletter-ok {
	background: #eaf7ee;
	color: #1d5e33;
}
.monoletter-error {
	background: #fdecea;
	color: #8a1f11;
}

/* Formular mit Foto abschicken: Fortschritt (forms/render.php submit_progress_script) */
.sp-senden {
	margin-top: 14px;
}
.sp-senden__balken {
	height: 10px;
	overflow: hidden;
	border-radius: 999px;
	background: #efe7fb;
}
.sp-senden__balken span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 999px;
	background: #8e43f0;
	transition: width 0.3s ease;
}
.sp-senden__text {
	margin: 8px 0 0;
	font-size: 15px;
}
.sp-senden.is-fehler .sp-senden__text {
	color: #b3261e;
}
form[data-sp-fortschritt] [type="submit"]:disabled {
	opacity: 0.6;
	cursor: wait;
}

/* Einleitung über einem Formular (Seiten „Bild melden“, „Vorschläge & Ideen“): Karte in derselben Breite wie das Formular. */
.sp-form-intro {
	max-width: 760px;
	margin: 0 auto 20px;
	padding: 28px;
	border: 1px solid #e7e2ee;
	border-radius: var(--sp-ecke);
	background: var(--sp-weiss);
	font-size: 16px;
	line-height: 1.6;
}
.sp-form-intro > :first-child {
	margin-top: 0;
}
.sp-form-intro > :last-child {
	margin-bottom: 0;
}
.sp-form-intro h3 {
	margin: 22px 0 10px;
	font-size: 20px;
}
.sp-form-intro ol {
	margin: 0;
	padding-left: 1.3em;
}
.sp-form-intro li + li {
	margin-top: 6px;
}
.sp-form-intro .sp-form-intro__hinweis {
	padding: 14px 16px;
	border-left: 4px solid var(--sp-lila);
	border-radius: var(--sp-ecke-klein);
	background: #f6f0fe;
}
@media (max-width: 599px) {
	.sp-form-intro {
		padding: 22px 18px;
		font-size: 15px;
	}
}
