/* DFP Coverflow – Bühne, Bedienelemente und Beschriftung.

   Das Bild selbst rechnet assets/dfp-coverflow.js in ein <canvas>. Hier liegen
   nur Größe der Bühne, Vignette, Pfeile, Titelzeile und Punktreihe.

   Höhe, Abstand und Farben laufen über die CSS-Variablen unten. Ueberschreiben
   im Bricks-Element (Höhe, Abstand) oder in Bricks unter
   Settings -> Custom Code -> Custom CSS. */

.dfp-coverflow,
.dfp-coverflow * {
	box-sizing: border-box;
}

/* Der Wrapper, den Bricks um das Element legt.

   Sitzt das Element in einer Section mit `flex-direction: column` und
   `align-items: center` – so gebaut sind die Projektseiten –, dann ist der
   Wrapper ein Flex-Element auf der Querachse und schrumpft auf seine
   Inhaltsbreite. Die Bühne darin rechnet mit `width: 100%`, das wäre dann
   ein Verweis auf sich selbst und endet bei 0. Deshalb hier ausdrücklich
   die volle Breite. */
.dfp-coverflow-wrap {
	width: 100%;
	align-self: stretch;
}

.dfp-coverflow {
	/* Basis-Schrift der Bedienelemente. */
	--cf-font: 'Source Code Pro', monospace;

	/* Schrift von Titelzeile und Hinweis. */
	--cf-font-mono: 'Source Code Pro', monospace;

	/* Abstand von Titel + Punkten zur Kassette (nur Desktop).
	   Das Skript rechnet die Unterkante der geöffneten Kassette aus und setzt
	   den Block genau so weit darunter – siehe layoutBottomNav() im JS. */
	--cf-title-gap: 40px;

	/* Höhe der Bühne.
	   Desktop kommt aus --cf-height-desktop, mobil aus --cf-height-mobile.
	   Beides setzt das Element bzw. der Shortcode als Inline-Style, damit sich
	   die zwei Fälle getrennt einstellen lassen, ohne dass die Inline-Angabe
	   die Media Query unten schlaegt.
	   svh = sichtbare Fensterhöhe auf Handys, also ohne die Browserleiste. */
	--cf-height: var(--cf-height-desktop, 800px);

	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: var(--cf-height);
	min-height: 320px;
	overflow: hidden;
	background: transparent;
	font-family: var(--cf-font);
}

/* Bühne für das <canvas>. Nimmt die ganze Höhe minus dem, was die
   Titelzeile am unteren Rand belegt. */
.dfp-coverflow .cf-scene {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
}

.dfp-coverflow canvas {
	position: absolute;
	inset: 0;
	display: block;

	/* Wischen nach links/rechts gehört dem Karussell,
	   nach oben/unten scrollt weiterhin die Seite. */
	touch-action: pan-y;
}

/* Randabdunklung, damit die Reihe zu den Seiten hin ausblendet. */
.dfp-coverflow .cf-vignette {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(0, 0, 0, 0.72) 100%);
	pointer-events: none;
	z-index: 2;
}

/* Ebene für Pfeile und Hinweis. Selbst durchlässig – nur die Buttons
   darin fangen Klicks. */
.dfp-coverflow .cf-ui {
	position: absolute;
	inset: 0;
	z-index: 5;
	pointer-events: none;
}

.dfp-coverflow .cf-nav-btn {
	position: absolute;
	top: 46%;
	transform: translateY(-50%);
	pointer-events: all;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	background: transparent;
	color: rgba(255, 255, 255, 0.55);
	font-size: 16px;
	cursor: pointer;
	user-select: none;
	transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.dfp-coverflow .cf-nav-btn:hover {
	background: rgba(255, 255, 255, 0.09);
	border-color: rgba(255, 255, 255, 0.45);
	color: #fff;
}

.dfp-coverflow .cf-nav-btn:active {
	background: rgba(255, 255, 255, 0.18);
}

.dfp-coverflow .cf-nav-btn:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.8);
	outline-offset: 2px;
}

