/* Helpful - A lightweight, accessible product tour component */
/* https://github.com/davemart-in/helpful */

:root {
	/* Default color variables - customize these to match your design system */
	--tour-white: #ffffff;
	--tour-grey-1: #f3f4f6;
	--tour-grey-2: #e5e7eb;
	--tour-grey-3: #9ca3af;
	--tour-grey-4: #6b7280;
	--tour-grey-5: #4b5563;
	--tour-grey-6: #374151;
}

/* Tour Modal */
.tour-modal {
	background: linear-gradient(135deg, var(--tour-white) 0%, var(--tour-grey-1) 100%);
	border: 2px solid var(--tour-grey-2);
	border-radius: 3px;
	bottom: 24px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	left: 24px;
	opacity: 0;
	position: fixed;
	transform: translateY(40px) scale(0.85) rotateX(10deg);
	transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
	visibility: hidden;
	width: 300px;
	z-index: 4000;
}

.tour-modal.show {
	opacity: 1;
	transform: translateY(0) scale(1) rotateX(0deg);
	visibility: visible;
}

.tour-header {
	color: var(--tour-grey-3);
	font-size: 12px;
	font-style: italic;
	font-weight: 400;
	position: relative;
	top: -2px;
}

.tour-dismiss {
	position: absolute;
	right: 8px;
	top: 8px;
	z-index: 4001;
	transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-dismiss:hover {
	transform: scale(1.1);
}

.tour-content {
	align-items: center;
	display: flex;
	flex-direction: row;
	gap: 12px;
	overflow: hidden;
	padding: 10px 40px 10px 10px;
	position: relative;
}

.tour-body {
	flex: 1;
	position: relative;
	text-align: left;
}

.tour-title {
	display: none;
}

.tour-description {
	color: var(--tour-grey-5);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
	margin: 0;
}

.tour-description .button-highlight {
	background: var(--tour-grey-2);
	border: 1px solid var(--tour-grey-3);
	border-radius: 3px;
	color: var(--tour-grey-5);
	font-weight: 500;
	padding: 1px 4px;
}

.tour-footer {
	display: none;
}

.tour-footer-left {
	display: none;
}

.tour-footer-right {
	display: none;
}

/* Tour step transition animations */
.tour-step-transition {
	opacity: 0;
	transform: translateX(20px) scale(0.98);
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tour-step-transition.active {
	opacity: 1;
	transform: translateX(0) scale(1);
}

/* Tour Overlay */
.tour-overlay {
	bottom: 0;
	left: 0;
	opacity: 0;
	pointer-events: none;
	position: fixed;
	right: 0;
	top: 0;
	transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	visibility: hidden;
	z-index: 3500;
}

.tour-overlay.show {
	opacity: 1;
	pointer-events: none;
	visibility: visible;
}

.tour-pointer {
	animation: tour-pointer-pulse 4s ease-in-out infinite;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
	position: absolute;
	transform: translate(-50%, -50%);
	z-index: 3600;
	will-change: transform, opacity;
}

.tour-pointer svg,
.tour-pointer img {
	height: 32px;
	width: 32px;
}

.tour-pointer.enlarged {
	animation: tour-pointer-enlarged 4s ease-in-out infinite;
}

@keyframes tour-pointer-pulse {
	0%, 100% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}
	
	50% {
		opacity: 0.85;
		transform: translate(-50%, -50%) scale(1.08);
	}
}

@keyframes tour-pointer-enlarged {
	0%, 100% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1.3);
	}
	
	50% {
		opacity: 0.9;
		transform: translate(-50%, -50%) scale(1.4);
	}
}

/* Pointer click animation */
.tour-pointer.clicking {
	animation: tour-pointer-click 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes tour-pointer-click {
	0% {
		transform: translate(-50%, -50%) scale(1);
	}
	
	15% {
		transform: translate(-50%, -50%) scale(0.9);
	}
	
	30% {
		transform: translate(-50%, -50%) scale(1.4);
	}
	
	50% {
		transform: translate(-50%, -50%) scale(1.1);
	}
	
	70% {
		transform: translate(-50%, -50%) scale(1.25);
	}
	
	85% {
		transform: translate(-50%, -50%) scale(0.95);
	}
	
	100% {
		transform: translate(-50%, -50%) scale(1);
	}
}

/* Pointer movement animation */
.tour-pointer.moving {
	transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Clickable element indication */
.tour-clickable {
	cursor: pointer !important;
	position: relative;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-clickable::after {
	border: 2px dashed var(--tour-grey-3);
	border-radius: 3px;
	bottom: -10px;
	content: "";
	left: -10px;
	opacity: 0.7;
	pointer-events: none;
	position: absolute;
	right: -10px;
	top: -10px;
	transform: scale(1);
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tour-clickable:hover::after {
	opacity: 1;
}

/* Tour resumption modal */
.tour-resume-modal {
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(8px);
	bottom: 0;
	display: flex;
	left: 0;
	opacity: 0;
	position: fixed;
	right: 0;
	top: 0;
	transform: scale(0.95);
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	z-index: 10001;
}

.tour-resume-modal.show {
	opacity: 1;
	transform: scale(1);
}

.tour-resume-content {
	background: var(--tour-white);
	border-radius: 3px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	margin: auto;
	max-width: 400px;
	padding: 24px;
	transform: translateY(20px);
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	width: 90%;
}

.tour-resume-modal.show .tour-resume-content {
	transform: translateY(0);
}

.tour-resume-header h3 {
	color: var(--tour-grey-6);
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 8px 0;
}

.tour-resume-header p {
	color: var(--tour-grey-4);
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 20px 0;
}

.tour-resume-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
}

/* Mobile responsiveness for tour modals */
@media (max-width: 768px) {
	.tour-modal {
		bottom: 16px;
		left: 16px;
		right: 16px;
		width: auto;
	}

	.tour-resume-content {
		margin: 20px;
		max-width: none;
		width: auto;
	}

	.tour-resume-actions {
		flex-direction: column;
	}
}

/* Utility classes for common button styles */
.button-link {
	background: none;
	border: none;
	color: var(--tour-grey-4);
	cursor: pointer;
	padding: 4px;
	text-decoration: none;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-link:hover {
	color: var(--tour-grey-6);
	transform: scale(1.05);
}