/* Flota en regla: burbuja del asistente con IA (js/asistente.js). Colores del DESIGN.md (paleta B). */
body .fr-chat-abrir {
	position: fixed; right: 16px; bottom: 64px; z-index: 9990;
	display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 18px;
	border: 0; border-radius: 999px; cursor: pointer;
	font: 600 17px/1.2 "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
	color: #14202b; background: #f5b800; box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
body .fr-chat-abrir:hover, body .fr-chat-abrir:focus { color: #14202b; background: #ffcb2e; }
body .fr-chat-abrir:focus-visible, .fr-chat button:focus-visible, .fr-chat textarea:focus-visible, .fr-chat a:focus-visible { outline: 3px solid #eef3f6; outline-offset: 2px; }
body .fr-chat-abrir svg { width: 20px; height: 20px; flex: none; }
body .fr-chat-abrir[aria-expanded="true"] { display: none; }

.fr-chat {
	position: fixed; right: 16px; bottom: 16px; z-index: 9991;
	display: flex; flex-direction: column; width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 32px);
	border: 1px solid #263645; border-radius: 10px; overflow: hidden;
	font: 400 16px/1.45 "Barlow", system-ui, sans-serif; color: #eef3f6; background: #0f1a24; box-shadow: 0 10px 32px rgba(0, 0, 0, .45);
}
.fr-chat[hidden] { display: none; }
.fr-chat-cabecera { display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 12px 16px; background: #1b2a38; border-bottom: 1px solid #2c3e50; }
.fr-chat-titulos { flex: 1; min-width: 0; }
.fr-chat-titulo { margin: 0; font: 700 19px/1.2 "Barlow Semi Condensed", "Barlow", system-ui, sans-serif; color: #eef3f6; }
.fr-chat-aviso { margin: 4px 0 0; font-size: 14px; line-height: 1.35; color: #a3b3bf; }
.fr-chat-aviso a { color: #f5b800; text-decoration: underline; }
body .fr-chat .fr-chat-cerrar { flex: none; width: 44px; height: 44px; margin: -6px -4px 0 0; border: 0; border-radius: 6px; cursor: pointer; color: #eef3f6; background: transparent; font-size: 26px; line-height: 1; }
body .fr-chat .fr-chat-cerrar:hover, body .fr-chat .fr-chat-cerrar:focus { color: #eef3f6; background: #26384a; }
.fr-chat-mensajes { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.fr-chat-msg { max-width: 88%; margin: 0; padding: 10px 12px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fr-chat-msg a { color: #f5b800; text-decoration: underline; }
.fr-chat-msg-ia { align-self: flex-start; background: #16232f; border: 1px solid #263645; }
.fr-chat-msg-yo { align-self: flex-end; color: #14202b; background: #f5b800; }
.fr-chat-msg-yo a { color: #14202b; }
.fr-chat-escribiendo { align-self: flex-start; color: #a3b3bf; font-size: 15px; }
.fr-chat-sugerencias { display: flex; flex-wrap: wrap; gap: 8px; }
body .fr-chat .fr-chat-sugerencias button { min-height: 44px; padding: 8px 12px; border: 1px solid #263645; border-radius: 6px; cursor: pointer; color: #eef3f6; background: transparent; font: 600 15px/1.2 "Barlow", system-ui, sans-serif; text-align: start; }
body .fr-chat .fr-chat-sugerencias button:hover, body .fr-chat .fr-chat-sugerencias button:focus { color: #eef3f6; background: transparent; border-color: #f5b800; }
.fr-chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid #263645; background: #132130; }
.fr-chat-form textarea { flex: 1; min-height: 44px; max-height: 120px; padding: 10px 12px; resize: none; border: 1px solid #263645; border-radius: 6px; color: #eef3f6; background: #0f1a24; font: inherit; }
.fr-chat-form textarea::placeholder { color: #a3b3bf; }
body .fr-chat .fr-chat-enviar { flex: none; min-width: 44px; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 6px; cursor: pointer; color: #14202b; background: #f5b800; font: 600 16px/1.2 "Barlow Semi Condensed", "Barlow", system-ui, sans-serif; }
body .fr-chat .fr-chat-enviar:hover, body .fr-chat .fr-chat-enviar:focus { color: #14202b; background: #ffcb2e; }
body .fr-chat .fr-chat-enviar:disabled { opacity: .6; cursor: not-allowed; }
.fr-oculto { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 480px) {
	.fr-chat { right: 16px; left: 16px; bottom: 16px; width: auto; height: calc(100vh - 32px); }
	.fr-chat-abrir { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: no-preference) {
	.fr-chat { animation: fr-chat-entra .18s ease-out; }
	@keyframes fr-chat-entra { from { opacity: 0; } to { opacity: 1; } }
}