.dfp-coverflow .cf-nav-prev { left: 16px; }
.dfp-coverflow .cf-nav-next { right: 16px; }

@media (min-width: 640px) {
	.dfp-coverflow .cf-nav-prev { left: 36px; }
	.dfp-coverflow .cf-nav-next { right: 36px; }
}

/* Titel + Punkte sitzen mit festem Abstand unter der Kassette selbst.
   Die 3D-Szene füllt den ganzen Container, deshalb setzt das Skript den
   Block per top in Pixeln – siehe --cf-title-gap oben.
   Mobil sitzt der Block stattdessen fest am unteren Rand. */
.dfp-coverflow .cf-nav-bottom {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	z-index: 6;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;

	/* Punkte und Text liegen über der Szene, blockieren aber nichts. */
	pointer-events: none;
}

.dfp-coverflow .cf-title {
	font-family: var(--cf-font-mono);
	font-size: 16px;
	letter-spacing: 1px;
	color: #fff;
	white-space: nowrap;
}

.dfp-coverflow .cf-dots {
	display: flex;
	align-items: center;
	gap: 6px;
}

.dfp-coverflow .cf-dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	transition: all 0.35s ease;
}

/* Die ausgewählte Kassette wird zum Strich statt zum Punkt. */
.dfp-coverflow .cf-dot.active {
	width: 18px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.75);
}

/* Hinweis auf der offenen Kassette. Standardmäßig unsichtbar
   (Farbe transparent), das Skript blendet ihn per .visible ein. */
.dfp-coverflow .cf-open-hint {
	position: absolute;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%);
	font-family: var(--cf-font-mono);
	font-size: 9px;
	letter-spacing: 4px;
	text-transform: lowercase;
	color: rgba(255, 255, 255, 0);
	white-space: nowrap;
	pointer-events: none;
	transition: color 0.4s;
}

.dfp-coverflow .cf-open-hint.visible {
	color: rgba(255, 255, 255, 0.3);
}

/* Liste für den Fall, dass kein JavaScript läuft. */
.dfp-coverflow .cf-fallback {
	margin: 0;
	padding: 2rem;
	list-style: none;
	font-family: var(--cf-font-mono);
}

.dfp-coverflow .cf-fallback a {
	color: #fff;
}

/* Hinweis im Bricks-Builder, wenn keine Projekte gefunden wurden. */
.dfp-coverflow-empty {
	padding: 2rem;
	color: #888;
	font-family: sans-serif;
}

/* ─────────────────────────────────────────────────────────────────────
   MOBIL

   Die Klasse is-mobile setzt das Skript selbst, sobald das Fenster
   schmaler ist als der Breakpoint in MOBILE (siehe JS). Die Media Query
   daneben regelt nur die Höhe – die hängt am Fenster, nicht am Modus.
   ───────────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	.dfp-coverflow {
		--cf-height: var(--cf-height-mobile, 100svh);
	}
}

/* Titel und Punkte fest unten, damit die Kassette darüber so gross
   wie möglich stehen kann. */
.dfp-coverflow.is-mobile .cf-nav-bottom {
	top: auto;
	bottom: 14px;
	gap: 10px;
}

.dfp-coverflow.is-mobile .cf-title {
	font-size: 13px;
}

/* Pfeile über den angeschnittenen Nachbarn – mit etwas Grund,
   damit sie auf hellen Covern sichtbar bleiben. */
.dfp-coverflow.is-mobile .cf-nav-btn {
	top: 50%;
	width: 40px;
	height: 40px;
	border-color: rgba(255, 255, 255, 0.3);
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.dfp-coverflow.is-mobile .cf-nav-prev { left: 8px; }
.dfp-coverflow.is-mobile .cf-nav-next { right: 8px; }

.dfp-coverflow.is-mobile .cf-open-hint {
	bottom: 64px;
	font-size: 10px;
}
