/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SMOUSE STUDIO — QUICK START GUIDE POPUP
   A lightbox-style modal that embeds a quick-start video. quickStart.js injects
   the markup and wires the "Quick Start Guide" button; this file styles it to
   match the site's dark / orange scheme (and the Installation Guide popup).
   Per-product behaviour/content is set in ProductSettingsConfig.js.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── overlay / dimmed backdrop (click to close) ───────────────────────────── */
.sm-qs {
	position: fixed;
	inset: 0;
	z-index: 10001;

	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5vmin;

	background: rgba(0, 0, 0, 0.55);
	-webkit-backdrop-filter: blur(5px) saturate(120%);
	backdrop-filter: blur(5px) saturate(120%);

	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}
.sm-qs.is-open {
	opacity: 1;
	visibility: visible;
}

/* ── the popup box ────────────────────────────────────────────────────────── */
.sm-qs__box {
	position: relative;
	width: 100%;
	max-width: 56rem;          /* overridden per-product via quickStart.modalSize */

	transform: translateY(0.75rem) scale(0.985);
	transition: transform 0.25s ease;
}
.sm-qs.is-open .sm-qs__box { transform: translateY(0) scale(1); }

/* ── top bar: "open in new tab" + close (X) ───────────────────────────────── */
.sm-qs__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.7rem;
}

.sm-qs__newtab {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-family: 'DM Mono', monospace;
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
	transition: color 0.2s ease;
}
.sm-qs__newtab:hover { color: var(--smouse-orange, #E35300); }
.sm-qs__newtab svg {
	width: 0.95rem;
	height: 0.95rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sm-qs__close {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.2rem;
	height: 2.2rem;

	background: #2a2a2a;
	border: 1px solid #575757;
	border-radius: 50%;
	color: #FAF2F0;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.sm-qs__close:hover {
	background: var(--smouse-orange, #E35300);
	border-color: var(--smouse-orange, #E35300);
}
.sm-qs__close svg {
	width: 44%;
	height: 44%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.25;
	stroke-linecap: round;
}

/* ── the video itself (responsive 16:9) ───────────────────────────────────── */
.sm-qs__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;

	background: #000;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.6);
}
.sm-qs__media iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	opacity: 1;
	transition: opacity 0.3s ease;
}
/* While loading: hide the (blank) iframe and show the spinner. */
.sm-qs__media.is-loading iframe { opacity: 0; }

.sm-qs__spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 2.75rem;
	height: 2.75rem;
	margin: -1.375rem 0 0 -1.375rem;

	border: 3px solid rgba(255, 255, 255, 0.18);
	border-top-color: var(--smouse-orange, #E35300);
	border-radius: 50%;
	animation: sm-qs-spin 0.8s linear infinite;

	opacity: 0;
	transition: opacity 0.2s ease;
}
.sm-qs__media.is-loading .sm-qs__spinner { opacity: 1; }

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

/* Fallback for browsers without aspect-ratio support. */
@supports not (aspect-ratio: 1 / 1) {
	.sm-qs__media { height: 0; padding-bottom: 56.25%; }
}

@media (max-width: 600px) {
	.sm-qs__newtab { font-size: 0.66rem; }
}
