#chatbot-container {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	z-index: 9999;
}

#chatbot-container.chatbot-position-bottom-right {
	position: fixed;
	bottom: 20px;
	right: 20px;
}

#chatbot-container.chatbot-position-bottom-left {
	position: fixed;
	bottom: 20px;
	left: 20px;
}

#chatbot-container.chatbot-position-inline {
	position: relative;
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
}

#chatbot-toggle {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
	transition: transform 0.2s;
	color: #fff;
	border: none;
}

#chatbot-toggle:hover {
	transform: scale(1.1);
}

#chatbot-panel {
	position: absolute;
	bottom: 70px;
	right: 0;
	width: 360px;
	height: 520px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.15);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.chatbot-position-bottom-left #chatbot-panel {
	right: auto;
	left: 0;
}

.chatbot-position-inline #chatbot-panel {
	position: relative;
	bottom: auto;
	right: auto;
	width: 100%;
	height: 480px;
}

.chatbot-position-inline #chatbot-toggle {
	display: none;
}

#chatbot-header {
	padding: 14px 16px;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
	font-size: 15px;
}

#chatbot-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
}

#chatbot-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #f8f9fa;
}

.chatbot-message {
	display: flex;
	max-width: 85%;
}

.chatbot-message.bot {
	align-self: flex-start;
}

.chatbot-message.user {
	align-self: flex-end;
}

.chatbot-bubble {
	padding: 10px 14px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.5;
	word-wrap: break-word;
}

.chatbot-message.bot .chatbot-bubble {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-bottom-left-radius: 4px;
	color: #333;
}

.chatbot-message.user .chatbot-bubble {
	background: #0d6efd;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.chatbot-message .chatbot-sources-label {
	font-size: 11px;
	color: #888;
	margin-top: 4px;
	padding-left: 2px;
}

.chatbot-rating {
	display: flex;
	gap: 4px;
	margin-top: 4px;
	padding-left: 2px;
}

.chatbot-rating button {
	background: none;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 12px;
	cursor: pointer;
	color: #999;
	transition: all 0.2s;
}

.chatbot-rating button:hover {
	border-color: #0d6efd;
	color: #0d6efd;
}

.chatbot-rating button.active {
	background: #0d6efd;
	color: #fff;
	border-color: #0d6efd;
}

#chatbot-input-area {
	border-top: 1px solid #e0e0e0;
	padding: 12px;
	background: #fff;
}

#chatbot-sources {
	margin-bottom: 8px;
	font-size: 12px;
}

.chatbot-source-item {
	background: #f0f4ff;
	border: 1px solid #d0d8f0;
	border-radius: 6px;
	padding: 6px 10px;
	margin-bottom: 4px;
	font-size: 12px;
	color: #555;
}

.chatbot-source-item strong {
	color: #333;
}

.chatbot-input-row {
	display: flex;
	gap: 8px;
}

#chatbot-input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid #ddd;
	border-radius: 24px;
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s;
}

#chatbot-input:focus {
	border-color: #0d6efd;
}

#chatbot-send {
	padding: 8px 18px;
	color: #fff;
	border: none;
	border-radius: 24px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: opacity 0.2s;
}

#chatbot-send:hover {
	opacity: 0.9;
}

#chatbot-send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.chatbot-typing .chatbot-bubble::after {
	content: '...';
	animation: chatbotBlink 1.4s infinite;
}

@keyframes chatbotBlink {
	0%, 100% { opacity: 0.3; }
	50% { opacity: 1; }
}

@media (max-width: 480px) {
	#chatbot-panel {
		width: calc(100vw - 32px);
		height: calc(100vh - 120px);
		right: -10px;
		bottom: 65px;
	}

	.chatbot-position-bottom-left #chatbot-panel {
		left: -10px;
		right: auto;
	}
}
