/**
 * Event Assistant Chatbot Styles
 */

/* Chatbot Widget */
.mlet-assistant-widget {
	position: fixed;
	bottom: 20px;
	right: 90px;
	z-index: 999998;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Adjust position in editor to avoid conflicts */
.wp-admin .mlet-assistant-widget {
	right: 90px;
	bottom: 30px;
}

/* Chat Button (Floating) */
.mlet-assistant-button {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s;
	position: relative;
	font-size: 32px;
	color: white;
}

.mlet-assistant-button:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Pulse animation for merchandising alert */
.mlet-assistant-button.pulse-animation {
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
		box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
	}
	50% {
		transform: scale(1.15);
		box-shadow: 0 8px 30px rgba(255, 107, 107, 0.8),
					0 0 0 10px rgba(255, 107, 107, 0.3),
					0 0 0 20px rgba(255, 107, 107, 0.1);
	}
}

.mlet-assistant-button i {
	font-size: 28px;
	color: white;
}

/* Avatar styles */
.mlet-assistant-avatar {
	font-size: 24px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mlet-message-avatar {
	font-size: 20px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Notification Badge */
.mlet-assistant-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	background: #ff4757;
	color: white;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid white;
}

/* Chat Window */
.mlet-assistant-window {
	display: none;
	position: fixed;
	bottom: 90px;
	right: 90px;
	width: 380px;
	height: 600px;
	background: white;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	flex-direction: column;
	overflow: hidden;
	animation: slideUp 0.3s ease-out;
}

/* Adjust window position in admin */
.wp-admin .mlet-assistant-window {
	right: 90px;
	bottom: 100px;
}

.mlet-assistant-window.active {
	display: flex;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

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

.mlet-assistant-header-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.mlet-assistant-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}

.mlet-assistant-header-text h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.mlet-assistant-header-text p {
	margin: 0;
	font-size: 12px;
	opacity: 0.9;
}

.mlet-assistant-close {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	transition: background 0.3s;
}

.mlet-assistant-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* Chat Messages */
.mlet-assistant-messages {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	background: #f5f7fa;
}

.mlet-message {
	margin-bottom: 16px;
	display: flex;
	gap: 10px;
	animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.mlet-message-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 16px;
	flex-shrink: 0;
}

.mlet-message-content {
	flex: 1;
}

.mlet-message-bubble {
	background: white;
	padding: 12px 16px;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	font-size: 14px;
	line-height: 1.6;
	color: #333;
	white-space: pre-line;
}

.mlet-message-time {
	font-size: 11px;
	color: #999;
	margin-top: 4px;
}

.mlet-message.user {
	flex-direction: row-reverse;
}

.mlet-message.user .mlet-message-avatar {
	background: #4CAF50;
}

.mlet-message.user .mlet-message-bubble {
	background: #667eea;
	color: white;
}

.mlet-message.user .mlet-message-time {
	text-align: right;
}

/* Quick Options */
.mlet-quick-options {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	margin-top: 12px;
}

.mlet-quick-option {
	background: white;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	text-align: left;
	cursor: pointer;
	transition: all 0.2s;
	color: #333;
	font-weight: 500;
}

.mlet-quick-option:hover {
	border-color: #667eea;
	background: #f0f3ff;
	transform: translateX(4px);
}

/* Typing Indicator */
.mlet-typing {
	display: none;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	background: white;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	width: fit-content;
}

.mlet-typing.active {
	display: flex;
}

.mlet-typing-dots {
	display: flex;
	gap: 4px;
}

.mlet-typing-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #667eea;
	animation: typingBounce 1.4s infinite;
}

.mlet-typing-dot:nth-child(2) {
	animation-delay: 0.2s;
}

.mlet-typing-dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes typingBounce {
	0%, 60%, 100% {
		transform: translateY(0);
	}
	30% {
		transform: translateY(-10px);
	}
}

/* Chat Input */
.mlet-assistant-input {
	padding: 16px;
	background: white;
	border-top: 1px solid #e0e0e0;
	display: flex;
	gap: 10px;
}

.mlet-assistant-input input {
	flex: 1;
	border: 2px solid #e0e0e0;
	border-radius: 24px;
	padding: 10px 16px;
	font-size: 14px;
	outline: none;
	transition: border-color 0.3s;
}

.mlet-assistant-input input:focus {
	border-color: #667eea;
}

.mlet-assistant-send {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s;
	font-size: 18px;
}

.mlet-assistant-send:hover {
	transform: scale(1.1);
}

.mlet-assistant-send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Scrollbar */
.mlet-assistant-messages::-webkit-scrollbar {
	width: 6px;
}

.mlet-assistant-messages::-webkit-scrollbar-track {
	background: transparent;
}

.mlet-assistant-messages::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

.mlet-assistant-messages::-webkit-scrollbar-thumb:hover {
	background: #999;
}

/* Responsive */
@media (max-width: 768px) {
	.mlet-assistant-widget {
		right: 20px;
		bottom: 20px;
	}
	
	.mlet-assistant-window {
		width: calc(100vw - 40px);
		height: calc(100vh - 120px);
		bottom: 90px;
		right: 20px;
		left: 20px;
	}
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
	.mlet-assistant-widget {
		right: 70px;
	}
	
	.mlet-assistant-window {
		right: 70px;
	}
}

/* Context Indicator */
.mlet-context-indicator {
	background: #fff3cd;
	border-left: 4px solid #ffc107;
	padding: 8px 12px;
	margin: 0 20px 12px 20px;
	border-radius: 4px;
	font-size: 12px;
	color: #856404;
	display: none;
}

.mlet-context-indicator.active {
	display: block;
}

.mlet-context-indicator strong {
	font-weight: 600;
}

