/* AI Assistant Styling */

/* Container for AI buttons (bottom right) */
#ai-assistant-container {
	position: fixed;
	bottom: 30px;
	right: 30px;
	z-index: 1030;
	display: flex;
	gap: 10px;
	align-items: center;
}

#ai-assistant-container.ai-assistant-hidden {
	display: none;
}

/* Settings button */
#ai-settings-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
}

#ai-settings-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Main AI assistant button */
#ai-assistant-btn {
	background-color: #1a1a1a;
	color: white;
	border: none;
	border-radius: 50px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 500;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 8px;
}

#ai-assistant-btn:hover {
	background-color: #333;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#ai-assistant-btn i {
	font-size: 16px;
}

/* Chat window */
#ai-chat-window {
	position: fixed;
	bottom: 90px;
	right: 30px;
	width: 400px;
	height: 600px;
	background: white;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	z-index: 1031;
	transition: all 0.3s ease;
}

#ai-chat-window.ai-chat-hidden {
	display: none;
}

/* Chat header */
.ai-chat-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 16px 20px;
	border-radius: 16px 16px 0 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.ai-chat-header h5 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.ai-chat-controls {
	display: flex;
	gap: 8px;
}

.ai-chat-controls .btn {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.2s;
}

.ai-chat-controls .btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.3);
}

.ai-chat-controls .btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Chat messages area */
#ai-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Message bubbles */
.ai-message,
.user-message {
	max-width: 80%;
	padding: 12px 16px;
	border-radius: 16px;
	line-height: 1.5;
	font-size: 14px;
	word-wrap: break-word;
}

.ai-message {
	background: #f0f0f0;
	align-self: flex-start;
	border-bottom-left-radius: 4px;
}

.user-message {
	background: #667eea;
	color: white;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}

/* Loading indicator */
.ai-loading {
	display: flex;
	gap: 4px;
	padding: 12px 16px;
	background: #f0f0f0;
	border-radius: 16px;
	border-bottom-left-radius: 4px;
	align-self: flex-start;
}

.ai-loading span {
	width: 8px;
	height: 8px;
	background: #999;
	border-radius: 50%;
	animation: bounce 1.4s infinite ease-in-out both;
}

.ai-loading span:nth-child(1) {
	animation-delay: -0.32s;
}

.ai-loading span:nth-child(2) {
	animation-delay: -0.16s;
}

@keyframes bounce {

	0%,
	80%,
	100% {
		transform: scale(0);
	}

	40% {
		transform: scale(1);
	}
}

/* Chat input area */
.ai-chat-input {
	padding: 16px 20px;
	border-top: 1px solid #e0e0e0;
	display: flex;
	gap: 10px;
	align-items: flex-end;
}

#ai-user-input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 16px;
	padding: 10px 16px;
	font-size: 14px;
	outline: none;
	resize: none;
	max-height: 120px;
	overflow-y: auto;
	transition: border-color 0.2s;
}

#ai-user-input:focus {
	border-color: #667eea;
}

#ai-send-btn {
	background: #667eea;
	border: none;
	color: white;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.2s;
}

#ai-send-btn:hover {
	background: #5568d3;
}

#ai-send-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Microphone button */
#ai-mic-btn {
	background: #6c757d;
	border: none;
	color: white;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: all 0.2s;
}

#ai-mic-btn:hover {
	background: #5a6268;
}

#ai-mic-btn.recording {
	background: #dc3545;
	animation: pulse 1.5s infinite;
}

@keyframes pulse {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.6;
	}
}

/* Settings modal customization removed to match Bulk Input Modal */
/* #aiSettingsModal styles deleted */

/* Responsive design */
@media (max-width: 768px) {
	#ai-chat-window {
		width: calc(100vw - 40px);
		height: calc(100vh - 140px);
		right: 20px;
		bottom: 80px;
	}

	#ai-assistant-container {
		right: 20px;
		bottom: 20px;
	}
}

/* Scrollbar styling for chat messages */
#ai-chat-messages::-webkit-scrollbar {
	width: 6px;
}

#ai-chat-messages::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 10px;
}

#ai-chat-messages::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 10px;
}

#ai-chat-messages::-webkit-scrollbar-thumb:hover {
	background: #555;
}