.uai-chatbot-root {
	--uai-shadow: 0 20px 55px rgba(15, 23, 42, 0.18);
	--uai-radius: 18px;
	bottom: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	position: fixed;
	z-index: 99999;
}

.uai-position-right {
	right: 20px;
}

.uai-position-left {
	left: 20px;
}

.uai-launcher {
	align-items: center;
	background: var(--uai-button);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 16px 34px rgba(15, 118, 110, 0.3);
	color: #fff;
	cursor: pointer;
	display: flex;
	height: 56px;
	justify-content: center;
	position: relative;
	transition: transform 180ms ease, box-shadow 180ms ease;
	width: 56px;
}

.uai-launcher:hover,
.uai-launcher:focus-visible {
	box-shadow: 0 18px 44px rgba(15, 118, 110, 0.4);
	transform: translateY(-2px) scale(1.03);
}

.uai-launcher-icon {
	font-size: 24px;
	font-weight: 800;
	line-height: 1;
}

.uai-launcher-pulse {
	animation: uai-pulse 2.2s ease-out infinite;
	border: 2px solid var(--uai-button);
	border-radius: 999px;
	inset: -8px;
	opacity: 0.5;
	position: absolute;
}

.uai-panel {
	background: var(--uai-bg);
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: var(--uai-radius);
	bottom: 74px;
	box-shadow: var(--uai-shadow);
	display: flex;
	flex-direction: column;
	max-height: min(620px, calc(100vh - 104px));
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
	position: absolute;
	transform: translateY(16px) scale(0.96);
	transition: opacity 200ms ease, transform 200ms ease;
	width: 348px;
}

.uai-position-right .uai-panel {
	right: 0;
}

.uai-position-left .uai-panel {
	left: 0;
}

.uai-open .uai-panel {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.uai-open .uai-launcher {
	transform: scale(0.92);
}

.uai-header {
	align-items: center;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
		linear-gradient(135deg, var(--uai-header), #124e58);
	color: #fff;
	display: flex;
	justify-content: space-between;
	padding: 14px 15px 13px;
}

.uai-title {
	display: block;
	font-size: 14px;
	letter-spacing: 0;
	line-height: 1.25;
}

.uai-subtitle {
	color: rgba(255, 255, 255, 0.78);
	display: block;
	font-size: 11px;
	margin-top: 2px;
}

.uai-close {
	background: rgba(255, 255, 255, 0.14);
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	font-size: 22px;
	height: 30px;
	line-height: 1;
	width: 30px;
}

.uai-messages {
	background:
		radial-gradient(circle at top left, rgba(20, 184, 166, 0.1), transparent 34%),
		var(--uai-bg);
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 9px;
	overflow-y: auto;
	padding: 14px;
	scroll-behavior: smooth;
}

.uai-message-row {
	animation: uai-message-in 180ms ease both;
	display: flex;
}

.uai-message-row-user {
	justify-content: flex-end;
}

.uai-message {
	border-radius: 14px;
	font-size: 12.5px;
	line-height: 1.42;
	max-width: 86%;
	padding: 9px 11px;
	white-space: pre-wrap;
	word-break: break-word;
}

.uai-message-bot {
	background: #f8fafc;
	border: 1px solid rgba(15, 23, 42, 0.07);
	border-bottom-left-radius: 5px;
	color: var(--uai-bot-text);
}

.uai-message-user {
	background: var(--uai-button);
	border-bottom-right-radius: 5px;
	color: var(--uai-user-text);
}

.uai-message-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.uai-message a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.uai-message-bot a,
.uai-message-error a {
	color: #0f766e;
}

.uai-message-user a {
	color: #fff;
}

.uai-form {
	align-items: flex-end;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
	display: flex;
	gap: 8px;
	padding: 10px;
}

.uai-input {
	background: #f8fafc;
	border: 1px solid rgba(15, 23, 42, 0.14);
	border-radius: 12px;
	box-sizing: border-box;
	color: #0f172a;
	font: inherit;
	font-size: 12.5px;
	line-height: 1.35;
	max-height: 86px;
	min-height: 36px;
	outline: none;
	padding: 8px 10px;
	resize: none;
	transition: border-color 160ms ease, box-shadow 160ms ease;
	width: 100%;
}

.uai-input:focus {
	border-color: var(--uai-button);
	box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.uai-send {
	background: var(--uai-button);
	border: 0;
	border-radius: 12px;
	color: #fff;
	cursor: pointer;
	font-size: 12px;
	font-weight: 700;
	min-height: 36px;
	padding: 0 12px;
	transition: filter 160ms ease, transform 160ms ease;
	white-space: nowrap;
}

.uai-send:hover,
.uai-send:focus-visible {
	filter: brightness(1.04);
	transform: translateY(-1px);
}

.uai-send:disabled,
.uai-input:disabled {
	cursor: wait;
	opacity: 0.65;
}

.uai-typing {
	align-items: center;
	display: inline-flex;
	gap: 8px;
}

.uai-typing-dots {
	display: inline-flex;
	gap: 3px;
}

.uai-typing-dots i {
	animation: uai-dot 1s ease-in-out infinite;
	background: currentColor;
	border-radius: 999px;
	display: block;
	height: 5px;
	opacity: 0.45;
	width: 5px;
}

.uai-typing-dots i:nth-child(2) {
	animation-delay: 0.14s;
}

.uai-typing-dots i:nth-child(3) {
	animation-delay: 0.28s;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

@keyframes uai-pulse {
	0% {
		opacity: 0.5;
		transform: scale(0.94);
	}
	80%,
	100% {
		opacity: 0;
		transform: scale(1.2);
	}
}

@keyframes uai-message-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes uai-dot {
	0%,
	80%,
	100% {
		transform: translateY(0);
	}
	40% {
		transform: translateY(-4px);
	}
}

@media (max-width: 520px) {
	.uai-chatbot-root {
		bottom: 16px;
		left: 16px;
		right: 16px;
	}

	.uai-launcher {
		height: 52px;
		margin-left: auto;
		width: 52px;
	}

	.uai-position-left .uai-launcher {
		margin-left: 0;
		margin-right: auto;
	}

	.uai-panel {
		bottom: 68px;
		left: 0;
		max-height: calc(100vh - 96px);
		right: 0;
		width: auto;
	}

	.uai-message {
		max-width: 92%;
	}
}
.uai-message-disclaimer {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    border-bottom-left-radius: 5px;
    color: #92400e;
    font-size: 11px;
    font-style: italic;
    line-height: 1.45;
    max-width: 92%;
    padding: 8px 11px;
}