/* Stile comune pagine factoryclub.it/book/ */
:root {
	--text: #1d1d1f;
	--muted: #6e6e73;
	--border: #86868b;
	--line: #d2d2d7;
	--blue: #0071e3;
	--blue-hover: #0077ed;
	--error: #e30000;
	--error-bg: #fff2f4;
	--bg: #ffffff;
	--input-bg: #ffffff;
	--tick-bg: #e8f8ec;
	--toggle-bg: #e8e8ed;
	--choice-bg: #f2f2f4;
	--choice-hover: #e8e8ed;
	color-scheme: light;
}
:root[data-theme="dark"] {
	--text: #f5f5f7;
	--muted: #a1a1a6;
	--border: #6e6e73;
	--line: #3a3a3c;
	--blue: #2997ff;
	--blue-hover: #4aa8ff;
	--error: #ff6961;
	--error-bg: #3a1d1f;
	--bg: #121212;
	--input-bg: #1c1c1e;
	--tick-bg: #12301b;
	--toggle-bg: #2c2c2e;
	--choice-bg: #262626;
	--choice-hover: #313131;
	color-scheme: dark;
}
body, .field input, .topbar, footer, hr { transition: background-color .25s, color .25s, border-color .25s; }
.logo-dark { display: none !important; }
[data-theme="dark"] .logo-light { display: none !important; }
[data-theme="dark"] .logo-dark { display: block !important; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 12px; }
.lang a { padding: 4px 9px; color: var(--muted); text-decoration: none; }
.lang a.on { background: var(--toggle-bg); color: var(--text); font-weight: 600; }
.theme-toggle {
	width: auto; height: auto;
	display: flex; align-items: center; gap: 8px;
	background: none; border: 0; padding: 0;
	color: var(--muted); font-size: 12px; cursor: pointer;
}
.theme-toggle:hover { background: none; }
.theme-toggle .track {
	position: relative;
	width: 50px; height: 28px;
	border-radius: 14px;
	background: var(--toggle-bg);
	border: 1px solid var(--line);
	transition: background .25s;
}
.theme-toggle .knob {
	position: absolute;
	top: 2px; left: 2px;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,.3);
	display: flex; align-items: center; justify-content: center;
	transition: transform .25s ease;
}
.theme-toggle .knob svg { width: 14px; height: 14px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .track { background: var(--blue); border-color: var(--blue); }
[data-theme="dark"] .theme-toggle .knob { transform: translateX(22px); }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
.theme-toggle:focus-visible .track { box-shadow: 0 0 0 3px rgba(0,113,227,.4); }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	font-size: 17px;
	line-height: 1.47;
}
.topbar {
	max-width: 980px;
	margin: 0 auto;
	padding: 14px 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--line);
}
.topbar img { height: 34px; width: auto; display: block; }
.topbar span { font-size: 12px; color: var(--muted); }
main {
	max-width: 460px;
	margin: 0 auto;
	padding: 48px 22px 64px;
}
h1 {
	font-size: 40px;
	line-height: 1.1;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-align: center;
	margin: 0 0 14px;
}
.intro {
	text-align: center;
	font-size: 17px;
	margin: 0 0 32px;
}
.intro .evento { display: block; font-weight: 600; margin-top: 6px; }
.field { position: relative; margin-bottom: 14px; }
.field input {
	width: 100%;
	height: 56px;
	padding: 22px 16px 6px;
	font-size: 17px;
	font-family: inherit;
	color: var(--text);
	background: var(--input-bg);
	border: 1px solid var(--border);
	border-radius: 12px;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.field label {
	position: absolute;
	left: 17px;
	top: 16px;
	font-size: 17px;
	color: var(--muted);
	pointer-events: none;
	transition: all .15s ease;
}
.field input:focus {
	border-color: var(--blue);
	box-shadow: 0 0 0 4px rgba(0,113,227,.25);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
	top: 7px;
	font-size: 12px;
}
.field .req { color: var(--muted); }
/* Sesso ed età affiancati; select con lo stesso aspetto dei campi */
.nascita { margin-bottom: 14px; }
.nascita .field { margin-bottom: 0; }
.nascita .err-msg { margin-top: 6px; }
.campo-titolo { font-size: 13px; color: var(--muted); margin: 0 0 6px 4px; }
.riga-tre { display: grid; grid-template-columns: .8fr 1.5fr 1fr; gap: 8px; }
.riga-tre .field select { padding-right: 30px; background-position: right 12px center; }
.field select {
	width: 100%; height: 56px; padding: 22px 40px 6px 16px; font-size: 17px; font-family: inherit; color: var(--text);
	background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2386868b' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center;
	border: 1px solid var(--border); border-radius: 12px; outline: none; appearance: none; -webkit-appearance: none;
	transition: border-color .15s, box-shadow .15s;
}
.field select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,113,227,.25); }
.field-select label { top: 7px; font-size: 12px; }
.field.has-error select { border-color: var(--error); background-color: var(--error-bg); }
.field input[type=number] { -moz-appearance: textfield; }
.field input[type=number]::-webkit-inner-spin-button, .field input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field.has-error input { border-color: var(--error); background: var(--error-bg); }
.field.has-error input:focus { box-shadow: 0 0 0 4px rgba(227,0,0,.2); }
.field.has-error label { color: var(--error); }
.err-msg {
	display: flex;
	gap: 6px;
	align-items: center;
	color: var(--error);
	font-size: 12px;
	margin: 6px 2px 0;
}
.err-msg::before {
	content: "!";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 13px; height: 13px;
	border: 1px solid var(--error);
	border-radius: 50%;
	font-size: 9px;
	font-weight: 700;
	flex: none;
}
.hint {
	font-size: 12px;
	color: var(--muted);
	margin: -4px 2px 0;
	line-height: 1.4;
}
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input {
	width: 18px; height: 18px;
	margin: 3px 0 0;
	accent-color: var(--blue);
	flex: none;
}
.check label { font-size: 15px; }
.check small { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.form-error {
	background: var(--error-bg);
	border: 1px solid var(--error);
	color: var(--error);
	border-radius: 12px;
	padding: 12px 16px;
	font-size: 14px;
	margin-bottom: 20px;
}
.privacy-box {
	text-align: center;
	font-size: 11px;
	color: var(--muted);
	line-height: 1.45;
	margin: 0 0 22px;
}
.privacy-box svg { display: block; margin: 0 auto 10px; }
button {
	width: 100%;
	height: 50px;
	border: 0;
	border-radius: 12px;
	background: var(--blue);
	color: #fff;
	font-size: 17px;
	font-family: inherit;
	cursor: pointer;
	transition: background .15s;
}
button:hover { background: var(--blue-hover); }
button:disabled { opacity: .6; cursor: default; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success { text-align: center; }
.success .tick {
	width: 64px; height: 64px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: var(--tick-bg);
	display: flex; align-items: center; justify-content: center;
}
.success p { color: var(--muted); }
.success a { color: var(--blue); text-decoration: none; }
.success a:hover { text-decoration: underline; }
footer {
	max-width: 980px;
	margin: 0 auto;
	padding: 18px 22px 28px;
	border-top: 1px solid var(--line);
	font-size: 12px;
	color: var(--muted);
	text-align: center;
	line-height: 1.6;
}
footer b { font-weight: 600; }
footer a { color: inherit; text-decoration: none; }
footer a:hover { text-decoration: underline; }
@media (max-width: 500px) {
	h1 { font-size: 32px; }
	main { padding-top: 32px; }
}

/* Link indietro e badge accesso social */
.back { display: inline-block; color: var(--blue); text-decoration: none; font-size: 15px; margin-bottom: 18px; }
.back:hover { text-decoration: underline; }
.social-badge {
	text-align: center;
	font-size: 13px;
	color: var(--muted);
	background: var(--input-bg);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 10px 14px;
	margin-bottom: 20px;
}
.social-badge a { color: var(--blue); text-decoration: none; }

/* Pagina intro: pulsanti di accesso */
.choices { display: flex; flex-direction: column; gap: 14px; }
.choice {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 60px;
	padding: 12px 56px;
	border-radius: 12px;
	background: var(--choice-bg);
	color: var(--text);
	font-size: 17px;
	font-weight: 500;
	text-decoration: none;
	text-align: center;
	transition: background .15s, transform .1s;
}
.choice:hover { background: var(--choice-hover); }
.choice:active { transform: scale(.99); }
.choice:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0,113,227,.45); }
.choice .ico {
	position: absolute;
	left: 22px; top: 50%;
	transform: translateY(-50%);
	width: 26px; height: 26px;
	display: flex; align-items: center; justify-content: center;
}
.choice .ico svg { width: 26px; height: 26px; display: block; }
.choice .ico-mono { fill: var(--text); }
.divider {
	display: flex; align-items: center; gap: 12px;
	color: var(--muted); font-size: 13px;
	margin: 8px 0;
}
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.fineprint { text-align: center; font-size: 12px; color: var(--muted); margin-top: 28px; line-height: 1.45; }

