/**
 * Campaigns and games (inc/campaigns.php, inc/games.php).
 * Loaded only while something of it is shown, and in the block editor.
 *
 * The band and the game section carry the class "bd-band", so they take part in the slanted
 * section edges of theme.css; their gradient is drawn from the border box and fills the slant.
 */

/* ---------- Dark surface with falling snow (band and game section) ---------- */

.bd-aktion {
	--bd-aktion-pink-hell: #ff8fbd;
	position: relative;
	color: #ffffff;
}

.bd-aktion.bd-band {
	padding-top: 0;
	padding-bottom: 0;
	background: radial-gradient(120% 90% at 80% 0%, #3a1a2c 0%, #120a10 45%, #000000 100%);
	color: #ffffff;
}

.bd-aktion::before,
.bd-aktion::after {
	content: "";
	position: absolute;
	inset: calc(-200px - var(--bd-schraege, 20px)) 0 calc(-1 * var(--bd-schraege, 20px));
	pointer-events: none;
	background-image:
		radial-gradient(3px 3px at 20px 30px, #ffffff 50%, transparent 51%),
		radial-gradient(2px 2px at 120px 80px, #ffffff 50%, transparent 51%),
		radial-gradient(3px 3px at 220px 150px, rgba(255, 255, 255, 0.85) 50%, transparent 51%),
		radial-gradient(2px 2px at 300px 40px, #ffffff 50%, transparent 51%),
		radial-gradient(2px 2px at 60px 190px, rgba(255, 255, 255, 0.7) 50%, transparent 51%);
	background-size: 340px 220px;
	animation: bd-schnee 14s linear infinite;
	opacity: 0.55;
}

.bd-aktion::after {
	background-size: 220px 180px;
	animation-duration: 22s;
	opacity: 0.35;
	filter: blur(0.6px);
}

@keyframes bd-schnee {
	to { transform: translateY(200px); }
}

@media (prefers-reduced-motion: reduce) {
	.bd-aktion::before,
	.bd-aktion::after {
		animation: none;
	}
}

.bd-aktion > * {
	position: relative;
	z-index: 1;
}

.bd-aktion :is(h1, h2, h3, p, li) {
	color: #ffffff;
}

.bd-aktion :is(h1, h2) {
	margin: 0;
	font-size: clamp(30px, 3.6vw, 48px);
	line-height: 1.05;
	letter-spacing: -0.03em;
	font-weight: 800;
	text-wrap: balance;
}

/* Accent: the editor's highlight (mark) or a span. */
.bd-aktion :is(h1, h2) :is(mark, span) {
	background: none;
	color: var(--wp--preset--color--magenta) !important;
}

.bd-aktion a:not(.wp-block-button__link) {
	color: #ffffff;
}

/* ---------- Band (pattern "Aktionsband") ---------- */

.bd-aktion__inner {
	max-width: 1240px;
	margin-inline: auto !important;
	padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 48px);
	gap: clamp(28px, 5vw, 72px) !important;
	align-items: center !important;
}

.bd-aktion__eyebrow {
	display: inline-block;
	margin: 0 0 18px !important;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 71, 145, 0.16);
	color: var(--bd-aktion-pink-hell) !important;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.bd-aktion__lead {
	margin: 20px 0 0 !important;
	max-width: 34em;
	font-size: clamp(17px, 1.5vw, 20px);
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.82) !important;
}

.bd-aktion__knoepfe {
	margin-top: 32px !important;
	gap: 14px 24px !important;
	align-items: center;
}

.bd-aktion__fakten {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 28px 0 0 !important;
	padding: 0 !important;
	list-style: none;
	font-size: 15px;
}

.bd-aktion__fakten li {
	color: rgba(255, 255, 255, 0.7) !important;
}

.bd-aktion__fakten li::before {
	content: "❄";
	margin-right: 8px;
	color: var(--bd-aktion-pink-hell);
}

.bd-aktion__bild {
	position: relative;
	margin: 0 !important;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
	transform: rotate(-1.5deg);
	transition: transform 0.3s ease;
}

.bd-aktion__bild:hover {
	transform: rotate(0) scale(1.01);
}

.bd-aktion__bild img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* "Spielen" on the linked picture. */
.bd-aktion__bild a::after {
	content: "Spielen";
	position: absolute;
	left: 50%;
	top: 50%;
	translate: -50% -50%;
	padding: 16px 28px 16px 52px;
	border-radius: 999px;
	background: var(--wp--preset--color--magenta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 18'%3E%3Cpath fill='%23fff' d='M0 0l14 9-14 9z'/%3E%3C/svg%3E") no-repeat 26px 50% / 14px 18px;
	color: #ffffff;
	font-weight: 700;
	font-size: 19px;
	box-shadow: 0 10px 30px rgba(255, 71, 145, 0.45);
}

.bd-aktion__ende {
	margin: 14px 0 0 !important;
	font-size: 13px;
	text-align: right;
	color: rgba(255, 255, 255, 0.55) !important;
}

@media (max-width: 781px) {
	.bd-aktion__bild {
		transform: none;
	}

	.bd-aktion__ende {
		text-align: left;
	}
}

/* ---------- Bar above the header ---------- */

.bd-aktion-leiste {
	position: relative;
	z-index: 30;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 10px 56px 10px 16px;
	background: var(--wp--preset--color--magenta);
	color: #ffffff;
	font-weight: 700;
	font-size: 16px;
	text-align: center;
}

.bd-aktion-leiste[hidden] {
	display: none;
}

.bd-aktion-leiste__text {
	margin: 0;
}

.bd-aktion-leiste__text::before {
	content: "❄ ";
}

.bd-aktion-leiste a {
	color: #ffffff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bd-aktion-leiste__zu {
	position: absolute;
	right: 12px;
	top: 50%;
	translate: 0 -50%;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.15);
	color: #ffffff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

@media (max-width: 600px) {
	.bd-aktion-leiste {
		font-size: 15px;
	}
}

/* ---------- Game section (block "Spiel") ---------- */

.bd-spiel__kopf {
	max-width: 1100px;
	margin-inline: auto;
	padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 48px) 24px;
}

.bd-spiel .bd-breadcrumb,
.bd-spiel .bd-breadcrumb a {
	color: rgba(255, 255, 255, 0.7) !important;
}

.bd-spiel__titel {
	margin-top: 12px !important;
	font-size: clamp(34px, 4.6vw, 68px) !important;
}

.bd-spielrahmen {
	max-width: 1100px;
	margin-inline: auto;
	padding: 0 clamp(16px, 4vw, 48px) clamp(48px, 6vw, 80px);
}

.bd-spielrahmen__feld {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 18px;
	overflow: hidden;
	background: #000000;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.bd-spielrahmen__feld iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.bd-spielrahmen__handy {
	display: none;
	margin: 0 0 16px;
}

.bd-spielrahmen__hinweis {
	margin: 14px 0 0 !important;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.6) !important;
}

@media (max-width: 760px) {
	.bd-spielrahmen__handy {
		display: block;
	}

	.bd-spielrahmen__handy .wp-block-button__link {
		display: block;
		text-align: center;
	}
}

.bd-spiel__ende {
	padding: 32px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.07);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* ---------- Share box below the game ---------- */

.bd-spiel-teilen {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 32px;
	margin-top: 20px;
	padding: 22px 26px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.07);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.bd-spiel-teilen__text {
	flex: 1 1 300px;
}

.bd-spiel-teilen__titel {
	margin: 0 !important;
	font-size: 22px;
	font-weight: 800;
}

.bd-spiel-teilen__text p:not(.bd-spiel-teilen__titel),
.bd-spiel__ende p:not(.bd-spiel-teilen__titel) {
	margin: 4px 0 0 !important;
	color: rgba(255, 255, 255, 0.75) !important;
}

.bd-spiel__ende .wp-block-button {
	margin-top: 20px;
}

.bd-spiel-teilen__wege {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
}

.bd-spiel-teilen .bd-teilen__liste {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bd-spiel-teilen .bd-teilen__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #ffffff !important;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.bd-spiel-teilen .bd-teilen__link:hover,
.bd-spiel-teilen .bd-teilen__link:focus-visible {
	background: var(--wp--preset--color--magenta);
}

.bd-spiel-teilen .bd-teilen__link svg,
.bd-spiel-teilen__knopf svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.bd-spiel-teilen__knopf {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	border: 0;
	cursor: pointer;
}

.bd-spiel-teilen__status {
	flex-basis: 100%;
	margin: 0 !important;
	min-height: 1.4em;
	font-size: 14px;
	color: var(--bd-aktion-pink-hell) !important;
}

@media (max-width: 600px) {
	.bd-spiel-teilen {
		padding: 18px;
	}

	.bd-spiel-teilen__wege > .wp-block-button,
	.bd-spiel-teilen__knopf {
		width: 100%;
		justify-content: center;
	}
}
