#chat-ia-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9999;
	font-family: 'Open Sans', Arial, sans-serif;
}

.chat-ia-boton {
	height: 52px;
	min-width: 52px;
	border-radius: 26px;
	background: #9E34DB;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	border: none;
	color: #fff;
	font-size: 20px;
	padding: 0 18px;
}

.chat-ia-boton:hover {
	background: #7f27b0;
}

.chat-ia-boton-texto {
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.chat-ia-invitacion {
	position: absolute;
	right: 130px;
	bottom: 4px;
	width: 220px;
	background: #fff;
	border-radius: 14px;
	border-bottom-right-radius: 4px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
	padding: 12px 26px 12px 14px;
	opacity: 0;
	transform: translateY(6px);
	pointer-events: none;
	transition: opacity 250ms ease, transform 250ms ease;
}

.chat-ia-invitacion.chat-ia-invitacion-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.chat-ia-invitacion p {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.4;
	color: #3f3546;
}

.chat-ia-invitacion-cerrar {
	position: absolute;
	top: 4px;
	right: 6px;
	background: none;
	border: none;
	color: #b3a7bd;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	padding: 2px;
}

.chat-ia-invitacion-cerrar:hover {
	color: #7f27b0;
}

@media (max-width: 600px) {
	.chat-ia-invitacion {
		position: fixed;
		right: 10px;
		left: 10px;
		bottom: 78px;
		width: auto;
	}
}

.chat-ia-panel {
	display: none;
	position: fixed;
	right: 20px;
	bottom: 92px;
	width: 340px;
	max-width: calc(100vw - 40px);
	height: 460px;
	max-height: calc(100vh - 140px);
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
	flex-direction: column;
	overflow: hidden;
}

.chat-ia-panel.chat-ia-abierto {
	display: flex;
}

.chat-ia-cabecera {
	background: #9E34DB;
	color: #fff;
	padding: 14px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.chat-ia-cabecera-marca {
	display: flex;
	align-items: center;
	gap: 10px;
}

.chat-ia-cabecera-logo {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	object-fit: cover;
	flex-shrink: 0;
}

.chat-ia-cabecera-titulo {
	font-weight: bold;
	font-size: 15px;
}

.chat-ia-cabecera-subtitulo {
	font-size: 11px;
	opacity: 0.85;
}

.chat-ia-cerrar {
	background: none;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
}

.chat-ia-mensajes {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	background: #f7f2fa;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.chat-ia-burbuja {
	max-width: 80%;
	padding: 8px 12px;
	border-radius: 12px;
	font-size: 13px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-break: break-word;
}

.chat-ia-burbuja-visitante {
	align-self: flex-end;
	background: #9E34DB;
	color: #fff;
	border-bottom-right-radius: 2px;
}

.chat-ia-burbuja-agente {
	align-self: flex-start;
	background: #fff;
	color: #333;
	border: 1px solid #e6dfeb;
	border-bottom-left-radius: 2px;
}

.chat-ia-escribiendo {
	align-self: flex-start;
	font-size: 12px;
	color: #999;
	font-style: italic;
}

.chat-ia-formulario {
	display: flex;
	border-top: 1px solid #eee;
	padding: 8px;
	gap: 8px;
}

.chat-ia-input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 8px 14px;
	font-size: 13px;
	color: #1a1a1a;
	resize: none;
	outline: none;
}

.chat-ia-input::placeholder {
	color: #999;
}

.chat-ia-enviar {
	background: #9E34DB;
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 38px;
	height: 38px;
	cursor: pointer;
	flex-shrink: 0;
}

.chat-ia-enviar:disabled {
	opacity: 0.6;
	cursor: default;
}

@media (max-width: 600px) {
	.chat-ia-panel {
		right: 10px;
		left: 10px;
		width: auto;
	}
}
