/* tooltipTour.css — First-login guided tour overlay */

/* ─── Backdrop ─── */
.tour-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(20, 25, 30, 0.45);
	z-index: 9999;
	display: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}
.tour-backdrop.is-visible {
	display: block;
	opacity: 1;
}

/* ─── Spotlight cutout — darkens everything except the target ─── */
.tour-spotlight {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: none;
	pointer-events: none;
}
.tour-backdrop.is-visible .tour-spotlight {
	display: block;
}

/* ─── Tooltip card ─── */
.tour-tooltip {
	position: fixed;
	z-index: 10001;
	width: 360px;
	max-width: calc(100vw - 32px);
	background: var(--white);
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.12);
	padding: 0;
	overflow: hidden;
	display: none;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}
.tour-tooltip.is-visible {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

/* Header strip */
.tour-tooltip-header {
	background: var(--charcoal);
	color: var(--white);
	padding: 14px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.tour-tooltip-step {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	opacity: 0.8;
}
.tour-tooltip-close {
	background: none;
	border: none;
	color: var(--white);
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.2s ease;
	padding: 4px;
	line-height: 1;
}
.tour-tooltip-close:hover,
.tour-tooltip-close:focus {
	opacity: 1;
}

/* Body */
.tour-tooltip-body {
	padding: 20px;
}
.tour-tooltip-title {
	font-family: 'Playfair Display', serif;
	font-size: 18px;
	font-weight: 700;
	color: #1a1d20;
	margin: 0 0 8px 0;
	line-height: 1.3;
}
.tour-tooltip-desc {
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #5a5e63;
	margin: 0;
}

/* Footer with nav buttons */
.tour-tooltip-footer {
	padding: 12px 20px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.tour-tooltip-footer .tour-btn {
	font-family: 'DM Sans', sans-serif;
	font-size: 13px;
	font-weight: 500;
	padding: 8px 16px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.tour-btn-skip {
	background: none;
	color: #7c8085;
}
.tour-btn-skip:hover,
.tour-btn-skip:focus {
	color: var(--charcoal);
	text-decoration: underline;
}
.tour-btn-prev {
	background: #f0f1f2;
	color: var(--charcoal);
}
.tour-btn-prev:hover,
.tour-btn-prev:focus {
	background: #e2e3e5;
}
.tour-btn-next {
	background: #0d6efd;
	color: var(--white);
	margin-left: auto;
}
.tour-btn-next:hover,
.tour-btn-next:focus {
	background: #0b5ed7;
}
.tour-btn-done {
	background: #198754;
	color: var(--white);
	margin-left: auto;
}
.tour-btn-done:hover,
.tour-btn-done:focus {
	background: #157347;
}

/* Global "don't show me these" opt-out — small, deliberately unobtrusive
   so it doesn't compete with Next/Skip, but always reachable so a user can
   back out of tours entirely at any step, not just the first. */
.tour-tooltip-optout {
	padding: 0 20px 14px;
	text-align: center;
}
.tour-btn-optout {
	background: none;
	border: none;
	font-family: 'DM Sans', sans-serif;
	font-size: 12px;
	color: #a8abaf;
	cursor: pointer;
	padding: 2px;
}
.tour-btn-optout:hover,
.tour-btn-optout:focus {
	color: #7c8085;
	text-decoration: underline;
}

/* ─── Highlight ring on target element ─── */
.tour-highlight {
	outline: 3px solid #0d6efd !important;
	outline-offset: 4px;
	border-radius: 4px;
	box-shadow: 0 0 0 8px rgba(13, 110, 253, 0.25);
	position: relative;
	z-index: 10002;
}

/* ─── Pulse animation on the target ─── */
@keyframes tourPulse {
	0%, 100% { box-shadow: 0 0 0 8px rgba(13, 110, 253, 0.25); }
	50% { box-shadow: 0 0 0 14px rgba(13, 110, 253, 0.12); }
}
.tour-highlight-pulse {
	animation: tourPulse 2s ease-in-out infinite;
}

/* ─── Arrow for the tooltip card ─── */
.tour-tooltip::after {
	content: '';
	position: absolute;
	width: 0;
	height: 0;
	border: 10px solid transparent;
}
.tour-tooltip.arrow-top::after {
	bottom: -20px;
	left: 28px;
	border-top-color: var(--white);
	border-bottom: 0;
}
.tour-tooltip.arrow-bottom::after {
	top: -20px;
	left: 28px;
	border-bottom-color: var(--white);
	border-top: 0;
}
.tour-tooltip.arrow-left::after {
	right: -20px;
	top: 24px;
	border-left-color: var(--white);
	border-right: 0;
}
.tour-tooltip.arrow-right::after {
	left: -20px;
	top: 24px;
	border-right-color: var(--white);
	border-left: 0;
}

/* ─── Progress dots ─── */
.tour-progress {
	display: flex;
	gap: 6px;
	justify-content: center;
	padding: 0 20px 4px;
}
.tour-progress-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d0d2d4;
	transition: background-color 0.2s ease;
}
.tour-progress-dot.is-active {
	background: #0d6efd;
}
.tour-progress-dot.is-done {
	background: #198754;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
	.tour-backdrop,
	.tour-tooltip,
	.tour-highlight {
		transition: none !important;
		animation: none !important;
	}
}

/* ─── Responsive ─── */
@media (max-width: 576px) {
	.tour-tooltip {
		width: calc(100vw - 24px);
	}
	/* Arrow-pointing tooltips are positioned in px by JS and need to be
	   pinned to the viewport edges here. The centered "welcome" tooltip
	   (.tour-tooltip-center) already centers itself correctly at any width
	   via left:50% + transform: translate(-50%,-50%) set by JS — forcing
	   left/right here without touching that transform would shift it off
	   screen, since the translateX(-50%) would then apply against the
	   near-full-viewport width instead of centering it. */
	.tour-tooltip:not(.tour-tooltip-center) {
		left: 12px !important;
		right: 12px !important;
	}
	.tour-tooltip-title {
		font-size: 16px;
	}
}
