/* wwwroot/css/chatbot.css */

.container {
	position: relative;
}

/* Chat bubble */
.chat-bubble {
	position: fixed;
	bottom: 20px;
	right: 60px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: #00049e;
	color: white;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

	.chat-bubble:hover {
		transform: scale(1.1);
	}

	.chat-bubble.hidden {
		display: none;
	}

.bubble-icon {
	font-size: 24px;
}

/* Chat box */
.chat-container {
	position: fixed;
	bottom: 0;
	right: 0;
	z-index: 1000;
}

.chat-box {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 350px;
	height: 500px;
	border-radius: 10px;
	background-color: white;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: scale(0);
	transform-origin: bottom right;
	transition: transform 0.3s ease;
}

	.chat-box.active {
		transform: scale(1);
	}

/* Chat header */
.chat-header {
	padding: 15px;
	background-color: #00049e;
	color: white;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

	.chat-header .imagen {
		display: flex;
		align-items: center;
		margin-right: 10px;
	}

		.chat-header .imagen img {
			border-radius: 50%;
		}

.chat-title {
	font-weight: bold;
	flex: 1;
}

#closeChat {
	background: none;
	border: none;
	color: white;
	font-size: 24px;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

	#closeChat:hover {
		opacity: 0.8;
	}

/* Chat messages */
.chat-messages {
	flex: 1;
	padding: 15px;
	overflow-y: auto;
	background-color: #f5f5f5;
}

.message {
	margin-bottom: 15px;
	display: flex;
	flex-direction: column;
}

	.message.user {
		align-items: flex-end;
	}

	.message.bot {
		align-items: flex-start;
	}

.message-content {
	padding: 10px 15px;
	border-radius: 18px;
	max-width: 80%;
	word-wrap: break-word;
}

.user .message-content {
	background-color: #00049e;
	color: white;
}

.bot .message-content {
	background-color: #e0e0e0;
	color: #333;
}

/* Typing indicator */
.typing .message-content {
	padding: 12px;
	display: flex;
	align-items: center;
	gap: 4px;
}

.dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: #777;
	animation: dot-pulse 1.5s infinite ease-in-out;
}

	.dot:nth-child(2) {
		animation-delay: 0.2s;
	}

	.dot:nth-child(3) {
		animation-delay: 0.4s;
	}

@keyframes dot-pulse {
	0%, 100% {
		transform: scale(1);
		opacity: 1;
	}

	50% {
		transform: scale(1.5);
		opacity: 0.5;
	}
}

/* Chat input */
.chat-input {
	display: flex;
	padding: 10px;
	background-color: white;
	border-top: 1px solid #e0e0e0;
}

#userInput {
	flex: 1;
	padding: 10px;
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	margin-right: 10px;
	outline: none;
}

	#userInput:focus {
		border-color: #00049e;
	}

#sendMessage {
	background-color: #00049e;
	color: white;
	border: none;
	border-radius: 20px;
	padding: 10px 15px;
	cursor: pointer;
	transition: background-color 0.2s;
}

	#sendMessage:hover {
		background-color: #000380;
	}

	#sendMessage:disabled {
		background-color: #cccccc;
		cursor: not-allowed;
	}

/* Code blocks */
.code-block {
	background-color: #2d2d2d;
	color: #f8f8f2;
	padding: 10px;
	border-radius: 5px;
	overflow-x: auto;
	margin: 5px 0;
	font-family: 'Courier New', monospace;
	white-space: pre;
}

/* Input disabled state */
.chat-input.disabled {
	opacity: 0.6;
	pointer-events: none;
}

	.chat-input.disabled input {
		background-color: #f5f5f5;
		cursor: not-allowed;
	}

	.chat-input.disabled button {
		background-color: #cccccc;
		cursor: not-allowed;
	}

/* Responsive */
@media (max-width: 768px) {
	.chat-box {
		width: 100%;
		height: 100%;
		bottom: 0;
		right: 0;
		border-radius: 0;
	}

	.chat-bubble {
		right: 20px;
	}
}
