/**
 * El botón flotante de WhatsApp.
 *
 * Replica lo que hacía Joinchat con su misma configuración: botón verde
 * abajo a la izquierda, globo con el saludo, y la etiqueta «Atención 24/7».
 */

.fs-chat {
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: 99998;
	font-family: inherit;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .28s ease, transform .28s ease, visibility .28s;
}

.fs-chat.es-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

/* ---- El botón ---- */
.fs-chat__boton {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #25D366;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(13, 40, 26, .28);
	transition: transform .18s ease, box-shadow .18s ease;
}

.fs-chat__boton:hover,
.fs-chat__boton:focus-visible {
	transform: scale(1.06);
	box-shadow: 0 6px 20px rgba(13, 40, 26, .34);
	outline: none;
}

.fs-chat__boton svg {
	width: 32px;
	height: 32px;
	fill: #fff;
}

/* El contador rojo, igual que el que había. */
.fs-chat__marca {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: #E5372B;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	box-sizing: border-box;
}

.fs-chat__marca[hidden] { display: none; }

/* ---- La etiqueta «Atención 24/7» ---- */
.fs-chat__tip {
	position: absolute;
	left: 70px;
	bottom: 14px;
	white-space: nowrap;
	padding: 8px 15px;
	border-radius: 999px;
	background: #fff;
	color: #0D281A;
	font-size: 14px;
	font-weight: 500;
	box-shadow: 0 3px 12px rgba(13, 40, 26, .16);
	pointer-events: none;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity .25s ease, transform .25s ease;
}

.fs-chat.es-tip .fs-chat__tip {
	opacity: 1;
	transform: none;
}

/* ---- El globo del saludo ---- */
.fs-chat__globo {
	position: absolute;
	left: 0;
	bottom: 72px;
	width: min(300px, calc(100vw - 40px));
	padding: 18px 20px 16px;
	border-radius: 16px 16px 16px 4px;
	background: #fff;
	box-shadow: 0 10px 34px rgba(13, 40, 26, .22);
	text-align: left;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .24s ease, transform .24s ease, visibility .24s;
}

.fs-chat.es-abierto .fs-chat__globo {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.fs-chat__texto {
	margin: 0 0 14px;
	color: #3A3A3A;
	font-size: 15px;
	line-height: 1.5;
	white-space: pre-line;
}

.fs-chat__ir {
	display: inline-block;
	padding: 11px 22px;
	border-radius: 999px;
	background: #25D366;
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none !important;
}

.fs-chat__cerrar {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #9A9A92;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.fs-chat__cerrar:hover { color: #0D281A; }

@media (max-width: 560px) {
	.fs-chat { left: 14px; bottom: 14px; }
	/* En móvil la etiqueta ocuparía media pantalla: se deja sólo el botón. */
	.fs-chat__tip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.fs-chat,
	.fs-chat__boton,
	.fs-chat__globo,
	.fs-chat__tip { transition: none; }
}
