/**
 * Page Intro for Elementor — intro.css
 * v1.0.0 — 2026-05-20
 * AI Generator: Claude Sonnet 4.6
 */

/* ── Nascondi overlay quando il cookie è già valido (anti-FOUC) ─────────── */
.pie-skip #pie-intro-overlay {
	display: none !important;
}

/* ── Overlay principale ──────────────────────────────────────────────────── */
#pie-intro-overlay {
	position: fixed;
	inset: 0;                     /* top/right/bottom/left: 0 */
	z-index: 999999;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #fff;             /* fallback; il template sovrascriverà */
	box-sizing: border-box;
	will-change: transform, opacity;
}

/* ── Contenitore del template Elementor ─────────────────────────────────── */
#pie-intro-content {
	flex: 1 1 100%;
	width: 100%;
	min-height: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Forza il template a occupare tutta l'area disponibile */
#pie-intro-content > .elementor,
#pie-intro-content > .elementor > .elementor-inner,
#pie-intro-content > .elementor > .elementor-section-wrap,
#pie-intro-content > .elementor > .e-n-container {
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
}

/* ── Barra di caricamento ────────────────────────────────────────────────── */
.pie-loading--bar {
	flex-shrink: 0;
	width: 100%;
	height: 4px;
	background: rgba(0, 0, 0, .12);
	overflow: hidden;
}

.pie-loading-bar {
	width: 100%;
	height: 100%;
}

.pie-loading-bar-fill {
	height: 100%;
	width: 0%;
	background: currentColor;
	/* la transition viene impostata via JS dopo il primo reflow */
}

/* ── Percentuale ─────────────────────────────────────────────────────────── */
.pie-loading--percentage {
	flex-shrink: 0;
	display: flex;
	justify-content: flex-end;
	padding: 12px 20px;
}

.pie-loading-percentage {
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: currentColor;
	letter-spacing: .04em;
}

/* ── Pulsante chiudi (mode manuale) ──────────────────────────────────────── */
.pie-close-btn {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 1;
	background: rgba(255, 255, 255, .15);
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	padding: 0;
	transition: background .2s, opacity .2s;
}

.pie-close-btn:hover,
.pie-close-btn:focus-visible {
	background: rgba(255, 255, 255, .35);
	outline: none;
}

/* ── Transizioni di uscita ───────────────────────────────────────────────── */

/* curtain: transform-origin dipende dalla direzione */
#pie-intro-overlay[data-transition="curtain"] {
	transform-origin: top center;
}

#pie-intro-overlay[data-transition="curtain-bottom"] {
	transform-origin: bottom center;
}

/* Riduzione del movimento (accessibilità) */
@media (prefers-reduced-motion: reduce) {
	#pie-intro-overlay {
		transition: opacity .3s ease !important;
		transform: none !important;
	}
}
