/* Floating AI Button */
.ai-floating-button {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: auto; /* 自适应宽度 */
	height: 40px; /* 固定高度 */
	border-radius: 20px; /* pill样式 */
	background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%); /* 绿色渐变 */
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); /* 增强阴影 */
	font-weight: bold;
	font-size: 16px; /* 调整字体大小 */
	padding: 0 20px; /* 水平内边距 */
	z-index: 999;
	transition: all 0.3s ease;
	animation: pulse 2s infinite; /* 添加脉动效果 */
}

.ai-floating-button:hover {
	transform: scale(1.15);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
	background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
	color: white;
	text-decoration: none;
	animation: none; /* 悬停时停止脉动 */
}

.ai-floating-button span {
	font-family: 'Inter', sans-serif;
}

/* Embedded Chat Container */
.ai-chat-container {
	position: fixed;
	bottom: 100px;
	right: 30px;
	width: 400px;
	height: 800px; /* 增加高度 */
	max-height: 85vh; /* 增加最大高度比例 */
	background-color: #fff;
	border-radius: 12px;
	box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
	z-index: 998;
	overflow: hidden;
	display: none; /* 默认隐藏 */
	transition: all 0.3s ease;
}

.ai-chat-container.active {
	display: block;
	animation: slideIn 0.3s forwards;
}

/* 关闭按钮已移除 */

.ai-chat-iframe {
	width: 100%;
	height: 100%; /* 使用全部高度 */
	border: none;
}

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

/* 添加脉动动画 */
@keyframes pulse {
	0% {
		transform: scale(1);
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
	}
	50% {
		transform: scale(1.05);
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
	}
	100% {
		transform: scale(1);
		box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
	}
}

/* Mobile responsive */
@media only screen and (max-width: 767px) {
	.ai-floating-button {
		width: auto;
		height: 36px;
		font-size: 14px;
		bottom: 20px;
		right: 20px;
		padding: 0 15px;
		z-index: 1000; /* 确保在移动端也显示在最上层 */
	}
	
	.ai-chat-container {
		width: 92%;
		right: 4%;
		left: 4%;
		bottom: 70px; /* 降低底部距离，距离按钮更近 */
		height: 70vh; /* 减少高度，防止超出屏幕 */
		max-height: calc(100vh - 120px); /* 确保有足够的空间 */
		border-radius: 10px;
		overflow: auto; /* 添加滚动条 */
	}
	
	/* 移动端关闭按钮已移除 */
}
