/* IPESFA – Chatbot: botón flotante (siempre cargado, panel es carga diferida).

   El tema padre (Spacious) define `button { padding: 5px 25px;
   margin-bottom: 30px; ... }` de forma global — `all: unset` lo neutraliza
   por completo en vez de ir pisando propiedad por propiedad. */

.ipesfa-chat-fab {
	all: unset;
	box-sizing: border-box;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9999; /* por encima del header (9000) y el .snav (500) */
	width: 52px;
	height: 52px;
	border-radius: 50%;
	/* Decisión estética consciente: #5FA9B3 con blanco encima da 2.69:1,
	   no pasa WCAG AA (min 4.5:1) — se eligió priorizar el color de marca. */
	background: #5FA9B3;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(63, 70, 86, 0.2);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ipesfa-chat-fab:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(63, 70, 86, 0.26);
}

.ipesfa-chat-fab:focus-visible {
	outline: 2px solid #2D5C65;
	outline-offset: 2px;
}

.ipesfa-chat-fab.is-loading {
	opacity: 0.7;
	cursor: wait;
}

.ipesfa-chat-mark {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-weight: 700;
	line-height: 1;
	text-transform: lowercase;
	user-select: none; /* decorativo: no se debe arrastrar/copiar junto al mensaje */
}

.ipesfa-chat-fab .ipesfa-chat-mark {
	font-size: 18px;
}

@media (max-width: 640px) {
	.ipesfa-chat-fab {
		right: 16px;
		/* max() respeta la franja segura del gesto de inicio en iPhones sin
		   botón físico, sin alejar el botón en dispositivos que no la tienen. */
		bottom: max(16px, env(safe-area-inset-bottom));
		width: 48px;
		height: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ipesfa-chat-fab {
		transition: none;
	}

	.ipesfa-chat-fab:hover {
		transform: none;
	}
}
