/* Layout/scale/fallback overrides for the isolated original Sequence.js stage.
   Core animation rules (translateZ, perspective rotation, .fast/.slow/.delay*)
   stay untouched in sequencejs-qubico.css. */

html, body {
	margin: 0;
	height: 100%;
	background: #54c5d8;
	overflow: hidden;
}

#sequence-theme {
	height: 100%;
	background: #54c5d8;
}

#sequence { height: 100%; }

/* Bootstrap helper missing in the standalone iframe:
   layer images must follow their wrapper, not intrinsic size. */
.img-responsive {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Original places the view on the right 50% of a full-width banner;
   shrink/center it so all three compositions fit the panel with cyan margin. */
#sequence.perspective .perspective-view {
	right: auto;
	left: 10%;
	width: 70%;
	top: 48%;
	-webkit-transform: translateY(-50%) rotateX(60deg) rotateZ(35deg) scale(.54);
	transform: translateY(-50%) rotateX(60deg) rotateZ(35deg) scale(.54);
}

/* Controls: three buttons in a horizontal row at the bottom */
#sequence .controls {
	position: absolute;
	top: auto;
	bottom: 24px !important;
	left: 0;
	right: 0;
	width: 100%;
	height: 36px;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	transform: translateY(-8px);
	overflow: visible;
	z-index: 10001;
}
#sequence .controls li {
	position: static;
	top: auto;
	left: auto;
	right: auto;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	font-size: inherit;
	line-height: normal;
	opacity: 1;
	display: block;
}
#sequence .controls button {
	width: 36px;
	height: 36px;
	border: 1px solid rgba(255,255,255,.7);
	border-radius: 50%;
	background: rgba(255,255,255,.92);
	color: #1f7f92;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
#sequence .controls button:hover { background: #a5e2ec; }
#sequence .controls button:focus-visible { outline: 3px solid #1f7f92; outline-offset: 2px; }
#sequence .sequence-pause.paused button { background: #1f7f92; color: #fff; }

/* No-JS / engine-failure fallback: first scene fully built, controls hidden */
html.no-js #sequence,
html.engine-failed #sequence { opacity: 1; }
html.no-js #sequence .controls,
html.engine-failed #sequence .controls { display: none; }
html.no-js #sequence .sequence-canvas > li:first-child > *,
html.engine-failed #sequence .sequence-canvas > li:first-child > * {
	opacity: 1;
}
html.no-js #sequence .sequence-canvas > li:first-child > * > *,
html.engine-failed #sequence .sequence-canvas > li:first-child > * > * {
	opacity: 1;
}
html.no-js #sequence .sequence-canvas > li:first-child .in-from-top-z,
html.engine-failed #sequence .sequence-canvas > li:first-child .in-from-top-z {
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	#sequence .sequence-canvas * {
		transition: none !important;
		animation: none !important;
	}
}
