/* ==========================================================================
   LE QUY DON AI ASSISTANT - FLOATING CHAT WIDGET STYLES
   ========================================================================== */

.lqd-ai-widget-container {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Floating Trigger Button */
.lqd-ai-toggle-btn {
	position: relative;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: linear-gradient(135deg, #0284c7 0%, #033a7e 100%);
	color: #ffffff;
	border: 2px solid #ffffff;
	box-shadow: 0 6px 20px rgba(3, 58, 126, 0.4);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	outline: none;
	transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lqd-ai-toggle-btn:hover {
	transform: scale(1.08);
}

.lqd-ai-btn-icon {
	font-size: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lqd-ai-btn-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #16a34a;
	color: #ffffff;
	font-size: 10px;
	font-weight: 800;
	padding: 2px 6px;
	border-radius: 10px;
	border: 1.5px solid #ffffff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lqd-ai-pulse-ring {
	position: absolute;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 2px solid rgba(2, 132, 199, 0.6);
	animation: lqdAiPulse 2s infinite ease-out;
}

@keyframes lqdAiPulse {
	0% {
		transform: scale(1);
		opacity: 0.8;
	}
	100% {
		transform: scale(1.45);
		opacity: 0;
	}
}

/* Tooltip Banner */
.lqd-ai-tooltip {
	position: absolute;
	bottom: 70px;
	right: 0;
	background: #ffffff;
	color: #1e293b;
	padding: 8px 14px;
	border-radius: 20px;
	font-size: 12.5px;
	font-weight: 700;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 8px;
	border: 1px solid #e2e8f0;
	animation: lqdAiFloat 3s infinite ease-in-out;
}

.lqd-ai-tooltip-close {
	background: none;
	border: none;
	color: #94a3b8;
	font-size: 14px;
	cursor: pointer;
	padding: 0;
	line-height: 1;
}

@keyframes lqdAiFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

/* Chat Modal Window */
.lqd-ai-chat-modal {
	position: absolute;
	bottom: 74px;
	right: 0;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 540px;
	max-height: calc(100vh - 120px);
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
	border: 1px solid #cbd5e1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: lqdAiSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lqdAiSlideUp {
	from {
		opacity: 0;
		transform: translateY(20px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Chat Header */
.lqd-ai-chat-header {
	background: linear-gradient(135deg, #033a7e 0%, #022147 100%);
	color: #ffffff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.lqd-ai-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
}

.lqd-ai-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	border: 1px solid rgba(255, 255, 255, 0.4);
}

.lqd-ai-header-info {
	display: flex;
	flex-direction: column;
}

.lqd-ai-title {
	font-size: 13.5px;
	font-weight: 800;
	margin: 0;
	letter-spacing: 0.3px;
}

.lqd-ai-subtitle {
	font-size: 11px;
	color: #fca5a5;
	display: flex;
	align-items: center;
	gap: 4px;
}

.lqd-ai-subtitle i {
	font-size: 7px;
	color: #4ade80;
}

.lqd-ai-header-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.lqd-ai-header-btn {
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #ffffff;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 12px;
	transition: background 0.2s;
}

.lqd-ai-header-btn:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* Chat Body */
.lqd-ai-chat-body {
	flex: 1;
	padding: 16px;
	overflow-y: auto;
	background: #f8fafc;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scrollbar-width: thin;
}

.lqd-ai-msg {
	display: flex;
	flex-direction: column;
	max-width: 86%;
}

.lqd-ai-msg-assistant {
	align-self: flex-start;
}

.lqd-ai-msg-user {
	align-self: flex-end;
}

.lqd-ai-msg-bubble {
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 13px;
	line-height: 1.5;
	white-space: pre-line;
	word-break: break-word;
}

.lqd-ai-msg-assistant .lqd-ai-msg-bubble {
	background: #ffffff;
	color: #1e293b;
	border: 1px solid #e2e8f0;
	border-top-left-radius: 3px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.lqd-ai-msg-user .lqd-ai-msg-bubble {
	background: #033a7e;
	color: #ffffff;
	border-top-right-radius: 3px;
	box-shadow: 0 2px 6px rgba(3, 58, 126, 0.25);
}

.lqd-ai-msg-links {
	margin-top: 6px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.lqd-ai-link-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11.5px;
	font-weight: 600;
	color: #0284c7;
	text-decoration: none;
	background: #f0f9ff;
	padding: 4px 10px;
	border-radius: 12px;
	border: 1px solid #bae6fd;
	transition: all 0.2s;
}

.lqd-ai-link-pill:hover {
	background: #033a7e;
	color: #ffffff;
	border-color: #033a7e;
}

/* Suggestion Chips */
.lqd-ai-chips-wrap {
	margin-top: 6px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.lqd-ai-chips-title {
	font-size: 11.5px;
	font-weight: 700;
	color: #64748b;
	display: flex;
	align-items: center;
	gap: 5px;
}

.lqd-ai-chip {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #334155;
	font-size: 12px;
	font-weight: 600;
	padding: 7px 12px;
	border-radius: 16px;
	text-align: left;
	cursor: pointer;
	transition: all 0.2s;
}

.lqd-ai-chip:hover {
	background: #f0f7ff;
	color: #033a7e;
	border-color: #93c5fd;
}

/* Footer Input Bar */
.lqd-ai-chat-footer {
	padding: 12px 14px;
	background: #ffffff;
	border-top: 1px solid #e2e8f0;
}

.lqd-ai-chat-form {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lqd-ai-input {
	flex: 1;
	border: 1px solid #cbd5e1;
	border-radius: 20px;
	padding: 8px 14px;
	font-size: 13px;
	outline: none;
	transition: border-color 0.2s;
}

.lqd-ai-input:focus {
	border-color: #033a7e;
	box-shadow: 0 0 0 2px rgba(3, 58, 126, 0.12);
}

.lqd-ai-send-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #033a7e;
	color: #ffffff;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 13px;
	transition: background 0.2s;
	flex-shrink: 0;
}

.lqd-ai-send-btn:hover {
	background: #8b1010;
}

.lqd-ai-footer-note {
	font-size: 10px;
	color: #94a3b8;
	text-align: center;
	margin-top: 6px;
}

/* Typing Indicator */
.lqd-ai-typing {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
}

.lqd-ai-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #033a7e;
	animation: lqdAiBounce 1.4s infinite ease-in-out both;
}

.lqd-ai-typing span:nth-child(1) { animation-delay: -0.32s; }
.lqd-ai-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes lqdAiBounce {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1); }
}