/* Campo data: etichetta sempre in alto (il valore è sempre visibile) */
.field-date label { top: 7px; font-size: 12px; }
.field-date input { appearance: none; -webkit-appearance: none; text-align: left; cursor: pointer; }
.field-date input::-webkit-date-and-time-value { text-align: left; }
.field-date input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; }

/* Gestionale: menu e intestazioni */
.mgr-nav { display: flex; gap: 6px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.mgr-nav a { padding: 10px 14px; color: var(--muted); text-decoration: none; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mgr-nav a:hover { color: var(--text); }
.mgr-nav a.on { color: var(--text); border-bottom-color: var(--blue); font-weight: 600; }
.mgr-nav a.esci { margin-left: auto; color: var(--blue); }
.mgr-nav { overflow-x: auto; white-space: nowrap; }
.mgr-nav .chi { margin-left: auto; padding: 10px 4px 10px 14px; color: var(--muted); font-size: 13px; }
.mgr-nav .chi + a.esci { margin-left: 0; }

/* Scheda evento (pagine pubbliche) */
.evento-card { border-radius: 16px; overflow: hidden; background: var(--choice-bg); margin: 0 0 28px; }
.evento-card img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: cover; }
.evento-card .ec-body { padding: 16px 18px 18px; }
.evento-card h2 { font-size: 22px; line-height: 1.2; margin: 0 0 4px; font-weight: 600; }
.evento-card .ec-quando { font-size: 14px; color: var(--blue); font-weight: 500; margin-bottom: 8px; }
.evento-card .ec-prezzo { font-size: 14px; font-weight: 600; margin: -4px 0 8px; }
.evento-card .ec-desc { font-size: 14px; color: var(--muted); line-height: 1.5; }
.field-fissa { padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.field-fissa small { display: block; font-size: 12px; color: var(--muted); }

.privacy-box.condizioni { display: block; margin-bottom: 14px; font-size: 13px; color: var(--text); }
.privacy-box.condizioni strong { display: block; margin-top: 6px; }
