#jac-chat-root {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#jac-chat-bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #1F3864;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,0.25);
	font-size: 26px;
	border: none;
}

#jac-chat-window {
	display: none;
	flex-direction: column;
	width: 340px;
	max-width: 90vw;
	height: 460px;
	max-height: 70vh;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.25);
	position: absolute;
	bottom: 74px;
	right: 0;
	overflow: hidden;
}

#jac-chat-window.jac-open {
	display: flex;
}

#jac-chat-header {
	background: #1F3864;
	color: #fff;
	padding: 12px 16px;
	font-weight: 600;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

#jac-chat-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
}

#jac-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	background: #f7f8fa;
}

.jac-msg {
	max-width: 85%;
	margin-bottom: 10px;
	padding: 8px 12px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.4;
	white-space: pre-wrap;
}

.jac-msg.jac-user {
	background: #1F3864;
	color: #fff;
	margin-left: auto;
	border-bottom-right-radius: 2px;
}

.jac-msg.jac-bot {
	background: #eef1f6;
	color: #222;
	margin-right: auto;
	border-bottom-left-radius: 2px;
}

.jac-msg.jac-bot.jac-general::after {
	content: "General AI answer — not from site content";
	display: block;
	margin-top: 6px;
	font-size: 11px;
	color: #888;
	font-style: italic;
}

.jac-sources {
	margin-top: 6px;
	font-size: 12px;
}

.jac-sources a {
	color: #1F3864;
	text-decoration: underline;
	display: block;
}

#jac-chat-inputrow {
	display: flex;
	border-top: 1px solid #e2e2e2;
	padding: 8px;
	gap: 6px;
}

#jac-chat-input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
	resize: none;
}

#jac-chat-send {
	background: #1F3864;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 0 14px;
	cursor: pointer;
	font-size: 14px;
}

#jac-chat-send:disabled {
	opacity: 0.5;
	cursor: default;
}

.jac-courses {
	margin-top: 8px;
	border-top: 1px solid #ddd;
	padding-top: 6px;
}

.jac-courses-heading {
	font-size: 12px;
	font-weight: 600;
	color: #555;
	margin-bottom: 4px;
}

.jac-course-link {
	display: block;
	font-size: 13px;
	color: #1F3864;
	text-decoration: none;
	padding: 4px 0;
	border-bottom: 1px dashed #eee;
}

.jac-course-link:hover {
	text-decoration: underline;
}

.jac-typing {
	display: flex;
	align-items: center;
	gap: 4px;
}

.jac-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	animation: jacTyping 1.2s infinite ease-in-out;
}

.jac-typing span:nth-child(1) {
	animation-delay: 0s;
}

.jac-typing span:nth-child(2) {
	animation-delay: 0.15s;
}

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

@keyframes jacTyping {
	0%,
	60%,
	100% {
		transform: translateY(0);
		opacity: 0.35;
	}

	30% {
		transform: translateY(-4px);
		opacity: 1;
	}
}



