#chatbot-container {
	width: 100%;
	max-width: 800px;
	background: rgba(0, 0, 0, 0.8);
	border-radius: 10px;
	margin: 20px auto;
	display: flex;
	flex-direction: column;
	position: relative;
	z-index: 20;
	transition: opacity 0.5s, transform 0.5s;
}

#chat-messages {
	flex-grow: 1;
	overflow-y: auto;
	max-height: 400px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
	min-height: 300px;
	background: rgba(0, 0, 0, 0.3);
	margin-bottom: 60px;
	/* Increased to make space for footer */
	visibility: visible !important;
	/* Force visibility */
}

.chat-input {
	display: flex !important;
	/* Force display */
	padding: 20px;
	gap: 10px;
	background: rgba(0, 0, 0, 0.5);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 0 0 10px 10px;
	z-index: 11;
	/* Ensure input is above messages */
}

.chat-input input {
	flex-grow: 1;
	padding: 12px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.1);
	color: white;
	font-size: 16px;
}

.chat-input button {
	padding: 12px 24px;
	border: none;
	border-radius: 5px;
	background: #4caf50;
	color: white;
	cursor: pointer;
	transition: background-color 0.3s;
}

.chat-input button:hover {
	background: #45a049;
}

.message {
	padding: 12px 16px;
	border-radius: 8px;
	max-width: 80%;
	word-wrap: break-word;
	line-height: 1.4;
	opacity: 1 !important;
	/* Force opacity */
	visibility: visible !important;
	/* Force visibility */
	display: block !important;
	/* Force display */
}

.message.user {
	align-self: flex-end;
	background: #2196f3;
	color: white;
}

.message.bot {
	align-self: flex-start;
	background: #4caf50;
	color: white;
}

.message.bot-error {
	align-self: flex-start;
	background: #f44336;
	color: white;
}

/* Add loading indicator */
.message.bot-typing {
	background: rgba(76, 175, 80, 0.2);
	color: white;
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: monospace;
	padding: 15px 20px;
	border-radius: 8px;
	animation: pulse 1.5s infinite;
}

@keyframes typing {
	0% {
		opacity: 0.3;
	}

	50% {
		opacity: 1;
	}

	100% {
		opacity: 0.3;
	}
}

.bot-typing::after {
	content: "";
	width: 8px;
	height: 8px;
	background-color: #4caf50;
	border-radius: 50%;
	display: inline-block;
	margin-left: 5px;
	animation: typing 1.5s infinite;
}

/* Add connection status styles */
#connection-status {
	padding: 12px 16px;
	height: 30px;
	text-align: center;
	font-size: 14px;
	border-radius: 4px;
	margin-bottom: 10px;
	position: relative;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.6);
}

.status-connecting {
	background: rgba(255, 152, 0, 0.2);
	color: #ff9800;
}

.status-connected {
	background: rgba(76, 175, 80, 0.2);
	color: #4caf50;
}

.status-disconnected {
	background: rgba(244, 67, 54, 0.2);
	color: #f44336;
}

.status-error {
	background: rgba(244, 67, 54, 0.2);
	color: #f44336;
}

.status-connecting::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	height: 2px;
	width: 100%;
	background: linear-gradient(to right, #ff9800, #ffd54f);
	animation: loading-bar 2s infinite;
}

@keyframes loading-bar {
	0% {
		transform: translateX(-100%);
	}

	100% {
		transform: translateX(100%);
	}
}

.chat-footer {
	text-align: center;
	padding: 8px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	/* position: absolute; */
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.5);
	border-radius: 0 0 10px 10px;
	z-index: 12;
}

/* Improved connection status indicator */
.chat-footer .connection-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-left: 5px;
	background-color: #ccc;
	transition: background-color 0.3s ease;
}

.chat-footer.connected .connection-dot {
	background-color: #4caf50;
}

.chat-footer.disconnected .connection-dot {
	background-color: #f44336;
}

.chat-footer.connecting .connection-dot {
	background-color: #ff9800;
	animation: pulse 1.5s infinite;
}

@keyframes pulse {
	0% {
		opacity: 0.4;
	}

	50% {
		opacity: 1;
	}

	100% {
		opacity: 0.4;
	}
}

.loading-dots::after {
	content: "...";
	animation: dots 1.5s steps(4, end) infinite;
	display: inline-block;
	width: 20px;
	text-align: left;
}

@keyframes dots {

	0%,
	20% {
		content: ".";
	}

	40% {
		content: "..";
	}

	60% {
		content: "...";
	}

	80%,
	100% {
		content: "";
	}
}