/* 悬浮助手按钮 */
.float-chat-btn {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 56px;
	height: 56px;
	background: linear-gradient(135deg, #458ccc 0%, #2a6db5 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(42, 109, 181, 0.4);
	z-index: 9999;
	transition: all 0.3s ease;
	flex-direction: column;
}

.float-chat-btn:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 24px rgba(42, 109, 181, 0.5);
}

.float-chat-btn-active {
	background: #666;
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.float-chat-btn-active:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.float-chat-label {
	display: none;
	font-size: 10px;
	color: #fff;
	margin-top: 2px;
	white-space: nowrap;
}

.float-chat-btn:hover .float-chat-label {
	display: block;
}

/* 悬浮对话框 */
.float-chat-box {
	position: fixed;
	right: 24px;
	bottom: 90px;
	width: 420px;
	height: 580px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 40px rgba(0,0,0,0.15);
	z-index: 9998;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: floatSlideUp 0.25s ease-out;
}

@keyframes floatSlideUp {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

.float-chat-header {
	background: linear-gradient(135deg, #458ccc 0%, #2a6db5 100%);
	color: #fff;
	padding: 12px 16px;
	font-size: 14px;
	font-family: "Microsoft Yahei";
	font-weight: 500;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-shrink: 0;
}

.float-chat-close {
	font-size: 22px;
	cursor: pointer;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.2s;
}

.float-chat-close:hover {
	background: rgba(255,255,255,0.2);
}

/* 消息区域 */
.float-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fc-msg {
	display: flex;
	max-width: 85%;
}

.fc-msg-user {
	align-self: flex-end;
}

.fc-msg-bot {
	align-self: flex-start;
}

.fc-msg-content {
	padding: 8px 12px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 20px;
	word-break: break-word;
}

.fc-msg-user .fc-msg-content {
	background: #458ccc;
	color: #fff;
	border-bottom-right-radius: 3px;
}

.fc-msg-bot .fc-msg-content {
	background: #f0f5fa;
	color: #333;
	border: 1px solid #e2ecf5;
	border-bottom-left-radius: 3px;
}

.fc-msg-bot .fc-msg-content strong {
	color: #2a6496;
}

.fc-msg-bot .fc-msg-content li {
	margin-left: 14px;
	list-style: disc;
}

/* 打字光标 */
.fc-cursor {
	display: inline-block;
	width: 2px;
	height: 12px;
	background: #458ccc;
	margin-left: 1px;
	vertical-align: text-bottom;
	animation: fcBlink 0.8s infinite;
}

@keyframes fcBlink {
	0%, 50% { opacity: 1; }
	51%, 100% { opacity: 0; }
}

/* 加载动画 */
.fc-loading {
	display: flex;
	gap: 4px;
	align-items: center;
	padding: 8px 14px !important;
}

.fc-loading span {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #458ccc;
	animation: fcDot 1.4s infinite ease-in-out both;
}

.fc-loading span:nth-child(1) { animation-delay: -0.32s; }
.fc-loading span:nth-child(2) { animation-delay: -0.16s; }
.fc-loading span:nth-child(3) { animation-delay: 0s; }

@keyframes fcDot {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1); }
}

/* 输入区域 */
.float-chat-input {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid #eee;
	flex-shrink: 0;
}

.float-chat-input input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 8px 10px;
	font-size: 13px;
	outline: none;
	font-family: "Microsoft Yahei", arial;
}

.float-chat-input input:focus {
	border-color: #458ccc;
}

.float-chat-input button {
	flex-shrink: 0;
	width: 56px;
	height: 34px;
	background: #458ccc;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 12px;
	cursor: pointer;
	font-family: "Microsoft Yahei";
}

.float-chat-input button:hover {
	background: #3a7ab8;
}

.float-chat-input button:disabled {
	background: #99c2e0;
	cursor: not-allowed;
}

/* 滚动条 */
.float-chat-messages::-webkit-scrollbar {
	width: 4px;
}

.float-chat-messages::-webkit-scrollbar-thumb {
	background: #d0d0d0;
	border-radius: 2px;
}

/* 移动端适配 */
@media (max-width: 768px) {
	.float-chat-box {
		right: 0;
		bottom: 0;
		width: 100%;
		height: 100%;
		border-radius: 0;
	}
	.float-chat-btn {
		right: 16px;
		bottom: 16px;
		width: 50px;
		height: 50px;
	}
}
