/**
 * Guided tour: spotlight cut-out, step card and the welcome dialog.
 *
 * Everything is positioned inside the configurator host, so the tour is
 * contained by the editor and never paints over the surrounding page.
 */

.vtm-tour,
.vtm-tour-welcome {
	--tour-ink: var(--vtm3d-text, var(--mg3d-text, #171c1f));
	--tour-muted: var(--vtm3d-muted, var(--mg3d-muted, #434653));
	--tour-primary: var(--vtm3d-primary, var(--mg3d-primary, #00327d));
	--tour-accent: var(--vtm3d-accent, var(--mg3d-accent, #006a6a));
	--tour-surface: #ffffff;
	--tour-border: var(--vtm3d-outline-soft, var(--mg3d-outline-soft, #c3c6d5));
}

/* ------------------------------------------------------------------ */
/* Spotlight                                                           */
/* ------------------------------------------------------------------ */

.vtm-tour {
	display: none;
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 1200;
}

.vtm-tour.is-on {
	display: block;
}

/* Four shades around the highlighted control rather than one sheet over the
   top of it, so the control underneath stays live and clickable. */
.vtm-tour-shade {
	background: rgba(9, 20, 40, 0.55);
	pointer-events: auto;
	position: absolute;
	transition: opacity 0.15s ease;
}

.vtm-tour-ring {
	border: 2px solid var(--tour-accent);
	border-radius: 8px;
	box-shadow: 0 0 0 3px rgba(0, 106, 106, 0.28);
	pointer-events: none;
	position: absolute;
	transition: top 0.22s ease, left 0.22s ease, width 0.22s ease, height 0.22s ease;
}

/* ------------------------------------------------------------------ */
/* Step card                                                           */
/* ------------------------------------------------------------------ */

.vtm-tour-card {
	background: var(--tour-surface);
	border: 1px solid var(--tour-border);
	border-radius: 10px;
	box-shadow: 0 20px 48px rgba(9, 20, 40, 0.32);
	padding: 14px 16px 12px;
	pointer-events: auto;
	position: absolute;
	transition: top 0.22s ease, left 0.22s ease;
}

.vtm-tour-progress {
	color: var(--tour-muted);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	margin: 0 0 6px;
	text-transform: uppercase;
}

.vtm-tour-kicker {
	color: var(--tour-accent);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.14em;
	margin: 0 0 8px;
}

.vtm-tour-title {
	color: var(--tour-ink);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 7px;
}

.vtm-tour-body {
	color: var(--tour-muted);
	font-size: 13px;
	line-height: 1.55;
	margin: 0 0 12px;
}

.vtm-tour-bar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.vtm-tour-spacer {
	flex: 1 1 auto;
}

.vtm-tour-btn {
	background: var(--tour-surface);
	border: 1px solid var(--tour-border);
	border-radius: 6px;
	color: var(--tour-ink);
	cursor: pointer;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	padding: 7px 12px;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vtm-tour-btn:hover:not(:disabled) {
	border-color: var(--tour-primary);
	color: var(--tour-primary);
}

.vtm-tour-btn:disabled {
	cursor: default;
	opacity: 0.4;
}

.vtm-tour-btn:focus-visible {
	outline: 2px solid var(--tour-accent);
	outline-offset: 2px;
}

.vtm-tour-next {
	background: var(--tour-primary);
	border-color: var(--tour-primary);
	color: #ffffff;
}

.vtm-tour-next:hover:not(:disabled) {
	background: #002a68;
	border-color: #002a68;
	color: #ffffff;
}

.vtm-tour-skip {
	color: var(--tour-muted);
	font-weight: 500;
}

/* ------------------------------------------------------------------ */
/* Welcome dialog                                                      */
/* ------------------------------------------------------------------ */

.vtm-tour-welcome {
	align-items: center;
	background: rgba(9, 20, 40, 0.58);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 20px;
	position: absolute;
	z-index: 1300;
}

.vtm-tour-welcome-box {
	background: var(--tour-surface);
	border-radius: 12px;
	box-shadow: 0 26px 60px rgba(9, 20, 40, 0.38);
	max-width: 460px;
	padding: 22px 24px 18px;
	width: 100%;
}

.vtm-tour-welcome-box .vtm-tour-title {
	font-size: 19px;
}

.vtm-tour-welcome-box .vtm-tour-body {
	font-size: 13.5px;
	margin-bottom: 16px;
}

/* ------------------------------------------------------------------ */
/* Toast                                                               */
/* ------------------------------------------------------------------ */

.vtm-tour-toast {
	background: rgba(0, 50, 125, 0.94);
	border-radius: 8px;
	bottom: 18px;
	color: #ffffff;
	font-size: 12.5px;
	left: 50%;
	margin: 0;
	padding: 10px 15px;
	position: absolute;
	transform: translateX(-50%);
	transition: opacity 0.8s ease;
	z-index: 1400;
}

.vtm-tour-toast.is-fading {
	opacity: 0;
}

/* Toolbar Guide button sits with the other outline actions. */
.vtm-tour-help::before {
	content: "?";
	display: inline-block;
	font-weight: 800;
	margin-right: 6px;
	opacity: 0.75;
}

@media (max-width: 720px) {
	.vtm-tour-card {
		padding: 12px 13px 10px;
	}

	.vtm-tour-title {
		font-size: 15px;
	}

	.vtm-tour-body {
		font-size: 12.5px;
	}

	.vtm-tour-bar .vtm-tour-btn {
		flex: 1 1 auto;
		text-align: center;
	}

	.vtm-tour-spacer {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vtm-tour-ring,
	.vtm-tour-card,
	.vtm-tour-shade,
	.vtm-tour-toast {
		transition: none;
	}
}

@media print {
	.vtm-tour,
	.vtm-tour-welcome,
	.vtm-tour-toast {
		display: none !important;
	}
}

/* ------------------------------------------------------------------ */
/* Opt-in start button + first-visit nudge                             */
/* ------------------------------------------------------------------ */

/*
 * The tour no longer launches itself, so it needs somewhere to live that a
 * newcomer will actually look. The description strip is that place, and the
 * button takes its own row across the strip's grid so it cannot disturb the
 * columns the strip was laid out with.
 */
.vtm-tour-start {
	background: var(--vtm3d-primary, var(--mg3d-primary, #00327d));
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 12.5px;
	font-weight: 600;
	grid-column: 1 / -1;
	justify-self: start;
	line-height: 1;
	padding: 8px 16px;
	position: relative;
	transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.vtm-tour-start:hover,
.vtm-tour-start:focus-visible {
	background: var(--vtm3d-accent, var(--mg3d-accent, #006a6a));
	transform: translateY(-1px);
}

/* A slow, quiet pulse on a first visit — enough to catch the eye, not enough
   to nag. It stops the moment the invitation is answered either way. */
.vtm-tour-start.is-inviting {
	animation: vtm-tour-pulse 2.4s ease-in-out infinite;
}

@keyframes vtm-tour-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(0, 106, 106, 0.55); }
	50% { box-shadow: 0 0 0 9px rgba(0, 106, 106, 0); }
}

.vtm-tour-invite {
	background: #fff;
	border: 1px solid var(--vtm3d-border, var(--mg3d-border, #c3c6d5));
	border-radius: 10px;
	box-shadow: 0 12px 30px rgba(13, 20, 32, 0.16);
	left: 0;
	margin-top: 10px;
	max-width: 320px;
	padding: 14px 16px;
	position: absolute;
	top: 100%;
	z-index: 40;
}

/* The little arrow tying the card to the button it is about. */
.vtm-tour-invite::before {
	background: #fff;
	border-left: 1px solid var(--vtm3d-border, var(--mg3d-border, #c3c6d5));
	border-top: 1px solid var(--vtm3d-border, var(--mg3d-border, #c3c6d5));
	content: "";
	height: 10px;
	left: 26px;
	position: absolute;
	top: -6px;
	transform: rotate(45deg);
	width: 10px;
}

.vtm-tour-invite-title {
	color: var(--vtm3d-text, var(--mg3d-text, #171c1f));
	display: block;
	font-size: 13.5px;
	margin-bottom: 4px;
}

.vtm-tour-invite-body {
	color: var(--vtm3d-muted, var(--mg3d-muted, #434653));
	font-size: 12.5px;
	line-height: 1.45;
	margin: 0 0 10px;
}

.vtm-tour-invite-bar {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

@media (max-width: 720px) {
	.vtm-tour-invite {
		max-width: none;
		right: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vtm-tour-start,
	.vtm-tour-start.is-inviting {
		animation: none;
		transition: none;
	}
}

@media print {
	.vtm-tour-start,
	.vtm-tour-invite {
		display: none !important;
	}
}
