/* =============================================================
   Aelon - Test comunicazione (modulo al_pf_test)
   Finestra a tutto schermo sopra la pagina, stesso stile delle
   pagine Particelle: fondo nero, testo leggero, accento arancio.
   ============================================================= */

html.al-test-open { overflow: hidden; }

.al-test {
	--t-accent: var(--al-accent, #f3350c);
	--t-ash: #9a9a9a;
	--t-line: rgba(255, 255, 255, .22);
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, .94);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #fff;
	font-family: var(--al-ff-primary, Inter, sans-serif);
	overflow-y: auto;
	overscroll-behavior: contain;
	opacity: 0;
	transition: opacity .3s ease;
}
.al-test.is-open { opacity: 1; }
.al-test[hidden] { display: none; }

.al-test__bar {
	position: sticky;
	top: 0;
	height: 3px;
	background: rgba(255, 255, 255, .08);
	z-index: 2;
}
.al-test__progress {
	display: block;
	height: 100%;
	width: 0;
	background: var(--t-accent);
	transition: width .4s ease;
}

.al-test__close {
	position: fixed;
	top: 18px;
	right: 18px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--t-line);
	background: transparent;
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
	transition: border-color .2s ease;
}
.al-test__close:hover { border-color: #fff; }

.al-test__sfondo {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 0;
}
.al-test__form {
	position: relative;
	z-index: 1;
	max-width: 720px;
	min-height: 100%;
	margin: 0 auto;
	padding: 96px 24px 64px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.al-test__step { display: none; }
.al-test__step.is-active { display: block; animation: al-test-in .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes al-test-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .al-test__step.is-active { animation: none; } }

.al-test .al-test__num {
	display: block;
	font-family: var(--al-ff-mono, monospace);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .03em;
	color: var(--t-accent);
	margin: 0 0 14px;
}
.al-test .al-test__q {
	font-size: clamp(30px, 4.6vw, 52px);
	font-weight: 400;
	line-height: 1.06;
	letter-spacing: -.035em;
	color: #fff;
	margin: 0 0 32px;
	text-wrap: balance;
}
.al-test .al-test__lead {
	font-size: 20px;
	font-weight: 300;
	line-height: 1.5;
	color: #fff;
	margin: 0 0 20px;
	max-width: 560px;
}
.al-test .al-test__note {
	font-size: 16px;
	font-weight: 300;
	line-height: 1.55;
	color: #bdbdbd;
	margin: 0 0 32px;
	max-width: 560px;
}
.al-test .al-test__label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .025em;
	text-transform: uppercase;
	color: var(--t-ash);
	margin: 28px 0 12px;
}
.al-test__field .al-test__label { margin-top: 0; }

/* Scelte a pulsante */
.al-test__scelte { display: flex; flex-wrap: wrap; gap: 10px; }
.al-test .al-test__scelta {
	min-height: 48px;
	padding: 12px 20px;
	border-radius: 24px;
	border: 1px solid var(--t-line);
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease;
}
.al-test .al-test__scelta:hover { border-color: #fff; }
.al-test .al-test__scelta[aria-pressed="true"] { background: var(--t-accent); border-color: var(--t-accent); }

/* Campi */
.al-test .al-test__input {
	display: block;
	width: 100%;
	height: auto;
	padding: 12px 0;
	border: 0;
	border-bottom: 1px solid var(--t-line);
	border-radius: 0;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 20px;
	font-weight: 300;
	box-shadow: none;
	transition: border-color .2s ease;
}
.al-test .al-test__input::placeholder { color: #666; }
.al-test textarea.al-test__area { min-height: 120px; resize: vertical; line-height: 1.5; }
.al-test .al-test__input:focus { outline: none; border-bottom-color: var(--t-accent); }
.al-test__righe { display: grid; gap: 8px; }
.al-test .al-test__add {
	margin-top: 14px;
	padding: 6px 0;
	border: 0;
	background: none;
	color: var(--t-ash);
	font: inherit;
	font-size: 15px;
	text-transform: none;
	cursor: pointer;
}
.al-test .al-test__add:hover { color: #fff; }
.al-test__add[hidden], .al-test__multi[hidden] { display: none; }
.al-test__multi { margin-top: 8px; }

.al-test__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.al-test__field { display: block; margin: 0; }
.al-test__hint { display: block; margin-top: 8px; font-size: 14px; color: var(--t-ash); }
.al-test__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.al-test__privacy {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 32px 0 0;
	font-size: 15px;
	font-weight: 300;
	line-height: 1.5;
	color: #bdbdbd;
	cursor: pointer;
}
.al-test__privacy input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--t-accent); flex: none; }
.al-test__privacy a { color: #fff; text-decoration: underline; }
.al-test .al-test__error { margin: 20px 0 0; color: #ff7a5c; font-size: 15px; }

/* Navigazione */
.al-test__nav { margin-top: 44px; display: flex; align-items: center; gap: 24px; }
.al-test__nav--steps { justify-content: space-between; }
.al-test__nav[hidden], .al-test__nav [hidden] { display: none; }
.al-test .al-test__back {
	padding: 8px 0;
	border: 0;
	background: none;
	color: var(--t-ash);
	font: inherit;
	font-size: 15px;
	text-transform: none;
	cursor: pointer;
}
.al-test .al-test__back:hover { color: #fff; }
.al-test .al-pf-btn { border: 0; cursor: pointer; font-family: inherit; }
.al-test .al-pf-btn:disabled { opacity: .6; cursor: wait; }

@media (max-width: 767px) {
	.al-test__form { padding: 80px 16px 40px; justify-content: flex-start; }
	.al-test__grid { grid-template-columns: 1fr; gap: 24px; }
	.al-test .al-test__lead { font-size: 18px; }
	.al-test .al-test__input { font-size: 18px; }
	.al-test__close { top: 12px; right: 12px; }
}

/* I <button> prendono lo stile dei pulsanti di WoodMart: qui si rimette quello Aelon. */
.al-test button.al-pf-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 48px !important;
	padding: 0 22px !important;
	border-radius: 24px !important;
	background: var(--t-accent) !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	letter-spacing: .025em !important;
	text-transform: uppercase !important;
	line-height: 1 !important;
	box-shadow: none !important;
}
.al-test button.al-pf-btn:hover { background: #fff !important; color: #000 !important; }
.al-test button.al-pf-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.al-test button.al-pf-btn[hidden] { display: none !important; }

/* Timer: conta i secondi in grigio, senza limite e senza colori d'allarme */
.al-test__timer {
	position: fixed;
	top: 28px;
	left: 24px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--al-ff-mono, monospace);
	font-size: 13px;
	letter-spacing: .02em;
	color: var(--t-ash);
	font-variant-numeric: tabular-nums;
}
.al-test__timer[hidden] { display: none; }
.al-test__timer-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--t-accent);
	animation: al-test-respiro 2.4s ease-in-out infinite;
}
@keyframes al-test-respiro { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* "Puoi sceglierne piu' di uno": strillino, adesivo storto che ogni tanto si scuote */
.al-test__piu {
	position: relative;
	align-self: center;
	margin-left: 18px;
	padding: 8px 14px;
	border-radius: 6px;
	background: #fff;
	color: #000;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	line-height: 1.1;
	white-space: nowrap;
	transform: rotate(-5deg);
	box-shadow: 3px 3px 0 var(--t-accent);
	animation: al-test-strillo 3.2s ease-in-out infinite;
}
/* la punta che indica i pulsanti */
.al-test__piu::before {
	content: "";
	position: absolute;
	left: -7px;
	top: 50%;
	margin-top: -7px;
	border-style: solid;
	border-width: 7px 8px 7px 0;
	border-color: transparent #fff transparent transparent;
}
@keyframes al-test-strillo {
	0%, 70%, 100% { transform: rotate(-5deg) scale(1); }
	76% { transform: rotate(-9deg) scale(1.08); }
	82% { transform: rotate(-1deg) scale(1.08); }
	88% { transform: rotate(-7deg) scale(1.03); }
	94% { transform: rotate(-4deg) scale(1); }
}
.al-test__timer[hidden] { display: none; }
@media (max-width: 767px) {
	.al-test__piu { margin: 14px 0 0 4px; }
	.al-test__piu::before {
		left: 18px;
		top: -7px;
		margin-top: 0;
		border-width: 0 7px 8px 7px;
		border-color: transparent transparent #fff transparent;
	}
	.al-test__timer { top: 24px; left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.al-test__piu, .al-test__timer-dot { animation: none; }
}

/* Finale: la finestra si apre e lascia vedere i cerchi della pagina */
.al-test.is-fine {
	background: linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, .7));
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
.al-test .al-test__tempo { color: #fff; margin-bottom: 20px; }
.al-test .al-test__note--fine { color: #dcdcdc; }

/* Nel finale restano solo i cerchi: la pagina sotto sparisce */
html.al-test-fine .website-wrapper,
html.al-test-fine .al-navbar,
html.al-test-fine .al-footer { opacity: 0; transition: opacity .5s ease; }
.al-test.is-fine .al-test__step { text-align: center; }
.al-test.is-fine .al-test__lead,
.al-test.is-fine .al-test__note { margin-left: auto; margin-right: auto; }
.al-test.is-fine .al-test__nav { justify-content: center; }
.al-test.is-fine .al-test__q { text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.al-test.is-fine .al-test__lead,
.al-test.is-fine .al-test__note { text-shadow: 0 1px 12px rgba(0, 0, 0, .8); }
