.shade {
	display: inline-block;
	background: #fff;
	width: 1px;
	top: 0;
	bottom: 0;
	position: absolute;
	z-index: 20;
	box-shadow: 0 0 10px 10px #fff;
}

.shade.left {
	left: 1px;
}

.shade.right {
	right: 1px;
}

.bb-video-stories {
	position: relative;
	overflow: hidden;
	align-items: center;
}

.bb-video-stories-track-wrap {
	overflow: hidden;
}

.bb-video-stories-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding: 8px 16px;
}

.bb-video-stories-track::-webkit-scrollbar {
	display: none;
}

.bb-video-story-card {
	min-width: var(--min-ivv-width, 180px);
	max-width: var(--max-ivv-width, 180px);
	flex: 0 0 180px;
	border-radius: var(--radius, 8px);
	overflow: hidden;
	background: #eee;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bb-video-story-link {
	display: block;
	touch-action: manipulation;
	color: inherit;
	text-decoration: none;
}

.bb-video-story-media {
	position: relative;
	aspect-ratio: 9 / 16;
	background: #111;
	overflow: hidden;
}

.bb-video-story-video,
.bb-video-story-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bb-video-story-external,
.bb-video-story-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(145deg, #252525, #050505);
}

.bb-video-story-external::after,
.bb-video-story-placeholder::after {
	content: "";
	position: absolute;
	inset: 25%;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 50%;
}

.bb-video-story-play {
	position: absolute;
	right: 10px;
	bottom: 10px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 14px;
	pointer-events: none;
}

.bb-video-story-content {
	padding: 6px;
	color: #fff;
	background: #333;
}

.bb-video-story-content h3 {
	margin: 0;
	font-size: 12px;
	line-height: 1.15;
}

.bb-video-story-content p {
	margin: 2px 0 0 !important;
	font-size: 12px;
	opacity: 0.8;
}

.bb-video-stories-nav {
	position: absolute;
	top: 140px;
	appearance: none;
	border: 0;
	border-radius: 999px;
	width: 40px;
	height: 40px;
	cursor: pointer;
	font-size: 24px;
	line-height: 28px;
	padding: 0;
	background: #f2f2f2;
	z-index: 30;
}

.bb-video-stories-prev {
	left: 4px;
}

.bb-video-stories-next {
	right: 4px;
}

.bb-video-stories-empty {
	padding: 12px 14px;
	background: #f7f7f7;
	border-radius: 8px;
}

.bb-featured-video,
.bb-video-shortcode,
.bb-video-player {
	width: 100%;
	max-width: 100%;
}

video.bb-featured-video,
video.bb-video-shortcode,
.bb-video-player--native {
	height: auto;
	display: block;
	background: #000;
}

.bb-video-player--embed {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

.bb-video-player--embed iframe,
.bb-video-player--embed > blockquote,
.bb-video-player--embed > div:not(.bb-video-embed-start) {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	border: 0;
}

.bb-video-embed-start {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: #000;
	cursor: pointer;
}

.bb-video-embed-start img,
.bb-video-embed-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bb-video-embed-placeholder {
	background: linear-gradient(145deg, #252525, #050505);
}

.bb-video-embed-play {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.68);
	color: #fff;
	font-size: 24px;
	padding-left: 4px;
}

.bb-video-player-fallback {
	display: inline-block;
	padding: 0.7em 1em;
	background: #f2f2f2;
	text-decoration: none;
}

@media (max-width: 860px) {
	.bb-video-story-content p {
		display: none;
	}
}

@media (max-width: 640px) {
	.bb-video-stories-track {
		gap: 4px;
		padding: var(--space-lg, 8px);
	}

	.bb-video-stories-nav {
		display: none;
	}

	.bb-video-story-content {
		padding: 4px;
		height: 26px;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.bb-video-story-content h3 {
		font-size: 10px;
		line-height: 10px;
		font-weight: normal;
	}

	.shade.left,
	.shade.right {
		box-shadow: 0 0 4px 4px #fff;
	}
}

.bb-video-story-live-preview {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 120ms ease;
	pointer-events: none;
}

.bb-video-story-card.is-previewing .bb-video-story-live-preview {
	opacity: 1;
}

.bb-video-story-card.is-previewing .bb-video-story-play {
	opacity: 0;
}

.bb-video-player-fallback--poster {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	padding: 0;
	overflow: hidden;
	background: #000;
}

.bb-video-player-fallback img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bb-video-story-external-live-preview {
	background: #000;
}

.bb-video-story-external-live-preview iframe,
.bb-video-story-external-live-preview > div {
	position: absolute;
	top: 0;
	left: 50%;
	width: max(100%, 200px) !important;
	height: 100% !important;
	transform: translateX(-50%);
	border: 0;
	pointer-events: none;
}

.bb-video-story-card {
	position: relative;
}

/* Dreifach-Schalter der Video-Vorschau.
 * Die Modifier-Klassen sitzen direkt am Button und können getrennt justiert werden:
 * .bb-video-story-control--pause / --play / --replay
 */
.bb-video-story-control {
	display: none;
	touch-action: manipulation;
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 50;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.68);
	color: #fff;
	font-size: 18px;
	font-weight: 400;
	line-height: 1;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.bb-video-story-card.is-video-control-ready .bb-video-story-control {
	display: grid;
	place-items: center;
}

.bb-video-story-control-icon {
	display: block;
	line-height: 1;
	transform: translate(var(--bb-video-control-icon-x, 0), var(--bb-video-control-icon-y, 0));
}

/* Zustandsbezogene Klassen für eine unabhängige Feinpositionierung des Symbols. */
.bb-video-story-control--pause {
	--bb-video-control-icon-x: 0px;
	--bb-video-control-icon-y: 0px;
}

.bb-video-story-control--play {
	--bb-video-control-icon-x: 1px;
	--bb-video-control-icon-y: 0px;
}

.bb-video-story-control--replay {
	--bb-video-control-icon-x: 0px;
	--bb-video-control-icon-y: -1px;
}

.bb-video-story-control:hover,
.bb-video-story-control:focus-visible {
	background: rgba(0, 0, 0, 0.86);
}

.bb-video-story-control:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.bb-video-story-card.is-video-loading .bb-video-story-play {
	animation: bb-video-story-pulse 900ms ease-in-out infinite alternate;
}

@keyframes bb-video-story-pulse {
	from { opacity: 0.35; }
	to { opacity: 1; }
}
