/* Avatar John — Area Studenti FC 27. Tema scuro predefinito, chiaro con html[data-jf-theme="light"]. */
.jfa {
	--jfa-bg: #0b1625;
	--jfa-bg2: #0f1e31;
	--jfa-line: rgba(147, 164, 183, .22);
	--jfa-text: #eef4fa;
	--jfa-copy: #bccbd7;
	--jfa-muted: #8fa3b5;
	--jfa-lime: #d8ff38;
	--jfa-mint: #52f2ca;
	--jfa-hl: rgba(216, 255, 56, .22);
	--jfa-shadow: 0 18px 50px rgba(0, 0, 0, .45);
	font-family: inherit;
}
html[data-jf-theme="light"] .jfa {
	--jfa-bg: #ffffff;
	--jfa-bg2: #f3f8f7;
	--jfa-line: rgba(8, 91, 80, .16);
	--jfa-text: #10262d;
	--jfa-copy: #354852;
	--jfa-muted: #5d717b;
	--jfa-mint: #087565;
	--jfa-hl: rgba(8, 117, 101, .14);
	--jfa-shadow: 0 18px 50px rgba(13, 27, 38, .18);
}
.jfa [hidden] { display: none !important; }
.jfa *, .jfa *::before, .jfa *::after { box-sizing: border-box; }
.jfa button { font-family: inherit; cursor: pointer; }
.jfa button:focus-visible { outline: 2px solid var(--jfa-mint); outline-offset: 2px; }

/* Icona fissa in basso a sinistra (la chat dell'assistenza resta a destra) */
.jfa-launch {
	position: fixed; left: 18px; bottom: 18px; z-index: 1000;
	width: 58px; height: 58px; padding: 0; border-radius: 50%;
	border: 2px solid var(--jfa-mint); background: var(--jfa-bg);
	box-shadow: 0 10px 28px rgba(0, 0, 0, .3); transition: transform .2s ease;
}
.jfa-launch:hover { transform: translateY(-2px); }
.jfa-launch img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.jfa-dot { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--jfa-lime); box-shadow: 0 0 0 2px var(--jfa-bg); }
.jfa.is-open .jfa-launch { border-color: var(--jfa-lime); }
.jfa-edge {
	position: fixed; left: 0; bottom: 30px; z-index: 1000; width: 26px; height: 44px;
	border: 1px solid var(--jfa-line); border-left: 0; border-radius: 0 12px 12px 0;
	background: var(--jfa-bg); color: var(--jfa-mint); font-weight: 900; opacity: .8;
}
.jfa-edge:hover { opacity: 1; }

/* Pannello */
.jfa-panel {
	position: fixed; left: 18px; bottom: 88px; z-index: 1000;
	width: min(390px, calc(100vw - 36px)); max-height: min(70vh, 620px); overflow: auto;
	padding: 14px 16px 14px; border: 1px solid var(--jfa-line); border-radius: 20px;
	background: var(--jfa-bg); color: var(--jfa-text); box-shadow: var(--jfa-shadow);
	animation: jfa-in .28s ease-out;
}
@keyframes jfa-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.jfa-top { display: flex; align-items: center; gap: 12px; }
.jfa-face {
	flex: 0 0 auto; width: 92px; height: 100px; overflow: hidden; border-radius: 16px;
	background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--jfa-mint) 22%, transparent), transparent 70%), var(--jfa-bg2);
	border: 1px solid var(--jfa-line);
}
.jfa-img { width: 100%; height: auto; display: block; margin-top: 2px; }
.jfa-head { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.jfa-title { font-size: 16px; font-weight: 850; line-height: 1.25; color: var(--jfa-text); }
.jfa-sub { font-size: 12px; color: var(--jfa-muted); }
.jfa-ctl { align-self: flex-start; display: flex; gap: 4px; }
.jfa-ctl button {
	width: 32px; height: 32px; padding: 0; border-radius: 10px; border: 1px solid var(--jfa-line);
	background: transparent; color: var(--jfa-copy); font-size: 16px; line-height: 1;
}
.jfa-ctl button:hover { color: var(--jfa-text); border-color: var(--jfa-mint); }
.jfa-bubble {
	position: relative; margin-top: 12px; padding: 12px 14px; border-radius: 14px;
	background: var(--jfa-bg2); border: 1px solid var(--jfa-line);
}
.jfa-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--jfa-copy); }
.jfa-text span { border-radius: 4px; transition: background-color .12s ease, color .12s ease; }
.jfa-text span.on { background: var(--jfa-hl); color: var(--jfa-text); }
.jfa-text span.done { color: var(--jfa-text); }
.jfa-unlock {
	display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
	margin-top: 10px; min-height: 40px; border-radius: 11px; border: 1px solid var(--jfa-line);
	background: transparent; color: var(--jfa-text); font-size: 13.5px;
}
.jfa-unlock.pulse { border-color: var(--jfa-mint); animation: jfa-pulse 2.2s ease-in-out infinite; }
@keyframes jfa-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--jfa-mint) 40%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.jfa-bar { display: flex; gap: 8px; margin-top: 10px; }
.jfa-bar button {
	flex: 1; min-height: 36px; border-radius: 10px; border: 1px solid var(--jfa-line);
	background: transparent; color: var(--jfa-copy); font-size: 13px; font-weight: 700;
}
.jfa-bar button:hover { color: var(--jfa-text); border-color: var(--jfa-mint); }
/* Regolatore del volume */
.jfa-vol { display: flex; align-items: center; gap: 10px; margin: 10px 2px 0; font-size: 14px; color: var(--jfa-muted); cursor: pointer; }
.jfa-vol input {
	flex: 1; height: 6px; margin: 0; border-radius: 999px; cursor: pointer;
	-webkit-appearance: none; appearance: none;
	background: linear-gradient(90deg, var(--jfa-mint) 0, var(--jfa-mint) var(--p, 70%), var(--jfa-line) var(--p, 70%), var(--jfa-line) 100%);
}
.jfa-vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--jfa-lime); border: 2px solid var(--jfa-bg); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.jfa-vol input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--jfa-lime); border: 2px solid var(--jfa-bg); }
.jfa-vol input:focus-visible { outline: 2px solid var(--jfa-mint); outline-offset: 4px; }

