/**
 * PingPong Video-Testimonial – Frontend-Styles
 *
 * Wie bei pp-filmstreifen steckt die Spaltenzahl in einer Klasse (pp-vt--cN)
 * und nicht in einem Inline-Style: inline würde die Breakpoints weiter unten
 * überstimmen, und das Raster bliebe auch auf dem Handy dreispaltig.
 */

.pp-vt {
	--pp-vt-cols: 3;
	--pp-vt-max: 320px;
	--pp-vt-gap: 24px;
	--pp-vt-align: center;
	--pp-vt-frame: #2d2d44;
	--pp-vt-frame-w: 2px;
	--pp-vt-radius: 28px;
	--pp-vt-screen-bg: #1a1a2e;
	--pp-vt-play: #ffffff;
	--pp-vt-play-bg: rgba(0, 0, 0, 0.45);
	--pp-vt-play-size: 48px;

	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}

.pp-vt *,
.pp-vt *::before,
.pp-vt *::after {
	box-sizing: border-box;
}

.pp-vt--c1 { --pp-vt-cols: 1; }
.pp-vt--c2 { --pp-vt-cols: 2; }
.pp-vt--c3 { --pp-vt-cols: 3; }
.pp-vt--c4 { --pp-vt-cols: 4; }
.pp-vt--c5 { --pp-vt-cols: 5; }

/* ---- Raster ---- */

.pp-vt-grid {
	display: grid;
	grid-template-columns: repeat(var(--pp-vt-cols), minmax(0, 1fr));
	gap: var(--pp-vt-gap);
	justify-items: var(--pp-vt-align);
	align-items: start;
}

/* Gleiche Spezifität wie .pp-vt--cN, steht aber später → gewinnt. */
@media (max-width: 900px) {
	.pp-vt, .pp-vt--c1, .pp-vt--c2, .pp-vt--c3, .pp-vt--c4, .pp-vt--c5 { --pp-vt-cols: 2; }
}

@media (max-width: 560px) {
	.pp-vt, .pp-vt--c1, .pp-vt--c2, .pp-vt--c3, .pp-vt--c4, .pp-vt--c5 { --pp-vt-cols: 1; }
}

/* ---- Der Rahmen: schlicht, nur Rand und runde Ecken ---- */

.pp-vt-phone {
	position: relative;
	width: 100%;
	max-width: var(--pp-vt-max);
	padding: calc(var(--pp-vt-frame-w) * 3);
	border: var(--pp-vt-frame-w) solid var(--pp-vt-frame);
	border-radius: var(--pp-vt-radius);
	background: var(--pp-vt-screen-bg);
	overflow: hidden;
}

.pp-vt-screen {
	position: relative;
	display: block;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: calc(var(--pp-vt-radius) - var(--pp-vt-frame-w) * 3);
	background: var(--pp-vt-screen-bg);
}

.pp-vt-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	background: var(--pp-vt-screen-bg);
}

/* ---- Klickfläche mit Play-Zeichen ----
   Liegt über dem Video, solange das Video stumme Vorschau ist. Sobald per
   Klick Ton und Bedienleiste an sind, verschwindet sie – sonst würden ihre
   Klicks die native Bedienleiste des Videos abfangen. */

.pp-vt-hit {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background 0.2s ease;
}

.pp-vt-phone.is-active .pp-vt-hit { display: none; }

.pp-vt-hit:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -3px;
}

.pp-vt-play {
	width: var(--pp-vt-play-size);
	height: var(--pp-vt-play-size);
	border-radius: 50%;
	background: var(--pp-vt-play-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.pp-vt-play::after {
	content: "";
	width: 0;
	height: 0;
	border-style: solid;
	border-width: calc(var(--pp-vt-play-size) / 6) 0 calc(var(--pp-vt-play-size) / 6) calc(var(--pp-vt-play-size) / 3.4);
	border-color: transparent transparent transparent var(--pp-vt-play);
	margin-left: calc(var(--pp-vt-play-size) / 12);
}

.pp-vt-hit:hover .pp-vt-play,
.pp-vt-hit:focus-visible .pp-vt-play { transform: scale(1.1); }

.pp-vt--no-play .pp-vt-play { display: none; }

/* Läuft die stumme Vorschau, tritt das Play-Zeichen in den Hintergrund –
   es bleibt aber sichtbar als Hinweis „klicken für Ton". */
.pp-vt-phone.is-preview .pp-vt-play { opacity: 0.45; }

/* ---- Tonhinweis, sobald die stumme Vorschau läuft ---- */

.pp-vt-muted {
	position: absolute;
	right: 8px;
	bottom: 8px;
	padding: 4px 9px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: 0.02em;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.pp-vt-phone.is-preview .pp-vt-muted { opacity: 1; }
.pp-vt-phone.is-active .pp-vt-muted { display: none; }

/* ---- Platzhalter, wenn im Editor noch kein Video eingetragen ist ---- */

.pp-vt-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	text-align: center;
	color: rgba(255, 255, 255, 0.45);
	font-size: 13px;
	background: linear-gradient(135deg, #2e2848 0%, #0e0c1a 100%);
}

@media (prefers-reduced-motion: reduce) {
	.pp-vt-hit,
	.pp-vt-play,
	.pp-vt-muted { transition: none; }
}
