#nuesa-faq-root {
	--nuesa-primary: #0b5cab;
	--nuesa-primary-text: #ffffff;
	position: fixed;
	bottom: 22px;
	z-index: 2147483647; /* max safe z-index — sits above preloaders, popups, and sliders */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#nuesa-faq-root.nuesa-pos-right { right: 22px; }
#nuesa-faq-root.nuesa-pos-left { left: 22px; }

.nuesa-faq-launcher {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: var(--nuesa-primary);
	color: var(--nuesa-primary-text);
	border: none;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}
.nuesa-faq-launcher:hover { transform: scale(1.06); }
.nuesa-faq-launcher svg { width: 26px; height: 26px; }

.nuesa-faq-panel {
	position: absolute;
	bottom: 74px;
	width: 340px;
	max-width: calc(100vw - 44px);
	height: 480px;
	max-height: 70vh;
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
	display: none;
	flex-direction: column;
	overflow: hidden;
}
#nuesa-faq-root.nuesa-pos-right .nuesa-faq-panel { right: 0; }
#nuesa-faq-root.nuesa-pos-left .nuesa-faq-panel { left: 0; }
.nuesa-faq-panel.nuesa-open { display: flex; }

.nuesa-faq-header {
	background: var(--nuesa-primary);
	color: var(--nuesa-primary-text);
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.nuesa-faq-header-title { font-weight: 600; font-size: 15px; }
.nuesa-faq-header-sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.nuesa-faq-close {
	background: transparent;
	border: none;
	color: inherit;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	padding: 4px;
}

.nuesa-faq-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #f7f8fa;
}

.nuesa-faq-msg {
	max-width: 82%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 13.5px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.nuesa-faq-msg.assistant {
	background: #ffffff;
	border: 1px solid #e4e6ea;
	color: #1f2328;
	align-self: flex-start;
	border-bottom-left-radius: 3px;
}
.nuesa-faq-msg.user {
	background: var(--nuesa-primary);
	color: var(--nuesa-primary-text);
	align-self: flex-end;
	border-bottom-right-radius: 3px;
}

.nuesa-faq-typing {
	align-self: flex-start;
	display: flex;
	gap: 4px;
	padding: 10px 12px;
	background: #ffffff;
	border: 1px solid #e4e6ea;
	border-radius: 12px;
	border-bottom-left-radius: 3px;
}
.nuesa-faq-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #9aa1a9;
	animation: nuesa-faq-bounce 1.2s infinite ease-in-out;
}
.nuesa-faq-typing span:nth-child(2) { animation-delay: 0.15s; }
.nuesa-faq-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes nuesa-faq-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-4px); opacity: 1; }
}

.nuesa-faq-inputbar {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #e9eaec;
	background: #ffffff;
}
.nuesa-faq-inputbar textarea {
	flex: 1;
	resize: none;
	border: 1px solid #d7dade;
	border-radius: 10px;
	padding: 9px 11px;
	font-size: 13.5px;
	font-family: inherit;
	max-height: 90px;
	outline: none;
}
.nuesa-faq-inputbar textarea:focus { border-color: var(--nuesa-primary); }
.nuesa-faq-send {
	background: var(--nuesa-primary);
	color: var(--nuesa-primary-text);
	border: none;
	border-radius: 10px;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.nuesa-faq-send:disabled { opacity: 0.5; cursor: not-allowed; }
.nuesa-faq-send svg { width: 17px; height: 17px; }

@media (max-width: 480px) {
	.nuesa-faq-panel { width: calc(100vw - 32px); height: 65vh; }
}
