/* CONACO — Asistente virtual */
.cna {
	--a-mag: #BB358B;
	--a-mag-d: #8E2268;
	--a-plum: #3B1431;
	--a-blush: #FBF2F7;
	--a-line: #EEDFE8;
	--a-ink: #2B2A2B;
	--a-gray: #535453;
	font-family: "Jost", "Helvetica Neue", Arial, sans-serif;
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9990;
}

.cna .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}

/* ---------- Botón flotante ---------- */
.cna .cna-launcher {
	position: relative;
	display: grid;
	place-items: center;
	width: 66px;
	height: 66px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(140deg, #D04FA0 0%, var(--a-mag) 45%, var(--a-mag-d) 100%);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 14px 34px -10px rgba(187, 53, 139, .75), 0 4px 10px rgba(59, 20, 49, .2);
	transition: transform .3s cubic-bezier(.2, .8, .2, 1.2), box-shadow .3s;
}

.cna .cna-launcher:hover { transform: scale(1.07); }

.cna .cna-launcher__icon {
	width: 34px;
	height: 34px;
	object-fit: contain;
	animation: cna-spin 14s linear infinite;
	transition: opacity .25s, transform .25s;
}

.cna .cna-launcher__close {
	position: absolute;
	width: 24px;
	height: 24px;
	opacity: 0;
	transform: rotate(-90deg) scale(.5);
	transition: opacity .25s, transform .25s;
}

.cna.is-open .cna-launcher__icon { opacity: 0; transform: scale(.4); }
.cna.is-open .cna-launcher__close { opacity: 1; transform: none; }

.cna .cna-launcher__pulse {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid var(--a-mag);
	animation: cna-pulse 2.6s ease-out infinite;
	pointer-events: none;
}

.cna.is-open .cna-launcher__pulse { display: none; }

@keyframes cna-pulse {
	0% { transform: scale(1); opacity: .7; }
	100% { transform: scale(1.7); opacity: 0; }
}

@keyframes cna-spin {
	to { transform: rotate(360deg); }
}

/* ---------- Mensaje de invitación ---------- */
.cna-teaser {
	position: absolute;
	right: 82px;
	bottom: 4px;
	width: 270px;
	padding: 16px 38px 16px 18px;
	border-radius: 18px 18px 4px 18px;
	background: #fff;
	color: var(--a-gray);
	font-size: 14.5px;
	line-height: 1.5;
	box-shadow: 0 20px 40px -16px rgba(59, 20, 49, .35);
	cursor: pointer;
	animation: cna-in .5s cubic-bezier(.2, .8, .2, 1.1) both;
}

.cna-teaser[hidden] { display: none; }
.cna-teaser p { margin: 0; }
.cna-teaser strong { color: var(--a-mag); }

.cna .cna-teaser__close {
	position: absolute;
	right: 8px;
	top: 6px;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #9b9599;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

/* ---------- Panel ---------- */
.cna-panel {
	position: absolute;
	right: 0;
	bottom: 84px;
	display: flex;
	flex-direction: column;
	width: 390px;
	height: min(620px, calc(100vh - 140px));
	overflow: hidden;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 30px 80px -20px rgba(59, 20, 49, .45), 0 0 0 1px rgba(59, 20, 49, .05);
	transform-origin: bottom right;
	animation: cna-in .4s cubic-bezier(.2, .8, .2, 1.05) both;
}

.cna-panel[hidden] { display: none; }

@keyframes cna-in {
	from { opacity: 0; transform: translateY(16px) scale(.94); }
	to { opacity: 1; transform: none; }
}

.cna-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 16px 18px 20px;
	overflow: hidden;
	background: linear-gradient(120deg, var(--a-plum) 0%, #6A1F55 55%, var(--a-mag) 100%);
	color: #fff;
}

.cna-head::after {
	content: "";
	position: absolute;
	right: -40px;
	top: -50px;
	width: 160px;
	height: 160px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(247, 202, 172, .35), transparent 70%);
}

.cna-head__avatar {
	display: grid;
	place-items: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.cna-head__avatar img { width: 26px; height: 26px; object-fit: contain; }

.cna-head__txt { flex: 1; min-width: 0; position: relative; z-index: 1; }

.cna-head__txt strong {
	display: block;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.1;
}

.cna-head__txt span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	opacity: .85;
}

.cna-head__txt i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #5BE39B;
	box-shadow: 0 0 0 3px rgba(91, 227, 155, .25);
}

.cna .cna-head__btn {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	cursor: pointer;
	transition: background .2s;
}

.cna .cna-head__btn:hover { background: rgba(255, 255, 255, .22); }
.cna .cna-head__btn svg { width: 18px; height: 18px; }

