/* Domande in tempo reale · base comune a console e proiezione */

@font-face { font-family: "MLDL Montserrat"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "MLDL Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "MLDL Montserrat"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "MLDL Montserrat"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2"); }

:root {
	--navy: #13294f;
	--navy-2: #1c3a6b;
	--navy-3: #0d1e3b;
	--giallo: #f2bf00;
	--giallo-2: #ffd84a;
	--ghiaccio: #eef2f8;
	--linea: #d9e0ec;
	--testo: #1f2a3d;
	--muto: #5d6b82;
	--verde: #1f8a5b;
	--rosso: #b3261e;
	--font: "MLDL Montserrat", "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
	font-family: var(--font);
	color: var(--testo);
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
}

button { font: inherit; color: inherit; }

.app { min-height: 100vh; min-height: 100dvh; }

/* Accesso con PIN e scelta della sala */

.accesso {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
	background: var(--navy);
	background-image: radial-gradient(circle at 100% 0, rgba(242, 191, 0, .22) 0 18%, transparent 18.2%);
}

.accesso__box {
	width: 100%;
	max-width: 420px;
	padding: 30px 26px 28px;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.accesso__marchio {
	margin: 0 0 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--navy-2);
}

.accesso__titolo {
	margin: 0 0 6px;
	font-size: 28px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.02em;
	color: var(--navy);
}

.accesso__testo {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--muto);
}

.accesso__pin {
	display: block;
	width: 100%;
	height: 62px;
	padding: 0 18px;
	border: 2px solid var(--linea);
	border-radius: 16px;
	font: 700 26px/1 var(--font);
	letter-spacing: .3em;
	text-align: center;
	color: var(--navy);
	background: #fff;
	-webkit-appearance: none;
	appearance: none;
}

.accesso__pin:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(242, 191, 0, .45); }

.accesso__errore { min-height: 22px; margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--rosso); }

.accesso__sale { display: grid; gap: 12px; }

.accesso__sala {
	display: block;
	width: 100%;
	padding: 18px 20px;
	border: 2px solid var(--linea);
	border-radius: 18px;
	background: #fff;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, background .15s, transform .15s;
}

.accesso__sala:hover, .accesso__sala:focus-visible { border-color: var(--giallo); background: #fffbea; outline: none; transform: translateY(-1px); }

.accesso__sala strong { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; color: var(--navy); }

.accesso__sala span { display: block; margin-top: 4px; font-size: 14px; color: var(--muto); }

/* Pulsanti */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 18px;
	border: 2px solid transparent;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s, border-color .15s, color .15s, opacity .15s;
	-webkit-user-select: none;
	user-select: none;
	touch-action: manipulation;
}

.btn:disabled { opacity: .4; cursor: default; }

.btn:focus-visible { outline: 3px solid var(--giallo); outline-offset: 2px; }

.btn--pieno { width: 100%; margin-top: 16px; min-height: 56px; font-size: 17px; }

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:not(:disabled):active { background: var(--navy-3); }

.btn--giallo { background: var(--giallo); color: var(--navy); }
.btn--giallo:not(:disabled):active { background: var(--giallo-2); }

.btn--linea { background: #fff; border-color: var(--linea); color: var(--navy); }
.btn--linea:not(:disabled):active { border-color: var(--navy); }

.btn--rosso { background: #fff; border-color: #f0c9c6; color: var(--rosso); }
.btn--rosso:not(:disabled):active { background: #fdf0ef; }

.btn--testo { min-height: 40px; padding: 0 6px; background: none; color: var(--muto); text-decoration: underline; text-underline-offset: 3px; }

/* Avviso temporaneo */

.avviso {
	position: fixed;
	left: 50%;
	bottom: calc(20px + env(safe-area-inset-bottom));
	z-index: 50;
	max-width: calc(100vw - 32px);
	padding: 12px 18px;
	border-radius: 14px;
	background: var(--navy-3);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 12px);
	transition: opacity .2s, transform .2s;
}

.avviso.is-on { opacity: 1; transform: translate(-50%, 0); }

.avviso.is-errore { background: var(--rosso); }
