/**
 * GAMIVIA Onboarding: Checkliste „Erste Schritte" + Tour-Engine.
 * Style Guide: UI neutral, Lila nur für den einen primären Button, Blau für Links.
 */

.gt-ob {
	--gt-ob-accent: #6B35E9;
	--gt-ob-accent-hover: #8B5CF6;
	--gt-ob-link: #0969DA;
	--gt-ob-dark: #1C1139;
	--gt-ob-muted: #8E8BA3;
	--gt-ob-border: #E1E0E6;
	--gt-ob-subtle: #F0EEF5;
	--gt-ob-success: #22C55E;
	font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--gt-ob-dark);
	box-sizing: border-box;
}

.gt-ob *,
.gt-ob *::before,
.gt-ob *::after {
	box-sizing: border-box;
}

.gt-ob[hidden],
.gt-ob [hidden] {
	display: none !important;
}

.gt-ob-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ── Buttons und Links ── */

.gt-ob .gt-ob-btn,
.gt-ob .gt-ob-btn-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0 16px;
	border-radius: 8px;
	border: 1px solid transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color .15s ease, border-color .15s ease;
}

.gt-ob .gt-ob-btn {
	background: var(--gt-ob-accent);
	color: #fff;
}

.gt-ob .gt-ob-btn:hover,
.gt-ob .gt-ob-btn:focus-visible {
	background: var(--gt-ob-accent-hover);
	color: #fff;
}

.gt-ob .gt-ob-btn-ghost {
	background: #fff;
	border-color: var(--gt-ob-border);
	color: var(--gt-ob-dark);
}

.gt-ob .gt-ob-btn-ghost:hover,
.gt-ob .gt-ob-btn-ghost:focus-visible {
	background: var(--gt-ob-subtle);
}

.gt-ob .gt-ob-link {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 13px;
	color: var(--gt-ob-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.gt-ob .gt-ob-link:hover,
.gt-ob .gt-ob-link:focus-visible {
	color: var(--gt-ob-dark);
}

.gt-ob .gt-ob-link:disabled {
	cursor: default;
	opacity: .6;
}

.gt-ob .gt-ob-arrow-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--gt-ob-link);
	text-decoration: none;
	white-space: nowrap;
	transition: gap .15s ease;
}

.gt-ob .gt-ob-arrow-link:hover,
.gt-ob .gt-ob-arrow-link:focus-visible {
	gap: 10px;
	color: var(--gt-ob-link);
}

.gt-ob button:focus-visible,
.gt-ob a:focus-visible {
	outline: 2px solid var(--gt-ob-accent);
	outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════
 * Checkliste
 * ════════════════════════════════════════════════════════════ */

.gt-ob-checklist {
	position: relative;
	padding: 12px 18px;
	background: #fff;
	border: 1px solid var(--gt-ob-border);
	border-radius: 12px;
}

/* Kopf in einer Zeile: Titel (Klapp-Button), Haus, Fortschritt, Ausblenden. */
.gt-ob-cl-head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 14px;
}

.gt-ob .gt-ob-cl-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--gt-ob-dark);
}

.gt-ob .gt-ob-cl-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 4px 0;
	border: 0;
	background: none;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
}

.gt-ob .gt-ob-cl-toggle:hover,
.gt-ob .gt-ob-cl-toggle:focus-visible {
	background: none;
	color: var(--gt-ob-dark);
}

.gt-ob-cl-chevron {
	flex: none;
	color: var(--gt-ob-muted);
	transition: transform .15s ease;
}

.gt-ob-checklist.is-collapsed .gt-ob-cl-chevron {
	transform: rotate(-90deg);
}

.gt-ob .gt-ob-cl-sub {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--gt-ob-muted);
}

.gt-ob-cl-meter {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.gt-ob-progress {
	width: 110px;
	height: 6px;
	background: var(--gt-ob-subtle);
	border-radius: 999px;
	overflow: hidden;
}

/* Eingeklappt: Liste weg, dafür eine Zeile mit dem nächsten Schritt. */
.gt-ob-cl-next {
	display: none;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--gt-ob-subtle);
	font-size: 14px;
	line-height: 1.5;
	color: var(--gt-ob-muted);
}

.gt-ob-cl-next b {
	font-weight: 600;
	color: var(--gt-ob-dark);
}

.gt-ob-checklist.is-collapsed .gt-ob-cl-next {
	display: flex;
}

.gt-ob-checklist.is-collapsed .gt-ob-steps {
	display: none;
}

.gt-ob .gt-ob-step > .gt-ob-btn,
.gt-ob .gt-ob-btn.gt-ob-btn-sm {
	min-height: 32px;
	padding: 0 12px;
	font-size: 13px;
}

.gt-ob-progress-bar {
	display: block;
	height: 100%;
	background: var(--gt-ob-success);
	border-radius: 999px;
	transition: width .3s ease;
}

.gt-ob .gt-ob-progress-label {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--gt-ob-muted);
	white-space: nowrap;
}

.gt-ob .gt-ob-steps {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.gt-ob .gt-ob-step {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 7px 0;
	border-top: 1px solid var(--gt-ob-subtle);
}

.gt-ob-step-mark {
	flex: 0 0 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--gt-ob-border);
	border-radius: 50%;
	color: #fff;
}

.gt-ob-step.is-done .gt-ob-step-mark {
	background: var(--gt-ob-success);
	border-color: var(--gt-ob-success);
}

