/* ============================================
   TextBuilder.ai Chat Widget CSS
   ============================================ */

/* Chat toggle button */
#chat-toggle {
	width: 56px;
	height: 56px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#chat-toggle:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

/* Chat window */
#chat-window .card {
	border: none;
	border-radius: 12px;
	overflow: hidden;
}

#chat-window .card-header {
	border-radius: 12px 12px 0 0;
}

/* Chat messages area */
#chat-messages {
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}

#chat-messages::-webkit-scrollbar {
	width: 5px;
}

#chat-messages::-webkit-scrollbar-track {
	background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
	background-color: #cbd5e1;
	border-radius: 3px;
}

/* Message bubbles */
#chat-messages .message .bg-light {
	background-color: #f0f2f5 !important;
}

#chat-messages .message .bg-primary {
	border-radius: 12px 12px 2px 12px;
}

#chat-messages .message .bg-light.rounded {
	border-radius: 12px 12px 12px 2px !important;
}

/* Bot avatar */
.bot-avatar {
	flex-shrink: 0;
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Bot avatar pulse animation during streaming */
@keyframes botPulse {
	0%, 100% {
		background-color: #f8f9fa;
		box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
	}
	50% {
		background-color: #e0edff;
		box-shadow: 0 0 10px 3px rgba(13, 110, 253, 0.35);
	}
}

.bot-avatar.bot-streaming {
	animation: botPulse 1.5s ease-in-out infinite;
}

/* Typing indicator */
#typing-indicator .spinner-grow {
	width: 8px;
	height: 8px;
}

/* Chat input */
#chat-form {
	align-items: center;
}

#chat-form .form-control {
	background-color: #ffffff;
	color: #212529;
	border: 1px solid #dee2e6;
	border-radius: 20px;
	padding: 0 16px;
	height: 40px;
	font-size: 0.875rem;
}

#chat-form .form-control::placeholder {
	color: #6c757d;
}

#chat-form .form-control:focus {
	box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

#chat-form button[type="submit"] {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	flex-shrink: 0;
	padding: 0;
}

/* Mobile responsive */
@media (max-width: 576px) {
	#chat-widget {
		margin-right: 0.5rem !important;
		margin-bottom: 1rem !important;
	}
}