/* Niente barre di scorrimento visibili: si scorre lo stesso */
.jfa-panel, .jfa-chips { scrollbar-width: none; -ms-overflow-style: none; }
.jfa-panel::-webkit-scrollbar, .jfa-chips::-webkit-scrollbar { display: none; width: 0; height: 0; }

.jfa-first { margin: 10px 2px 0; font-size: 12.5px; color: var(--jfa-muted); }
.jfa-more { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--jfa-line); }
.jfa-more-t { display: block; margin-bottom: 7px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--jfa-mint); }
.jfa-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jfa-chip {
	padding: 6px 10px; border-radius: 999px; border: 1px solid var(--jfa-line);
	background: transparent; color: var(--jfa-copy); font-size: 12.5px; font-weight: 650;
}
.jfa-chip:hover { color: var(--jfa-text); border-color: var(--jfa-mint); }

/* Icone «?» negli elementi della pagina */
.jfa-tip {
	box-sizing: border-box;
	position: absolute; bottom: 12px; right: 12px; z-index: 3; width: 30px; height: 30px; padding: 0;
	border-radius: 50%; border: 1.5px solid var(--jfa-mint, #52f2ca); background: #0b1625; cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .25); transition: transform .15s ease;
}
.jfa-tip:hover { transform: scale(1.08); }
.jfa-tip img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.jfa-tip b {
	position: absolute; right: -4px; bottom: -4px; width: 15px; height: 15px; border-radius: 50%;
	display: grid; place-items: center; background: #d8ff38; color: #07100d; font: 900 10px/1 system-ui, sans-serif;
}
.jfa-tip.is-inline { position: relative; bottom: auto; right: auto; display: inline-block; vertical-align: middle; margin: 6px 0 0 8px; }

/* Telefono: scheda dal basso, al massimo poco meno di metà schermo */
@media (max-width: 700px) {
	.jfa-launch { left: 12px; bottom: 14px; width: 52px; height: 52px; }
	.jfa-panel {
		left: 0; right: 0; bottom: 0; width: 100%; max-height: 52vh; max-height: 52dvh;
		border-radius: 20px 20px 0 0; border-width: 1px 0 0; padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
	}
	.jfa-face { width: 70px; height: 76px; border-radius: 14px; }
	.jfa-title { font-size: 15px; }
	.jfa-text { font-size: 15px; }
	.jfa.is-open .jfa-launch { display: none; }
	.jfa-tip { width: 28px; height: 28px; bottom: 10px; right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
	.jfa-panel, .jfa-unlock.pulse { animation: none; }
	.jfa-launch, .jfa-tip { transition: none; }
}