.gt-ob-step-body {
	flex: 1 1 auto;
	min-width: 0;
}

.gt-ob .gt-ob-step-title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--gt-ob-dark);
}

.gt-ob-step.is-done .gt-ob-step-title {
	font-weight: 500;
	color: var(--gt-ob-muted);
}

.gt-ob .gt-ob-step-text {
	margin: 1px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--gt-ob-muted);
}

.gt-ob-tag {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--gt-ob-subtle);
	font-size: 12px;
	font-weight: 500;
	color: var(--gt-ob-muted);
	vertical-align: 1px;
}

.gt-ob-cl-restore {
	text-align: right;
}

@media (max-width: 640px) {
	.gt-ob-checklist {
		padding: 12px 14px;
	}

	.gt-ob-cl-meter {
		order: 3;
		width: 100%;
		margin-left: 0;
	}

	.gt-ob-cl-meter .gt-ob-progress {
		flex: 1;
		width: auto;
	}

	.gt-ob-cl-dismiss {
		margin-left: auto;
	}

	.gt-ob .gt-ob-step {
		flex-wrap: wrap;
	}

	.gt-ob .gt-ob-step > .gt-ob-btn,
	.gt-ob .gt-ob-step > .gt-ob-arrow-link {
		margin-left: 28px;
	}
}

/* ══════════════════════════════════════════════════════════════
 * Hilfe-Button, Menü, Startkarte
 * ════════════════════════════════════════════════════════════ */

.gt-ob-help {
	position: fixed;
	right: var(--gt-ob-help-right, 20px);
	bottom: var(--gt-ob-help-bottom, 20px);
	z-index: 99990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}

.gt-ob .gt-ob-help-btn {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--gt-ob-dark);
	color: #fff;
	font: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(28, 17, 57, .22);
}

.gt-ob .gt-ob-help-btn:hover {
	background: #2b1d55;
}

.gt-ob-help-menu,
.gt-ob-prompt {
	width: min(300px, calc(100vw - 32px));
	padding: 14px;
	background: #fff;
	border: 1px solid var(--gt-ob-border);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(28, 17, 57, .16);
}

.gt-ob .gt-ob-help-title {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--gt-ob-muted);
}

.gt-ob .gt-ob-help-item {
	display: flex;
	width: 100%;
	padding: 9px 10px;
	border: 0;
	border-radius: 8px;
	background: none;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	text-align: left;
	color: var(--gt-ob-dark);
	cursor: pointer;
}

.gt-ob .gt-ob-help-item:hover,
.gt-ob .gt-ob-help-item:focus-visible {
	background: var(--gt-ob-subtle);
}

.gt-ob .gt-ob-help-item.gt-ob-arrow-link {
	color: var(--gt-ob-link);
}

.gt-ob-prompt {
	position: fixed;
	right: var(--gt-ob-help-right, 20px);
	bottom: calc(var(--gt-ob-help-bottom, 20px) + 56px);
	z-index: 99991;
}

.gt-ob .gt-ob-prompt-title {
	display: block;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
}

.gt-ob .gt-ob-prompt-text {
	margin: 2px 0 12px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--gt-ob-muted);
}

.gt-ob-prompt-actions {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
}

/* ══════════════════════════════════════════════════════════════
 * Tour: Sperrfläche, Spotlight, Karte
 * (über den Modals der Haus-Widgets, z-index 100000)
 * ════════════════════════════════════════════════════════════ */

.gt-ob-blocker {
	position: fixed;
	inset: 0;
	z-index: 100100;
	background: transparent;
}

.gt-ob-blocker.is-dim {
	background: rgba(28, 17, 57, .6);
}

.gt-ob-hole {
	position: fixed;
	z-index: 100101;
	border-radius: 10px;
	box-shadow: 0 0 0 9999px rgba(28, 17, 57, .6);
	pointer-events: none;
	transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease;
}

.gt-ob-tip {
	position: fixed;
	z-index: 100102;
	width: min(340px, calc(100vw - 16px));
	padding: 16px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(28, 17, 57, .28);
}

.gt-ob-tip.is-center {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.gt-ob-tip.is-sheet {
	left: 0;
	right: 0;
	bottom: 0;
	top: auto;
	width: auto;
	border-radius: 16px 16px 0 0;
	padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.gt-ob-tip.is-sheet.is-top {
	top: 0;
	bottom: auto;
	border-radius: 0 0 16px 16px;
	padding-bottom: 16px;
	padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

.gt-ob .gt-ob-tip-count {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--gt-ob-muted);
}

.gt-ob .gt-ob-tip-title {
	display: block;
	margin-top: 2px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
}

.gt-ob .gt-ob-tip-text {
	margin: 6px 0 14px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--gt-ob-dark);
}

.gt-ob-tip-foot {
	display: flex;
	align-items: center;
	gap: 8px;
}

.gt-ob .gt-ob-tip-skip {
	margin-right: auto;
}

@media (prefers-reduced-motion: reduce) {
	.gt-ob-hole,
	.gt-ob-progress-bar,
	.gt-ob .gt-ob-arrow-link {
		transition: none;
	}
}

@media print {
	.gt-ob-help,
	.gt-ob-prompt,
	.gt-ob-blocker,
	.gt-ob-hole,
	.gt-ob-tip {
		display: none !important;
	}
}
