/* ============================================================
   Pronto Soccorso FAB — stili
   ============================================================ */

.ps-fab {
	--fab-bg: #E53935;
	--fab-bg-hover: #C62828;

	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9998;

	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 12px 20px 12px 14px;
	background: var(--fab-bg);
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 999px;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.15;
	letter-spacing: 0.01em;
	box-shadow: 0 6px 20px rgba(229, 57, 53, .35), 0 2px 6px rgba(0, 0, 0, .15);
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
	cursor: pointer;
	overflow: visible;
}

.ps-fab:hover,
.ps-fab:focus-visible {
	background: var(--fab-bg-hover);
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(229, 57, 53, .45), 0 4px 10px rgba(0, 0, 0, .18);
	color: #fff !important;
}

.ps-fab:focus-visible {
	outline: 3px solid rgba(255, 255, 255, .6);
	outline-offset: 2px;
}

.ps-fab:active {
	transform: translateY(0);
}

.ps-fab-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, .2);
	border-radius: 50%;
	flex-shrink: 0;
}

.ps-fab-label {
	display: inline-flex;
	flex-direction: column;
	line-height: 1.15;
}

.ps-fab-label-top {
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.02em;
}

.ps-fab-label-bot {
	font-weight: 400;
	font-size: 11px;
	opacity: .85;
	letter-spacing: 0.03em;
}

/* Animazione pulse — richiama attenzione ogni 4s */
.ps-fab-pulse {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	border: 2px solid var(--fab-bg);
	opacity: 0;
	animation: ps-fab-pulse 4s ease-out infinite;
	pointer-events: none;
}

@keyframes ps-fab-pulse {
	0%   { transform: scale(1);    opacity: .7; }
	70%  { transform: scale(1.15); opacity: 0; }
	100% { transform: scale(1.15); opacity: 0; }
}

/* Mobile: diventa rotondo, solo icona */
@media (max-width: 600px) {
	.ps-fab {
		padding: 0;
		width: 58px;
		height: 58px;
		justify-content: center;
		right: 16px;
		bottom: 16px;
	}
	.ps-fab-icon {
		background: transparent;
		width: auto;
		height: auto;
	}
	.ps-fab-label {
		display: none;
	}
	.ps-fab-icon svg {
		width: 28px;
		height: 28px;
	}
}

/* Rispetta preferenze motion ridotto */
@media (prefers-reduced-motion: reduce) {
	.ps-fab-pulse { animation: none; }
	.ps-fab { transition: none; }
}

/* Stampa: nascondi */
@media print {
	.ps-fab { display: none !important; }
}

/* Classe aggiunta via JS per nascondere il FAB sulla pagina stessa del PS */
.ps-fab.is-hidden {
	display: none !important;
}
