/* Fabrikhalle Förderband 01 – Frontend Styles */

.ffb01-wrapper {
	width: 100%;
	position: relative;
}

.ffb01-stage {
	position: relative;
	width: 100%;
	height: 640px;
	overflow: hidden;
	border-radius: 6px;
	background: radial-gradient( circle at 50% 20%, #23262b 0%, #101215 70%, #08090a 100% );
	box-shadow: inset 0 0 80px rgba( 0, 0, 0, 0.6 ), 0 10px 30px rgba( 0, 0, 0, 0.4 );
	touch-action: none;
	cursor: grab;
}

.ffb01-stage:active {
	cursor: grabbing;
}

.ffb01-canvas {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
}

/* Loading */
.ffb01-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	color: #cfe8ff;
	font-family: 'Segoe UI', Arial, sans-serif;
	letter-spacing: 0.05em;
	background: rgba( 8, 9, 10, 0.85 );
	z-index: 5;
	transition: opacity 0.6s ease;
}

.ffb01-stage.ffb01-loaded .ffb01-loading {
	opacity: 0;
	pointer-events: none;
}

.ffb01-loading-gear,
.ffb01-editor-placeholder .ffb01-loading-gear {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	border: 6px solid rgba( 232, 163, 61, 0.25 );
	border-top-color: #e8a33d;
	animation: ffb01-spin 1.1s linear infinite;
}

@keyframes ffb01-spin {
	to {
		transform: rotate( 360deg );
	}
}

.ffb01-editor-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: #cfe8ff;
	font-family: 'Segoe UI', Arial, sans-serif;
	text-align: center;
	padding: 20px;
}

/* Gyroscope permission button (iOS) */
.ffb01-gyro-permission-btn {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX( -50% );
	z-index: 6;
	background: #e8a33d;
	color: #201705;
	border: none;
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 13px;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba( 0, 0, 0, 0.35 );
}

/* Scroll-Hinweis */
.ffb01-scroll-hint {
	position: absolute;
	top: 14px;
	left: 50%;
	transform: translateX( -50% );
	color: #cfe8ff;
	font-family: 'Segoe UI', Arial, sans-serif;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.55;
	z-index: 4;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

.ffb01-stage.ffb01-interacted .ffb01-scroll-hint {
	opacity: 0;
}

/* Lightbox / Scanner */
.ffb01-lightbox {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 4, 5, 6, 0 );
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.4s ease, background-color 0.4s ease;
	z-index: 10;
}

.ffb01-lightbox.ffb01-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	background: rgba( 4, 5, 6, 0.92 );
}

.ffb01-lightbox-case {
	position: relative;
	width: min( 78%, 600px );
	aspect-ratio: 4 / 3;
	background: #17181a;
	border: 6px solid #6b6f75;
	box-shadow: 0 0 0 2px #1c1c1e, 0 20px 60px rgba( 0, 0, 0, 0.6 );
	overflow: hidden;
}

.ffb01-lightbox-case.ffb01-case-round {
	border-radius: 50%;
}

.ffb01-lightbox-case.ffb01-case-hexagon {
	clip-path: polygon( 25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50% );
}

.ffb01-lightbox-image-wrap {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #000;
	overflow: hidden;
}

.ffb01-lightbox-image {
	max-width: 100%;
	max-height: 85%;
	object-fit: contain;
}

.ffb01-lightbox-caption {
	color: #cfe8ff;
	font-family: 'Segoe UI', Arial, sans-serif;
	font-size: 14px;
	margin: 8px 0 0;
	text-align: center;
	padding: 0 10px;
}

/* Scanner-Leiste: sweept einmal über das Bild, wenn die Lightbox öffnet */
.ffb01-lightbox-scanbar {
	position: absolute;
	left: 0;
	right: 0;
	top: -10%;
	height: 12%;
	background: linear-gradient( 180deg, rgba( 63, 169, 245, 0 ), rgba( 63, 169, 245, 0.85 ), rgba( 63, 169, 245, 0 ) );
	z-index: 5;
	opacity: 0;
	pointer-events: none;
}

.ffb01-lightbox.ffb01-open.ffb01-scan-mode .ffb01-lightbox-scanbar {
	animation: ffb01-scan 1.1s ease-in-out 1;
}

.ffb01-lightbox.ffb01-fade-mode .ffb01-lightbox-scanbar {
	display: none;
}

@keyframes ffb01-scan {
	0% {
		top: -10%;
		opacity: 0;
	}
	10% {
		opacity: 1;
	}
	90% {
		opacity: 1;
	}
	100% {
		top: 100%;
		opacity: 0;
	}
}

.ffb01-lightbox-close {
	position: absolute;
	top: -18px;
	right: -18px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: radial-gradient( circle at 35% 35%, #ff5c4d, #8a1f14 70% );
	color: #fff;
	border: 3px solid #2a0a06;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	z-index: 6;
	box-shadow: 0 4px 10px rgba( 0, 0, 0, 0.5 );
}

.ffb01-lightbox-close.ffb01-close-gear {
	background: radial-gradient( circle at 35% 35%, #d6d6d6, #3d3d3d 70% );
	color: #1a1a1a;
	border-radius: 0;
	clip-path: polygon( 50% 0%, 61% 10%, 80% 5%, 82% 25%, 100% 32%, 92% 50%, 100% 68%, 82% 75%, 80% 95%, 61% 90%, 50% 100%, 39% 90%, 20% 95%, 18% 75%, 0% 68%, 8% 50%, 0% 32%, 18% 25%, 20% 5%, 39% 10% );
}

.ffb01-lightbox-close.ffb01-close-simple {
	background: #444;
	border: none;
	color: #fff;
}

/* WebGL-Fallback */
.ffb01-fallback-preview {
	position: absolute;
	inset: 0;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 24px;
	text-align: center;
	background: radial-gradient( circle at 50% 20%, #23262b 0%, #101215 70%, #08090a 100% );
	z-index: 6;
}

.ffb01-stage.ffb01-webgl-unavailable .ffb01-fallback-preview {
	display: flex;
}

.ffb01-stage.ffb01-webgl-unavailable .ffb01-canvas,
.ffb01-stage.ffb01-webgl-unavailable .ffb01-loading,
.ffb01-stage.ffb01-webgl-unavailable .ffb01-scroll-hint {
	display: none;
}

.ffb01-fallback-svg {
	width: 150px;
	height: auto;
	opacity: 0.9;
}

.ffb01-fallback-text {
	color: #cfe8ff;
	font-family: 'Segoe UI', Arial, sans-serif;
	font-size: 14px;
	max-width: 360px;
	margin: 0;
}

/* Responsive */
@media ( max-width: 1024px ) {
	.ffb01-stage {
		height: 520px;
	}
}

@media ( max-width: 767px ) {
	.ffb01-stage {
		height: 420px;
	}

	.ffb01-lightbox-case {
		width: 92%;
	}

	.ffb01-lightbox-close {
		top: -14px;
		right: -8px;
		width: 34px;
		height: 34px;
	}

	.ffb01-scroll-hint {
		font-size: 10px;
	}
}
