/* ===================================================================
   3D Wealth Digital Toolbox - Tutorial / First-Time Demo System
   Reusable overlay hints with animated demonstrations
   =================================================================== */

/* ── Wrapper ─────────────────────────────────────────────────────── */
.tutorial-wrapper {
	display: contents; /* transparent in layout — children behave normally */
}

/* Above positioning: overlay floats above the target */
.tutorial-wrapper--above {
	display: block;
	position: relative;
}

/* ── Overlay container ───────────────────────────────────────────── */
.tutorial-overlay {
	position: absolute;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	z-index: 100;
	pointer-events: none; /* let clicks pass through to target below */
	animation: tutorialFadeIn 0.5s ease forwards;
}

.tutorial-wrapper--above .tutorial-overlay {
	bottom: calc(100% + 6px);
}

.tutorial-wrapper--below .tutorial-overlay {
	top: calc(100% + 6px);
}

/* Fade out on dismiss */
.tutorial-hiding {
	animation: tutorialFadeOut 0.4s ease forwards !important;
}

@keyframes tutorialFadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0);   }
}

@keyframes tutorialFadeOut {
	from { opacity: 1; transform: translateY(0);   }
	to   { opacity: 0; transform: translateY(-6px); }
}

/* ── Pill ────────────────────────────────────────────────────────── */
.tutorial-pill {
	pointer-events: all;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: rgba(26, 42, 76, 0.92);
	color: #fff;
	border-radius: 2rem;
	padding: 0.35rem 0.85rem 0.35rem 0.5rem;
	font-size: 0.8rem;
	font-weight: 500;
	box-shadow: 0 4px 16px rgba(0,0,0,0.25);
	white-space: nowrap;
	user-select: none;
}

.tutorial-icon {
	font-size: 1rem;
	opacity: 0.85;
}

.tutorial-text {
	letter-spacing: 0.01em;
}

/* ── Dismiss button ──────────────────────────────────────────────── */
.tutorial-dismiss {
	background: none;
	border: none;
	color: rgba(255,255,255,0.6);
	cursor: pointer;
	padding: 0 0 0 0.25rem;
	font-size: 1rem;
	line-height: 1;
	transition: color 0.2s;
}

.tutorial-dismiss:hover {
	color: #fff;
}

/* ── Animated sliding thumb (slider key) ─────────────────────────── */
.tutorial-demo-thumb {
	display: inline-block;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #4580AD;
	border: 2px solid #fff;
	box-shadow: 0 0 0 3px rgba(69, 128, 173, 0.4);
	flex-shrink: 0;
	animation: tutorialThumbSlide 1.6s ease-in-out infinite;
}

@keyframes tutorialThumbSlide {
	0%   { transform: translateX(-10px); opacity: 0.5; }
	40%  { transform: translateX(10px);  opacity: 1;   box-shadow: 0 0 0 5px rgba(69,128,173,0.3); }
	60%  { transform: translateX(10px);  opacity: 1;   }
	100% { transform: translateX(-10px); opacity: 0.5; }
}

/* Pulse ring around thumb */
.tutorial-demo-thumb::after {
	content: '';
	position: absolute;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid rgba(69, 128, 173, 0.5);
	animation: tutorialPulseRing 1.6s ease-in-out infinite;
}

@keyframes tutorialPulseRing {
	0%   { transform: scale(0.8); opacity: 0.8; }
	50%  { transform: scale(1.4); opacity: 0;   }
	100% { transform: scale(0.8); opacity: 0;   }
}

/* ── "Read This" attention badge ─────────────────────────────────── */
.tutorial-read-this {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	background: #C16611;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.2rem 0.65rem;
	border-radius: 1rem;
	letter-spacing: 0.03em;
	animation: tutorialReadThisPulse 2s ease-in-out infinite;
	vertical-align: middle;
	margin-left: 0.5rem;
}

@keyframes tutorialReadThisPulse {
	0%, 100% { box-shadow: 0 0 0 0   rgba(193, 102, 17, 0.6); }
	50%       { box-shadow: 0 0 0 8px rgba(193, 102, 17, 0);   }
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 576px) {
	.tutorial-pill {
		font-size: 0.72rem;
		padding: 0.3rem 0.65rem 0.3rem 0.4rem;
	}
}
