/* 悬浮按钮样式 */
.ai-assistant-btn {
	position: fixed;
	bottom: 60px;
	right: 30px;
	background-color: #1c9a82;
	color: white;
	border-radius: 25px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	transition: all 0.3s ease;
	text-align: center;
	z-index: 888;
	padding: 12px 12px;
}

.ai-assistant-btn:hover {
	background-color: #11816b;
	transform: scale(1);
}

.ai-assistant-btn i {
	font-size: 24px;
}

/* 对话窗口样式 */
.chat-container {
	position: fixed;
	width: 350px;
	height: 500px;
	min-width: 300px;
	min-height: 400px;
	max-width: 50vw;
	max-height: 98vh;
	border: 1px solid #ddd;
	border-radius: 10px;
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
	display: flex;
	flex-direction: column;
	font-family: 'Arial', sans-serif;
	overflow: hidden;
	background-color: #f9f9f9;
	z-index: 1001;
	transform: translateY(20px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.chat-container.ai-show {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}
/* 展开状态 */
.chat-container.expanded {
	width: 350px !important;
	height: calc(100vh - 20px) !important;
	top: 10px !important;
	right: 10px !important;
	bottom: auto !important;
	left: auto !important;
	max-height: none;
}
/* 可拖动标题栏 */
.chat-header {
	background-color: #edf9f7;
	color: #1c9a82;
	padding: 15px;
	text-align: center;
	font-weight: bold;
	font-size: 16px;
	cursor: move;
	user-select: none;
	border-bottom: 1px solid #efefef;
}
.chat-header i{float: left;font-size: 22px;}
.chat-messages {
	flex: 1;
	padding: 15px;
	overflow-y: auto;
	background-color: #fff;
}

.message {
	margin-bottom: 15px;
	max-width: 80%;
	padding: 10px 15px;
	border-radius: 18px;
	line-height: 1.4;
	word-wrap: break-word;
	font-size: 14px;
}

.user-message {
	background-color: #def9f4;
	margin-left: auto;
	border-bottom-right-radius: 5px;
}

.ai-message {
	background-color: #f1f1f1;
	margin-right: auto;
	border-bottom-left-radius: 5px;
}

.chat-input {
	display: flex;
	padding: 10px;
	border-top: 1px solid #ddd;
	background-color: #fff;
}

#message-input {
	flex: 1;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 20px;
	outline: none;
	font-size: 14px;
}

#send-button {
	margin-left: 10px;
	background-color: #1c9a82;
	color: white;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	width:38px;
	height:38px;
}

#send-button:hover {
	background-color: #118f77;
}

.typing-indicator {
	display: none;
	padding: 10px 15px;
	background-color: #f1f1f1;
	border-radius: 18px;
	margin-bottom: 15px;
	width: fit-content;
	border-bottom-left-radius: 5px;
}

.typing-dot {
	display: inline-block;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background-color: #888;
	margin: 0 2px;
	animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
	animation-delay: 0s;
}

.typing-dot:nth-child(2) {
	animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes typingAnimation {
	0%, 60%, 100% {
		transform: translateY(0);
	}
	30% {
		transform: translateY(-5px);
	}
}

.close-btn {
	position: absolute;
	top: 16px;
	right: 6px;
	background: none;
	border: none;
	color: #333;
	font-size: 16px;
	cursor: pointer;
}
.expand-btn {
	position: absolute;
	top: 16px;
	right: 35px;
	background: none;
	border: none;
	color: #565964;
	font-size: 16px;
	cursor: pointer;
	z-index: 2;
}
/* 调整大小手柄 */
.resize-handle {
	position: absolute;
	width: 15px;
	height: 15px;
	right: 0;
	bottom: 0;
	cursor: nwse-resize;
	z-index: 10;
}

.resize-handle::after {
	content: '';
	position: absolute;
	right: 3px;
	bottom: 3px;
	width: 10px;
	height: 10px;
	border-right: 2px solid #f1f1f1;
	border-bottom: 2px solid #f1f1f1;
	border-radius:2px;
}