/**
 * CTA gialli Registrati / Accedi — home hero + barra sotto header (document flow).
 * Mai position:fixed: non devono coprire form, Indietro/Home o campi da mobile.
 */

.vc-mkt-auth-cta {
	--vc-auth-gold: #ffc532;
	--vc-auth-gold-2: #ffe082;
	--vc-auth-gold-3: #f0b400;
	--vc-auth-ink: #062042;
	--vc-auth-blue: #0445af;
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: flex-end;
	gap: 0.55rem;
	z-index: 5;
	font-family: "Rajdhani", system-ui, -apple-system, "Segoe UI", sans-serif;
	box-sizing: border-box;
}

.vc-mkt-auth-cta *,
.vc-mkt-auth-cta *::before,
.vc-mkt-auth-cta *::after {
	box-sizing: border-box;
}

.vc-mkt-auth-cta__btn {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0.05rem;
	min-height: 48px;
	min-width: 44px;
	padding: 0.55rem 1rem 0.5rem 0.85rem;
	border-radius: 999px;
	text-decoration: none !important;
	color: var(--vc-auth-ink) !important;
	background: linear-gradient(180deg, var(--vc-auth-gold-2) 0%, var(--vc-auth-gold) 48%, var(--vc-auth-gold-3) 100%);
	border: 2px solid rgba(255, 255, 255, 0.55);
	box-shadow:
		0 8px 22px rgba(255, 197, 50, 0.42),
		0 0 0 1px rgba(4, 69, 175, 0.12),
		inset 0 1px 0 rgba(255, 255, 255, 0.55);
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
	-webkit-tap-highlight-color: transparent;
	position: relative;
	overflow: hidden;
}

.vc-mkt-auth-cta__btn::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.35) 48%, transparent 100%);
	transform: translateX(-120%);
	transition: transform 0.45s ease;
	pointer-events: none;
}

.vc-mkt-auth-cta__btn:hover,
.vc-mkt-auth-cta__btn:focus-visible {
	transform: translateY(-2px) scale(1.02);
	filter: brightness(1.04);
	box-shadow:
		0 12px 28px rgba(255, 197, 50, 0.5),
		0 0 0 2px rgba(4, 69, 175, 0.18),
		inset 0 1px 0 rgba(255, 255, 255, 0.65);
	outline: none;
}

.vc-mkt-auth-cta__btn:hover::before,
.vc-mkt-auth-cta__btn:focus-visible::before {
	transform: translateX(120%);
}

.vc-mkt-auth-cta__btn:active {
	transform: translateY(0) scale(0.98);
}

.vc-mkt-auth-cta__label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.98rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1.15;
	text-transform: uppercase;
}

.vc-mkt-auth-cta__icon {
	font-size: 0.95rem;
	line-height: 1;
}

.vc-mkt-auth-cta__hint {
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.2;
	color: rgba(6, 32, 66, 0.72);
	white-space: nowrap;
}

.vc-mkt-auth-cta__btn--login,
.vc-mkt-auth-cta__btn--dashboard {
	background: linear-gradient(180deg, #ffffff 0%, #fff8e6 55%, #ffe9a8 100%);
	border-color: rgba(255, 197, 50, 0.85);
	box-shadow:
		0 8px 20px rgba(4, 69, 175, 0.14),
		0 0 0 1px rgba(255, 197, 50, 0.35);
}

/* —— Home hero: nel flusso della pagina (non fixed) —— */
.vc-home-facile__hero {
	position: relative;
}

.vc-mkt-auth-cta--hero {
	position: absolute;
	top: max(0.75rem, env(safe-area-inset-top, 0px));
	right: max(0.75rem, env(safe-area-inset-right, 0px));
	left: auto;
	max-width: calc(100% - 1.5rem);
	justify-content: flex-end;
}

/*
 * Barra globale sotto header (document flow).
 * Scorre con la pagina: non copre form, Indietro/Home, chat o campi.
 * Legacy --float: stesso comportamento (mai fixed).
 */
.vc-mkt-auth-cta-bar {
	position: relative !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	transform: none !important;
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding:
		0.55rem
		max(0.9rem, env(safe-area-inset-right, 0px))
		0.65rem
		max(0.9rem, env(safe-area-inset-left, 0px));
	z-index: 4;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 255, 0.92) 100%);
	border-bottom: 1px solid rgba(4, 69, 175, 0.1);
	box-shadow: 0 6px 18px rgba(4, 69, 175, 0.06);
}

