.hy-ai-chat,
.hy-ai-chat * {
	box-sizing: border-box;
}

.hy-ai-chat {
	position: fixed;
	right: 24px;
	bottom: 120px;
	z-index: 10020;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
	color: #202733;
	letter-spacing: 0;
}

.hy-ai-launcher {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	padding: 0;
	color: #fff;
	background: #00a0ea;
	border: 0;
	border-radius: 50%;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
	cursor: pointer;
}

.hy-ai-launcher:hover,
.hy-ai-launcher:focus {
	background: #008dcc;
}

.hy-ai-launcher i {
	font-size: 27px;
}

.hy-ai-launcher-label {
	position: absolute;
	right: 72px;
	width: 92px;
	padding: 8px 10px;
	font-size: 14px;
	color: #fff;
	text-align: center;
	white-space: nowrap;
	background: #242a37;
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .16);
}

.hy-ai-panel {
	position: absolute;
	right: 0;
	bottom: 76px;
	display: none;
	flex-direction: column;
	width: 390px;
	height: min(590px, calc(100vh - 170px));
	min-height: 420px;
	background: #fff;
	border: 1px solid #dce2e8;
	border-radius: 8px;
	box-shadow: 0 16px 48px rgba(20, 29, 39, .24);
	overflow: hidden;
}

.hy-ai-chat.is-open .hy-ai-panel {
	display: flex;
}

.hy-ai-chat.is-open .hy-ai-launcher-label {
	display: none;
}

.hy-ai-header {
	display: flex;
	align-items: center;
	min-height: 64px;
	padding: 12px 14px;
	color: #fff;
	background: #242a37;
}

.hy-ai-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	margin-right: 10px;
	color: #fff;
	background: #00a0ea;
	border-radius: 50%;
}

.hy-ai-avatar i {
	font-size: 18px;
}

.hy-ai-heading {
	min-width: 0;
	flex: 1;
}

.hy-ai-heading strong {
	display: block;
	font-size: 16px;
	font-weight: 600;
	line-height: 22px;
	color: #fff;
}

.hy-ai-heading span {
	display: block;
	font-size: 12px;
	line-height: 18px;
	color: rgba(255, 255, 255, .72);
}

.hy-ai-icon-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	color: #fff;
	background: transparent;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}

.hy-ai-icon-button:hover,
.hy-ai-icon-button:focus {
	background: rgba(255, 255, 255, .12);
}

.hy-ai-icon-button i {
	font-size: 16px;
}

.hy-ai-messages {
	flex: 1;
	padding: 16px 14px;
	background: #f4f7f9;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.hy-ai-message {
	display: flex;
	margin-bottom: 14px;
}

.hy-ai-message.is-user {
	justify-content: flex-end;
}

.hy-ai-bubble {
	max-width: 82%;
	padding: 10px 12px;
	font-size: 14px;
	line-height: 1.65;
	color: #26313d;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	background: #fff;
	border: 1px solid #e1e7ec;
	border-radius: 8px;
}

.hy-ai-message.is-user .hy-ai-bubble {
	color: #fff;
	background: #008fd3;
	border-color: #008fd3;
}

.hy-ai-message.is-error .hy-ai-bubble {
	color: #8b2d2d;
	background: #fff5f5;
	border-color: #efcaca;
}

.hy-ai-typing {
	display: inline-flex;
	gap: 5px;
	align-items: center;
	min-width: 48px;
}

.hy-ai-typing span {
	width: 6px;
	height: 6px;
	background: #7b8794;
	border-radius: 50%;
	animation: hy-ai-typing 1.1s infinite ease-in-out;
}

.hy-ai-typing span:nth-child(2) {
	animation-delay: .15s;
}

.hy-ai-typing span:nth-child(3) {
	animation-delay: .3s;
}

@keyframes hy-ai-typing {
	0%,
	60%,
	100% {
		opacity: .35;
		transform: translateY(0);
	}
	30% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

.hy-ai-quick {
	display: flex;
	gap: 7px;
	padding: 10px 12px;
	background: #fff;
	border-top: 1px solid #e5e9ed;
	overflow-x: auto;
}

.hy-ai-quick button {
	flex: 0 0 auto;
	padding: 6px 10px;
	font-size: 12px;
	line-height: 18px;
	color: #216b8e;
	white-space: nowrap;
	background: #eef8fc;
	border: 1px solid #cce8f4;
	border-radius: 6px;
	cursor: pointer;
}

.hy-ai-quick button:hover,
.hy-ai-quick button:focus {
	background: #dff2fa;
}

.hy-ai-form {
	padding: 10px 12px 8px;
	background: #fff;
	border-top: 1px solid #e5e9ed;
}

.hy-ai-input-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.hy-ai-input {
	flex: 1;
	width: auto;
	min-width: 0;
	height: 42px;
	max-height: 104px;
	padding: 10px 11px;
	margin: 0;
	font: inherit;
	font-size: 14px;
	line-height: 20px;
	color: #202733;
	background: #f7f9fa;
	border: 1px solid #d8dfe5;
	border-radius: 6px;
	outline: none;
	resize: none;
}

.hy-ai-input:focus {
	background: #fff;
	border-color: #00a0ea;
}

.hy-ai-send {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	padding: 0;
	color: #fff;
	background: #00a0ea;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.hy-ai-send:disabled {
	cursor: not-allowed;
	opacity: .55;
}

.hy-ai-send i {
	font-size: 16px;
}

.hy-ai-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 8px;
}

.hy-ai-actions a {
	font-size: 12px;
	line-height: 20px;
	color: #1478a6;
	text-decoration: none;
}

.hy-ai-actions a:hover {
	color: #005f8b;
}

.hy-ai-notice {
	font-size: 11px;
	line-height: 18px;
	color: #8a949e;
}

.hy-ai-honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

@media (max-width: 768px) {
	.hy-ai-chat {
		right: 14px;
		bottom: 72px;
	}

	.hy-ai-launcher {
		width: 54px;
		height: 54px;
	}

	.hy-ai-launcher-label {
		display: none;
	}

	.hy-ai-panel {
		position: fixed;
		right: 10px;
		bottom: 66px;
		left: 10px;
		width: auto;
		height: calc(100vh - 138px);
		min-height: 360px;
		max-height: 680px;
	}

	.hy-ai-quick {
		padding-top: 8px;
		padding-bottom: 8px;
	}

	.hy-ai-bubble {
		max-width: 88%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hy-ai-typing span {
		animation: none;
	}
}
