/* ==========================================================================
   HD INTERACTIVE TUTORIAL STYLES ("Primi passi")
   ========================================================================== */

/* 1. Modal "Primi passi" */
.hd-tutorial-modal {
	z-index: 100010 !important;
}

.hd-tutorial-modal .modal-content {
	background: linear-gradient(145deg, #111524, #1a2036) !important;
	border: 1px solid rgba(56, 189, 248, 0.25) !important;
	border-radius: 20px !important;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 40px rgba(56, 189, 248, 0.15) !important;
	color: #ffffff !important;
	overflow: hidden;
}

.hd-tutorial-modal-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	background: rgba(56, 189, 248, 0.12);
	border: 1px solid rgba(56, 189, 248, 0.25);
	border-radius: 999px;
	color: #38bdf8;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.hd-tutorial-modal-icon-wrap {
	display: flex;
	justify-content: center;
}

.hd-tutorial-modal-icon {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(56, 189, 248, 0.05) 70%);
	border: 1px solid rgba(56, 189, 248, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
}

.hd-tutorial-btn-skip {
	border-color: rgba(255, 255, 255, 0.2) !important;
	color: #cbd5e1 !important;
	border-radius: 12px !important;
}

.hd-tutorial-btn-skip:hover {
	background: rgba(255, 255, 255, 0.1) !important;
	color: #ffffff !important;
}

.hd-tutorial-btn-next {
	background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
	border: none !important;
	color: #ffffff !important;
	border-radius: 12px !important;
	font-weight: 600 !important;
	box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4) !important;
	transition: all 0.2s ease !important;
}

.hd-tutorial-btn-next:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6) !important;
}

/* 2. SVG Backdrop Overlay con MASK Cutout */
svg.hd-tutorial-overlay {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	z-index: 99990 !important;
	opacity: 0;
	pointer-events: none !important;
	transition: opacity 0.3s ease;
}

svg.hd-tutorial-overlay.active {
	opacity: 1;
}

/* La navigazione principale deve restare sempre visibile e cliccabile.
   L'overlay tutorial oscura il contenuto, ma non deve coprire il logo/sidebar. */
.ma_sidebar {
	z-index: 100009 !important;
}

.ma_sidebar .logo_container,
.ma_sidebar .logo_container a,
.ma_sidebar .sidebar_innr,
.ma_sidebar .sidebar_innr a {
	position: relative;
}

/* 3. Spotlight Highlight & Anello di evidenziazione */
.hd-tutorial-spotlight {
	position: relative !important;
	z-index: 99995 !important;
}

@keyframes hdTutorialPulse {
	0%, 100% {
		box-shadow: 0 0 0 4px #0284c7, 0 0 35px rgba(56, 189, 248, 0.9), 0 0 15px #38bdf8;
	}
	50% {
		box-shadow: 0 0 0 7px #38bdf8, 0 0 50px rgba(56, 189, 248, 1), 0 0 25px #0284c7;
	}
}

/* Anello di evidenziazione al neon attorno al ritaglio trasparente */
.hd-tutorial-clone-highlight {
	position: absolute !important;
	z-index: 100004 !important;
	border: 3px solid #38bdf8 !important;
	border-radius: 14px !important;
	box-shadow: 0 0 0 4px #0284c7, 0 0 40px rgba(56, 189, 248, 1) !important;
	animation: hdTutorialPulse 1.8s ease-in-out infinite !important;
	pointer-events: none !important;
}

/* 4. Popover Card - Sempre sopra a tutto */
.hd-tutorial-card {
	position: absolute !important;
	z-index: 100008 !important;
	width: 350px;
	max-width: 90vw;
	background: linear-gradient(145deg, #0f1422, #182036) !important;
	border: 1px solid rgba(56, 189, 248, 0.4) !important;
	border-radius: 18px !important;
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.3) !important;
	color: #ffffff !important;
	padding: 20px;
	font-family: inherit;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: auto !important;
}

.hd-tutorial-card.active {
	opacity: 1;
	transform: translateY(0);
}

/* Embed tutorial cards must remain inside the viewport while the page scrolls. */
.hd-tutorial-card.hd-tutorial-fixed {
	position: fixed !important;
	z-index: 100011 !important;
}

/* Anche il modal iniziale deve rimanere sopra la sidebar. */
.hd-tutorial-welcome-modal {
	z-index: 100010 !important;
}

.hd-tutorial-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.hd-tutorial-step-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	background: rgba(56, 189, 248, 0.15);
	border: 1px solid rgba(56, 189, 248, 0.3);
	color: #38bdf8;
	font-size: 11px;
	font-weight: 700;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.hd-tutorial-card-close {
	background: none;
	border: none;
	color: #94a3b8;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	transition: color 0.2s ease;
}

.hd-tutorial-card-close:hover {
	color: #ffffff;
}

.hd-tutorial-card-title {
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 8px;
	line-height: 1.3;
}

.hd-tutorial-card-body {
	font-size: 13px;
	color: #cbd5e1;
	line-height: 1.55;
	margin-bottom: 18px;
}

.hd-tutorial-card-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.hd-tutorial-arrow {
	position: absolute;
	width: 14px;
	height: 14px;
	background: #151b2e;
	border: 1px solid rgba(56, 189, 248, 0.4);
	transform: rotate(45deg);
	z-index: -1;
}

.hd-tutorial-card[data-arrow="top"] .hd-tutorial-arrow {
	top: -8px;
	border-bottom: none;
	border-right: none;
}

.hd-tutorial-card[data-arrow="bottom"] .hd-tutorial-arrow {
	bottom: -8px;
	border-top: none;
	border-left: none;
	z-index: 2 !important;
}

.hd-tutorial-card[data-arrow="left"] .hd-tutorial-arrow {
	left: -8px;
	top: 20px;
	border-top: none;
	border-right: none;
}

.hd-tutorial-card[data-arrow="right"] .hd-tutorial-arrow {
	right: -8px;
	top: 20px;
	border-bottom: none;
	border-left: none;
}

@media (max-width: 576px) {
	.hd-tutorial-card {
		position: fixed !important;
		bottom: 20px !important;
		left: 5% !important;
		right: 5% !important;
		top: auto !important;
		width: 90% !important;
		margin: 0 auto !important;
	}
	.hd-tutorial-arrow {
		display: none !important;
	}
}