.vc-mkt-auth-cta-bar .vc-mkt-auth-cta,
.vc-mkt-auth-cta--bar,
.vc-mkt-auth-cta--float {
	position: relative !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	transform: none !important;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	justify-content: flex-end;
	gap: 0.5rem;
	z-index: 4;
	pointer-events: none;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.vc-mkt-auth-cta-bar .vc-mkt-auth-cta__btn,
.vc-mkt-auth-cta--bar .vc-mkt-auth-cta__btn,
.vc-mkt-auth-cta--float .vc-mkt-auth-cta__btn {
	pointer-events: auto;
	min-height: 46px;
	padding: 0.45rem 0.9rem 0.4rem 0.8rem;
}

.vc-mkt-auth-cta-bar .vc-mkt-auth-cta__label,
.vc-mkt-auth-cta--bar .vc-mkt-auth-cta__label,
.vc-mkt-auth-cta--float .vc-mkt-auth-cta__label {
	font-size: 0.92rem;
}

.vc-mkt-auth-cta-bar .vc-mkt-auth-cta__hint,
.vc-mkt-auth-cta--bar .vc-mkt-auth-cta__hint,
.vc-mkt-auth-cta--float .vc-mkt-auth-cta__hint {
	font-size: 0.64rem;
}

/* Home: CTA già nell’hero → niente doppia barra */
body.home .vc-mkt-auth-cta-bar,
body.blog.home .vc-mkt-auth-cta-bar,
body.home .vc-mkt-auth-cta--bar,
body.blog.home .vc-mkt-auth-cta--bar,
body.home .vc-mkt-auth-cta--float,
body.blog.home .vc-mkt-auth-cta--float,
/* Corsi online: CTA già nel banner sezione */
body:has(.vc-osf) .vc-mkt-auth-cta-bar,
body:has(.vc-osf) .vc-mkt-auth-cta--bar,
body:has(.vc-osf) .vc-mkt-auth-cta--float,
/* Area account mobile: niente barra extra */
body.vc-privato-mobile-shell-account .vc-mkt-auth-cta-bar,
body.vc-privato-mobile-shell-account .vc-mkt-auth-cta--bar,
body.vc-privato-mobile-shell-account .vc-mkt-auth-cta--float {
	display: none !important;
}

/* —— CTA inline nella sezione corsi online (banner) —— */
.vc-mkt-auth-cta--section {
	position: relative;
	top: auto;
	right: auto;
	left: auto;
	width: 100%;
	max-width: 100%;
	margin: 0 0 0.95rem;
	padding: 0;
	justify-content: flex-end;
	gap: 0.55rem;
	z-index: 2;
	background: transparent;
	border: 0;
	box-shadow: none;
	pointer-events: none;
}

.vc-mkt-auth-cta--section .vc-mkt-auth-cta__btn {
	pointer-events: auto;
}

.vc-osf__banner .vc-mkt-auth-cta--section .vc-mkt-auth-cta__btn {
	min-height: 48px;
	padding: 0.55rem 1rem 0.5rem 0.85rem;
	box-shadow:
		0 10px 26px rgba(255, 197, 50, 0.45),
		0 0 0 1px rgba(255, 255, 255, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

@media (max-width: 767px) {
	.vc-home-facile__hero {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		width: 100%;
		max-width: 100%;
		overflow-x: clip;
		padding:
			max(0.85rem, env(safe-area-inset-top, 0px))
			max(0.9rem, env(safe-area-inset-right, 0px))
			1.35rem
			max(0.9rem, env(safe-area-inset-left, 0px));
	}

	.vc-mkt-auth-cta--hero {
		position: relative;
		top: auto;
		right: auto;
		left: auto;
		order: -1;
		z-index: 5;
		width: 100%;
		max-width: 100%;
		margin: 0 0 0.95rem;
		padding: 0;
		justify-content: stretch;
		gap: 0.45rem;
	}

	.vc-home-facile__hero-inner {
		display: block;
		width: 100%;
		max-width: 100%;
		padding: 0.25rem 0 0.5rem;
		text-align: center;
	}

	.vc-mkt-auth-cta--hero .vc-mkt-auth-cta__btn,
	.vc-mkt-auth-cta-bar .vc-mkt-auth-cta__btn,
	.vc-mkt-auth-cta--bar .vc-mkt-auth-cta__btn,
	.vc-mkt-auth-cta--float .vc-mkt-auth-cta__btn,
	.vc-mkt-auth-cta--section .vc-mkt-auth-cta__btn {
		flex: 1 1 calc(50% - 0.25rem);
		min-width: 0;
		max-width: 100%;
		padding: 0.5rem 0.65rem;
		align-items: center;
		text-align: center;
	}

	.vc-mkt-auth-cta--hero .vc-mkt-auth-cta__label,
	.vc-mkt-auth-cta-bar .vc-mkt-auth-cta__label,
	.vc-mkt-auth-cta--bar .vc-mkt-auth-cta__label,
	.vc-mkt-auth-cta--float .vc-mkt-auth-cta__label,
	.vc-mkt-auth-cta--section .vc-mkt-auth-cta__label {
		font-size: 0.88rem;
		justify-content: center;
	}

	.vc-mkt-auth-cta--hero .vc-mkt-auth-cta__hint,
	.vc-mkt-auth-cta-bar .vc-mkt-auth-cta__hint,
	.vc-mkt-auth-cta--bar .vc-mkt-auth-cta__hint,
	.vc-mkt-auth-cta--float .vc-mkt-auth-cta__hint,
	.vc-mkt-auth-cta--section .vc-mkt-auth-cta__hint {
		font-size: 0.6rem;
		white-space: normal;
		text-align: center;
		line-height: 1.25;
		max-width: 100%;
	}

	.vc-mkt-auth-cta-bar,
	.vc-mkt-auth-cta--bar,
	.vc-mkt-auth-cta--float {
		justify-content: stretch;
		padding:
			0.5rem
			max(0.75rem, env(safe-area-inset-right, 0px))
			0.55rem
			max(0.75rem, env(safe-area-inset-left, 0px));
	}

	.vc-mkt-auth-cta--section {
		justify-content: stretch;
		gap: 0.45rem;
		margin-bottom: 1rem;
	}
}

@media (max-width: 380px) {
	.vc-mkt-auth-cta--hero,
	.vc-mkt-auth-cta-bar,
	.vc-mkt-auth-cta--bar,
	.vc-mkt-auth-cta--float {
		flex-direction: column;
	}

	.vc-mkt-auth-cta--hero .vc-mkt-auth-cta__btn,
	.vc-mkt-auth-cta-bar .vc-mkt-auth-cta__btn,
	.vc-mkt-auth-cta--bar .vc-mkt-auth-cta__btn,
	.vc-mkt-auth-cta--float .vc-mkt-auth-cta__btn {
		flex: 1 1 100%;
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vc-mkt-auth-cta__btn,
	.vc-mkt-auth-cta__btn::before {
		transition: none !important;
	}
}