/* ---------- Mensajes ---------- */
.cna-body {
	flex: 1;
	overflow-y: auto;
	padding: 20px 16px 8px;
	background:
		radial-gradient(circle at 100% 0, rgba(187, 53, 139, .05), transparent 40%),
		var(--a-blush);
	scroll-behavior: smooth;
}

.cna-msg {
	display: flex;
	margin-bottom: 12px;
}

.cna-msg.is-new { animation: cna-msg .35s ease both; }

@keyframes cna-msg {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.cna-msg--user { justify-content: flex-end; }

.cna-msg__b {
	max-width: 86%;
	padding: 12px 15px;
	border-radius: 18px;
	font-size: 14.5px;
	line-height: 1.55;
	word-wrap: break-word;
}

.cna-msg--bot .cna-msg__b {
	background: #fff;
	color: var(--a-ink);
	border-bottom-left-radius: 6px;
	box-shadow: 0 2px 8px -4px rgba(59, 20, 49, .15);
}

.cna-msg--user .cna-msg__b {
	background: linear-gradient(135deg, var(--a-mag), var(--a-mag-d));
	color: #fff;
	border-bottom-right-radius: 6px;
}

.cna-msg__b p { margin: 0 0 6px; }
.cna-msg__b p:last-child { margin-bottom: 0; }
.cna-msg__b ul, .cna-msg__b ol { margin: 4px 0 8px; padding-left: 20px; }
.cna-msg__b li { margin: 2px 0; }
.cna-msg__b strong { font-weight: 600; }
.cna-msg--bot .cna-msg__b strong { color: var(--a-mag-d); }
.cna-msg__b a { color: var(--a-mag); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.cna-msg--user .cna-msg__b a { color: #fff; }

.cna-typing .cna-msg__b {
	display: inline-flex;
	gap: 5px;
	padding: 15px 18px;
}

.cna-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--a-mag);
	animation: cna-dot 1.2s infinite ease-in-out;
}

.cna-typing span:nth-child(2) { animation-delay: .15s; }
.cna-typing span:nth-child(3) { animation-delay: .3s; }

@keyframes cna-dot {
	0%, 60%, 100% { transform: translateY(0); opacity: .35; }
	30% { transform: translateY(-5px); opacity: 1; }
}

/* ---------- Sugerencias ---------- */
.cna-chips {
	display: flex;
	gap: 8px;
	padding: 0 16px;
	overflow-x: auto;
	background: var(--a-blush);
	scrollbar-width: none;
}

.cna-chips:not(:empty) { padding-bottom: 12px; }
.cna-chips::-webkit-scrollbar { display: none; }

.cna .cna-chips button {
	flex: 0 0 auto;
	padding: 8px 14px;
	border: 1px solid rgba(187, 53, 139, .35);
	border-radius: 999px;
	background: #fff;
	color: var(--a-mag);
	font: 500 13px/1.2 inherit;
	font-family: inherit;
	cursor: pointer;
	animation: cna-msg .4s ease both;
	transition: background .2s, color .2s;
}

.cna .cna-chips button:hover { background: var(--a-mag); color: #fff; }

/* ---------- Entrada ---------- */
.cna-form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin: 0;
	padding: 12px 12px 6px;
	border-top: 1px solid var(--a-line);
	background: #fff;
}

.cna .cna-form textarea {
	flex: 1;
	min-height: 44px;
	max-height: 120px;
	padding: 11px 14px;
	border: 1px solid var(--a-line);
	border-radius: 14px;
	background: #fff;
	color: var(--a-ink);
	font: 400 14.5px/1.45 inherit;
	font-family: inherit;
	resize: none;
}

.cna .cna-form textarea:focus {
	outline: none;
	border-color: var(--a-mag);
	box-shadow: 0 0 0 3px rgba(187, 53, 139, .12);
}

.cna .cna-form button {
	display: grid;
	place-items: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: var(--a-mag);
	color: #fff;
	cursor: pointer;
	transition: background .2s, transform .2s;
}

.cna .cna-form button:hover { background: var(--a-mag-d); transform: translateY(-1px); }
.cna .cna-form button svg { width: 20px; height: 20px; }

.cna-foot {
	margin: 0;
	padding: 2px 12px 10px;
	background: #fff;
	color: #9b9599;
	font-size: 11px;
	text-align: center;
}

/* ---------- Móvil ---------- */
@media (max-width: 520px) {
	.cna { right: 16px; bottom: 16px; }
	.cna .cna-launcher { width: 60px; height: 60px; }
	.cna-teaser { width: calc(100vw - 108px); right: 72px; bottom: 0; }

	.cna-panel {
		position: fixed;
		inset: 0;
		width: auto;
		height: auto;
		border-radius: 0;
	}

	.cna.is-open .cna-launcher { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.cna *, .cna *::before, .cna *::after { animation: none !important; transition: none !important; }
}

.cna .cna-teaser__close:hover,
.cna .cna-teaser__close:focus { background: transparent; color: var(--a-mag); }
