@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
}

/*
 * Chat del asistente (22/11): ventana más grande, burbujas de conversación, una sola fila para escribir
 * (texto, micrófono y enviar) y el consentimiento que desaparece al aceptarlo. En el celular ocupa toda la pantalla.
 */
.ga-chat, .ga-chat * { box-sizing: border-box; }
.ga-chat {
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 100000;
	font: 400 16px/1.5 "Inter", system-ui, sans-serif;
	color: #0B2545;
	text-align: left;
}
.ga-chat button, .ga-chat textarea, .ga-chat input, .ga-chat a { font: inherit; }
.ga-chat button, .ga-chat a { touch-action: manipulation; }
.ga-chat button { cursor: pointer; border: 0; }
.ga-chat :focus-visible { outline: 3px solid #0B2545; outline-offset: 3px; }
.ga-chat svg { display: block; flex-shrink: 0; }
.ga-chat__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; }

/* Botón para abrir */
.ga-chat__abrir {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 56px;
	padding: 12px 20px 12px 16px;
	border-radius: 28px;
	background: #007BC1;
	color: #FFFFFF;
	font-weight: 700 !important;
	box-shadow: 0 6px 20px rgba(11, 37, 69, .28);
	transition: background-color 150ms ease, transform 150ms ease;
}
.ga-chat__abrir:hover { background: #0067A3; color: #FFFFFF; transform: translateY(-1px); }
.ga-chat--abierto .ga-chat__abrir { background: #0B2545; }

/* Ventana */
.ga-chat__panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + 12px);
	display: flex;
	flex-direction: column;
	width: min(400px, calc(100vw - 32px));
	height: min(640px, calc(100vh - 110px));
	height: min(640px, calc(100dvh - 110px));
	overflow: hidden;
	border: 1px solid #DDE3EA;
	border-radius: 18px;
	background: #FFFFFF;
	box-shadow: 0 16px 48px rgba(11, 37, 69, .25);
}
.ga-chat__panel[hidden] { display: none !important; }
body.admin-bar .ga-chat__panel { max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
@media (prefers-reduced-motion: no-preference) {
	.ga-chat__panel:not([hidden]) { animation: ga-chat-entra 180ms ease-out; }
}
@keyframes ga-chat-entra { from { opacity: 0; transform: translateY(8px); } }

.ga-chat__cabecera {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
	padding: 12px 10px 12px 16px;
	background: #0B2545;
	color: #FFFFFF;
}
.ga-chat__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #007BC1;
	color: #FFFFFF;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: .5px;
}
.ga-chat__cab-textos { flex: 1; min-width: 0; }
.ga-chat .ga-chat__titulo { margin: 0; font: 700 17px/1.3 "Inter", system-ui, sans-serif; color: #FFFFFF; }
.ga-chat .ga-chat__subtitulo { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: #C9D8E8; }
.ga-chat__cerrar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: transparent;
	color: #FFFFFF;
}
.ga-chat__cerrar:hover { background: rgba(255, 255, 255, .14); color: #FFFFFF; }
.ga-chat__cerrar:focus-visible { outline-color: #FFFFFF; outline-offset: 0; }

/* Conversación */
.ga-chat .ga-chat__mensajes {
	flex: 1 1 auto;
	min-height: 120px;
	overflow-y: auto;
	overscroll-behavior: contain;
	list-style: none;
	margin: 0;
	padding: 16px 14px 8px;
	background: #F3F7FA;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ga-chat__mensaje {
	align-self: flex-start;
	max-width: 88%;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid #DDE3EA;
	border-radius: 18px 18px 18px 6px;
	background: #FFFFFF;
	overflow-wrap: anywhere;
	box-shadow: 0 1px 2px rgba(11, 37, 69, .05);
}
.ga-chat__mensaje--propio {
	align-self: flex-end;
	border-color: #007BC1;
	border-radius: 18px 18px 6px 18px;
	background: #007BC1;
	color: #FFFFFF;
}
.ga-chat .ga-chat__texto { margin: 0; white-space: pre-wrap; font-size: 15px; line-height: 1.5; }
.ga-chat__acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ga-chat .ga-chat__accion {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid #007BC1;
	border-radius: 22px;
	background: #FFFFFF;
	color: #0067A3;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}
.ga-chat .ga-chat__accion:hover { background: #E8F3FA; color: #0B2545; }
.ga-chat .ga-chat__accion--whatsapp { border-color: #15803D; color: #15803D; }
.ga-chat .ga-chat__accion--principal { width: 100%; border: 2px solid #15803D; background: #15803D; color: #FFFFFF; font-weight: 700; }
.ga-chat .ga-chat__accion--principal:hover { background: #116530; color: #FFFFFF; }

/* Escuchar: lee la respuesta en voz alta con la voz del celular o la compu. */
.ga-chat .ga-chat__escuchar {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	min-width: 44px;
	margin: 6px 0 -6px -8px;
	padding: 0 10px;
	border-radius: 22px;
	background: transparent;
	color: #0067A3;
	font-size: 13px;
	font-weight: 600;
}
.ga-chat .ga-chat__escuchar svg { width: 18px; height: 18px; }
.ga-chat .ga-chat__escuchar:hover { background: #E8F3FA; }
.ga-chat .ga-chat__escuchar[aria-pressed="true"] { background: #E8F3FA; color: #0B2545; }

/* Preguntas para empezar */
.ga-chat__sugerencias { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; padding: 0; }
.ga-chat .ga-chat__sugerencia {
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid #B9CBDD;
	border-radius: 22px;
	background: #FFFFFF;
	color: #0B2545;
	font-size: 14px;
	font-weight: 500;
	text-align: left;
}
.ga-chat .ga-chat__sugerencia:hover { border-color: #007BC1; background: #E8F3FA; }
.ga-chat__opciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* «Escribiendo…» */
.ga-chat__escribiendo { align-self: flex-start; display: inline-flex; gap: 5px; padding: 14px 16px; border: 1px solid #DDE3EA; border-radius: 18px 18px 18px 6px; background: #FFFFFF; }
.ga-chat__escribiendo span { width: 8px; height: 8px; border-radius: 50%; background: #7C8FA3; }
@media (prefers-reduced-motion: no-preference) {
	.ga-chat__escribiendo span { animation: ga-chat-punto 1s ease-in-out infinite; }
	.ga-chat__escribiendo span:nth-child(2) { animation-delay: .15s; }
	.ga-chat__escribiendo span:nth-child(3) { animation-delay: .3s; }
}
@keyframes ga-chat-punto { 50% { opacity: .35; transform: translateY(-3px); } }

/* Avisos: el progreso solo lo oye el lector de pantalla; los avisos para el cliente se ven. */
.ga-chat .ga-chat__estado { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
.ga-chat .ga-chat__estado--aviso { position: static; width: auto; height: auto; clip: auto; flex-shrink: 0; padding: 8px 16px; background: #FFF7E6; color: #7A4B00; font-size: 13px; border-top: 1px solid #F5D9A8; }

/* Escribir */
.ga-chat__formulario { flex-shrink: 0; margin: 0; padding: 8px 12px 12px; border-top: 1px solid #DDE3EA; background: #FFFFFF; }
.ga-chat__consentimiento {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 10px;
	min-height: 44px;
	margin: 0 0 6px;
	padding: 4px 10px;
	border-radius: 10px;
	background: #F3F7FA;
	font-size: 13px;
}
.ga-chat__consentimiento[hidden] { display: none; }
.ga-chat__consentimiento input { flex-shrink: 0; width: 20px; height: 20px; margin: 0; accent-color: #007BC1; }
.ga-chat__consentimiento label { flex: 1; cursor: pointer; margin: 0; padding: 8px 0; }
.ga-chat .ga-chat__politica { display: inline-flex; align-items: center; min-height: 44px; color: #0067A3; font-size: 13px; text-decoration: underline; }
.ga-chat .ga-chat__ayuda { margin: 0 2px 6px; color: #5B6B7B; font-size: 12px; }
.ga-chat__fila { display: flex; align-items: flex-end; gap: 8px; }
.ga-chat .ga-chat__consulta {
	flex: 1;
	overflow-y: hidden;
	min-width: 0;
	min-height: 48px;
	max-height: 132px;
	resize: none;
	padding: 12px 14px;
	border: 1px solid #9AA8B6;
	border-radius: 24px;
	background: #FFFFFF;
	color: #0B2545;
	font-size: 16px;
	line-height: 1.4;
}
.ga-chat .ga-chat__consulta:focus { border-color: #007BC1; outline: none; box-shadow: 0 0 0 3px rgba(0, 123, 193, .25); }
.ga-chat__consulta::placeholder { color: #5B6B7B; opacity: 1; }
/* Astra pone 20px 40px de relleno a todos los botones: aquí se quita para que queden redondos. */
.ga-chat .ga-chat__cerrar, .ga-chat .ga-chat__hablar, .ga-chat .ga-chat__enviar { padding: 0; }
.ga-chat__enviar, .ga-chat .ga-chat__hablar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	transition: background-color 150ms ease;
}
.ga-chat__enviar { background: #007BC1; color: #FFFFFF; }
.ga-chat__enviar:hover { background: #0067A3; color: #FFFFFF; }
.ga-chat__enviar:disabled { background: #94A3B8; color: #FFFFFF; cursor: wait; }
.ga-chat .ga-chat__hablar { border: 1px solid #15803D; background: #FFFFFF; color: #15803D; }
.ga-chat .ga-chat__hablar:hover { background: #ECFDF3; }
.ga-chat .ga-chat__hablar[aria-pressed="true"] { background: #15803D; color: #FFFFFF; }
@media (prefers-reduced-motion: no-preference) {
	.ga-chat .ga-chat__hablar[aria-pressed="true"] { animation: ga-chat-escucha 1.2s ease-in-out infinite; }
}
@keyframes ga-chat-escucha { 50% { box-shadow: 0 0 0 6px rgba(21, 128, 61, .25); } }
.ga-chat [aria-invalid="true"] { outline: 2px solid #9B1C1C; outline-offset: 2px; }

/* Mientras se llena un formulario en el celular, el botón del chat se aparta. */
@media (max-width: 767px) {
	.ga-chat--escondido:not(.ga-chat--abierto) .ga-chat__abrir { opacity: 0; visibility: hidden; transform: translateY(24px); pointer-events: none; transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms; }
}

@media (prefers-reduced-motion: reduce) {
	.ga-chat *, .ga-chat *::before, .ga-chat *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Celular: el chat ocupa toda la pantalla, como una app de mensajes. */
@media (max-width: 600px) {
	body.ga-con-chat { padding-bottom: 88px; }
	.ga-chat__panel {
		position: fixed;
		inset: 0;
		width: 100%;
		height: 100%;
		height: 100dvh;
		max-height: none !important;
		border: 0;
		border-radius: 0;
		padding-bottom: env(safe-area-inset-bottom);
	}
	.ga-chat--abierto .ga-chat__abrir { visibility: hidden; }
	/* Páginas con formulario: solo el ícono, para tapar menos (el nombre sigue en aria-label). */
	.ga-chat--compacto:not(.ga-chat--abierto) .ga-chat__abrir { width: 56px; padding: 0; justify-content: center; }
	.ga-chat--compacto:not(.ga-chat--abierto) .ga-chat__abrir > span { display: none; }
	.ga-chat__cabecera { padding-top: max(12px, env(safe-area-inset-top)); }
	html.ga-chat-pantalla, html.ga-chat-pantalla body { overflow: hidden; }
}
