/* Hispanaweb AI Agent — widget de chat (paleta del rediseño) */
#hwai-root {
	--hwai-blue: #1E4FA0;
	--hwai-sky: #38B3E7;
	--hwai-navy: #0B2450;
	--hwai-violet: #7C5CFC;
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99999;
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#hwai-bubble {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	color: #fff;
	background: linear-gradient(135deg, var(--hwai-blue), var(--hwai-violet));
	box-shadow: 0 8px 24px rgba(11, 36, 80, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}
#hwai-bubble:hover { transform: scale(1.07); }
#hwai-bubble.hwai-open { background: var(--hwai-navy); }

#hwai-panel[hidden] { display: none !important; }

#hwai-panel {
	position: absolute;
	right: 0;
	bottom: 72px;
	width: 340px;
	max-width: calc(100vw - 44px);
	height: 460px;
	max-height: calc(100vh - 130px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 16px 48px rgba(11, 36, 80, 0.28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#hwai-header {
	background: linear-gradient(135deg, var(--hwai-blue), var(--hwai-violet));
	color: #fff;
	padding: 14px 16px;
	font-weight: 700;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
#hwai-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
}

#hwai-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f5f8fd;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.hwai-msg {
	max-width: 84%;
	padding: 9px 13px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.hwai-user {
	align-self: flex-end;
	background: var(--hwai-blue);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.hwai-bot {
	align-self: flex-start;
	background: #fff;
	color: #1a2b4a;
	border: 1px solid #e3eaf5;
	border-bottom-left-radius: 4px;
}
#hwai-examples {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	margin-top: 2px;
}
.hwai-chip {
	background: #fff;
	border: 1px solid var(--hwai-sky);
	color: var(--hwai-blue);
	border-radius: 999px;
	padding: 7px 14px;
	font-size: 13px;
	font-family: inherit;
	line-height: 1.3;
	cursor: pointer;
	text-align: left;
	transition: background 0.15s ease, color 0.15s ease;
}
.hwai-chip:hover {
	background: var(--hwai-blue);
	border-color: var(--hwai-blue);
	color: #fff;
}

.hwai-typing { opacity: 0.6; animation: hwai-pulse 1s infinite; }
@keyframes hwai-pulse { 50% { opacity: 0.25; } }

#hwai-form {
	display: flex;
	border-top: 1px solid #e3eaf5;
	background: #fff;
}
#hwai-input {
	flex: 1;
	border: none;
	outline: none;
	padding: 13px 14px;
	font-size: 14px;
	font-family: inherit;
	background: transparent;
	color: #1a2b4a;
}
#hwai-form button {
	border: none;
	background: none;
	color: var(--hwai-sky);
	font-size: 17px;
	padding: 0 16px;
	cursor: pointer;
}

@media (max-width: 480px) {
	#hwai-panel { width: calc(100vw - 44px); height: 60vh; }
}
