/**
 * First-visit welcome popup. Uses the theme's own global --mt-* tokens (defined on :root in the
 * theme's main.css) so it automatically matches whatever theme/light-dark state is active — no
 * separate palette to keep in sync.
 */

body.mt-welcome-lock-scroll {
	overflow: hidden;
}

#mt-welcome-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

#mt-welcome-popup[hidden] {
	display: none;
}

.mt-welcome__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 16, 24, 0.45);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.mt-welcome__card {
	position: relative;
	width: 100%;
	max-width: 26rem;
	max-height: 88vh;
	overflow-y: auto;
	background: var(--mt-panel, #fff);
	color: var(--mt-ink, #0a1018);
	border: 1px solid var(--mt-border, #d7dee7);
	border-radius: 1.25rem;
	box-shadow: 0 24px 60px rgba(10, 16, 24, 0.28), 0 4px 14px rgba(10, 16, 24, 0.12);
	padding: 2.25rem 1.75rem 1.75rem;
	text-align: center;
	transform: translateY(8px) scale(0.98);
	opacity: 0;
	transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}

#mt-welcome-popup.is-open .mt-welcome__card {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.mt-welcome__close {
	position: absolute;
	top: 0.85rem;
	inset-inline-end: 0.85rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 999px;
	border: 1px solid var(--mt-border, #d7dee7);
	background: var(--mt-panel-2, #f7fafc);
	color: var(--mt-text-muted, #3d4f63);
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.mt-welcome__close:hover,
.mt-welcome__close:focus-visible {
	color: var(--mt-accent, #0e7490);
	border-color: var(--mt-accent, #0e7490);
}

.mt-welcome__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	margin-bottom: 1.1rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--mt-accent, #0e7490) 14%, transparent);
	color: var(--mt-accent, #0e7490);
}

.mt-welcome__title {
	margin: 0 0 0.75rem;
	color: var(--mt-ink, #0a1018);
	font-size: 1.28rem;
	font-weight: 800;
	line-height: 1.5;
	text-wrap: balance;
}

.mt-welcome__body {
	margin: 0 0 1.35rem;
	color: var(--mt-text-muted, #3d4f63);
	font-size: 0.92rem;
	line-height: 1.85;
}

.mt-welcome__ack {
	min-width: 9rem;
}

@media (prefers-reduced-motion: reduce) {
	.mt-welcome__card {
		transition: opacity 0.12s linear;
		transform: none;
	}
}

@media (max-width: 420px) {
	.mt-welcome__card {
		padding: 1.85rem 1.25rem 1.4rem;
	}
}
