/* NAKVIS AI Assistant widget */
.naa-launcher {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99998;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: 0;
	background: #14532d;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease;
}
.naa-launcher:hover { transform: scale(1.06); }

.naa-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(15, 23, 42, 0.45);
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 20px;
}
.naa-overlay[hidden] { display: none; }

.naa-modal {
	width: min(420px, 100%);
	height: min(640px, calc(100dvh - 40px));
	background: #fff;
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #111827;
}
@media (max-width: 480px) {
	.naa-overlay { padding: 0; }
	/* dvh tracks the visible viewport so the input never hides under mobile browser chrome. */
	.naa-modal { width: 100%; height: 100dvh; border-radius: 0; }
}

.naa-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	background: #14532d;
	color: #fff;
}
.naa-title { font-weight: 600; }
.naa-close {
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	padding: 4px 8px;
}

.naa-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #f8fafc;
}

.naa-msg { display: flex; flex-direction: column; max-width: 92%; }
.naa-user { align-self: flex-end; align-items: flex-end; }
.naa-assistant { align-self: flex-start; align-items: flex-start; }

.naa-bubble {
	padding: 10px 14px;
	border-radius: 14px;
	word-wrap: break-word;
}
.naa-user .naa-bubble { background: #14532d; color: #fff; border-bottom-right-radius: 4px; }
.naa-assistant .naa-bubble { background: #fff; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px; }

.naa-bubble p { margin: 0 0 8px; }
.naa-bubble p:last-child { margin-bottom: 0; }
.naa-bubble ul { margin: 4px 0 8px 18px; padding: 0; }
.naa-bubble img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	margin: 6px 0;
	display: block;
}
.naa-bubble a { color: #14532d; text-decoration: underline; }
.naa-h { display: block; margin: 6px 0 2px; }
.naa-error { color: #b91c1c; }

.naa-sources { margin-top: 6px; font-size: 12px; color: #64748b; }
.naa-source {
	display: inline-block;
	margin: 2px 4px 0 0;
	padding: 2px 8px;
	background: #e2e8f0;
	border-radius: 999px;
	color: #334155;
	text-decoration: none;
}
.naa-source:hover { background: #cbd5e1; }

.naa-form {
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #e2e8f0;
	background: #fff;
}
.naa-input {
	flex: 1;
	resize: none;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	padding: 10px 12px;
	font: inherit;
	outline: none;
}
.naa-input:focus { border-color: #14532d; }
.naa-send {
	border: 0;
	background: #14532d;
	color: #fff;
	border-radius: 10px;
	padding: 0 18px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.naa-send:hover { background: #166534; }

.naa-thinking span {
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-right: 4px;
	border-radius: 50%;
	background: #94a3b8;
	animation: naa-blink 1.2s infinite;
}
.naa-thinking span:nth-child(2) { animation-delay: 0.2s; }
.naa-thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes naa-blink {
	0%, 80%, 100% { opacity: 0.25; }
	40% { opacity: 1; }
}
