/* Abajo a la izquierda (Joinchat se desactiva; a la derecha queda la pestaña de Complianz). Por debajo del banner de Complianz. */
.edra-asis {
	--ea-negro: #111;
	--ea-gris: #f2f2f2;
	--ea-borde: #dcdcdc;
	--ea-texto: #222;
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 9990;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.45;
	color: var(--ea-texto);
}

.edra-asis *,
.edra-asis *::before,
.edra-asis *::after {
	box-sizing: border-box;
}

.edra-asis .edra-asis__lanzador {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 auto 0 0;
	padding: 0 20px 0 16px;
	height: 52px;
	border: 0;
	border-radius: 26px;
	background: var(--ea-negro);
	color: #fff;
	font: inherit;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: none;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}

.edra-asis .edra-asis__lanzador svg {
	width: 24px;
	height: 24px;
	flex: none;
}

.edra-asis .edra-asis__lanzador:hover {
	background: #333;
}

.edra-asis.edra-asis--abierto .edra-asis__lanzador {
	display: none;
}

.edra-asis button:focus-visible,
.edra-asis a:focus-visible,
.edra-asis input:focus-visible {
	outline: 2px solid var(--ea-negro);
	outline-offset: 2px;
}

.edra-asis .edra-asis__lanzador:focus-visible {
	outline-color: #fff;
	box-shadow: 0 0 0 4px var(--ea-negro);
}

.edra-asis .edra-asis__panel {
	display: flex;
	flex-direction: column;
	width: 370px;
	height: min(600px, calc(100vh - 40px));
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
	overflow: hidden;
}

.edra-asis .edra-asis__panel[hidden] {
	display: none;
}

.edra-asis .edra-asis__cabecera {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--ea-negro);
	color: #fff;
}

.edra-asis .edra-asis__avatar {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #fff;
	color: var(--ea-negro);
	font-weight: 800;
	font-size: 18px;
	flex: none;
}

.edra-asis .edra-asis__titulo {
	margin: 0;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	text-transform: none;
	letter-spacing: 0;
}

.edra-asis .edra-asis__subtitulo {
	margin: 0;
	font-size: 12px;
	color: #c8c8c8;
}

.edra-asis .edra-asis__cerrar {
	margin-left: auto;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.edra-asis .edra-asis__cerrar:hover {
	background: rgba(255, 255, 255, .15);
}

.edra-asis .edra-asis__cerrar:focus-visible {
	outline-color: #fff;
}

.edra-asis .edra-asis__mensajes {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #fafafa;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.edra-asis .edra-asis__msg {
	max-width: 88%;
	padding: 10px 14px;
	border-radius: 14px;
}

.edra-asis .edra-asis__msg p {
	margin: 0;
	font-size: 14.5px;
	color: inherit;
}

.edra-asis .edra-asis__msg p + p {
	margin-top: 6px;
}

.edra-asis .edra-asis__msg--bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid var(--ea-borde);
	border-bottom-left-radius: 4px;
}

.edra-asis .edra-asis__msg--usuario {
	align-self: flex-end;
	background: var(--ea-negro);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.edra-asis .edra-asis__acciones {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.edra-asis .edra-asis__accion {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 16px;
	background: var(--ea-negro);
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
}

.edra-asis .edra-asis__accion:hover {
	background: #333;
}

.edra-asis .edra-asis__opciones {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.edra-asis .edra-asis__opcion {
	display: inline-block;
	padding: 7px 12px;
	border: 1px solid var(--ea-negro);
	border-radius: 16px;
	background: #fff;
	color: var(--ea-negro) !important;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

.edra-asis .edra-asis__opcion:hover {
	background: var(--ea-gris);
}

.edra-asis .edra-asis__opcion--wa {
	border-color: #1f8f4e;
	color: #1f6f3f !important;
}

.edra-asis .edra-asis__escribiendo {
	display: flex;
	gap: 4px;
	padding: 14px;
}

.edra-asis .edra-asis__escribiendo span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #999;
	animation: edra-asis-punto 1s infinite ease-in-out;
}

.edra-asis .edra-asis__escribiendo span:nth-child(2) { animation-delay: .15s; }
.edra-asis .edra-asis__escribiendo span:nth-child(3) { animation-delay: .3s; }

@keyframes edra-asis-punto {
	0%, 80%, 100% { opacity: .3; }
	40% { opacity: 1; }
}

.edra-asis .edra-asis__form {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 10px 12px;
	border-top: 1px solid var(--ea-borde);
	background: #fff;
}

.edra-asis .edra-asis__entrada {
	flex: 1;
	min-width: 0;
	height: 40px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--ea-borde);
	border-radius: 20px;
	background: #fff;
	color: var(--ea-texto);
	font: inherit;
	font-size: 16px;
}

.edra-asis .edra-asis__enviar {
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ea-negro);
	color: #fff;
	cursor: pointer;
	flex: none;
}

.edra-asis .edra-asis__enviar svg {
	width: 18px;
	height: 18px;
	display: block;
	margin: auto;
}

.edra-asis .edra-asis__pie {
	padding: 8px 12px 10px;
	border-top: 1px solid var(--ea-borde);
	background: #fff;
	text-align: center;
	font-size: 11px;
	color: #555;
}

.edra-asis .edra-asis__pie img {
	display: block;
	width: 190px;
	height: auto;
	margin: 0 auto 4px;
}

.edra-asis .edra-asis__oculto {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (max-width: 600px) {
	.edra-asis {
		left: 12px;
		bottom: 12px;
	}

	.edra-asis .edra-asis__lanzador {
		width: 52px;
		padding: 0;
		justify-content: center;
	}

	.edra-asis .edra-asis__lanzador-texto {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.edra-asis.edra-asis--abierto {
		left: 0;
		right: 0;
		bottom: 0;
	}

	.edra-asis .edra-asis__panel {
		width: 100%;
		height: min(85vh, 640px);
		border-radius: 14px 14px 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.edra-asis .edra-asis__escribiendo span {
		animation: none;
	}
}
