/**
 * MLM Chatbot Styles
 * 
 * استایل‌های چت‌بات (سازگار با هر دو دمو)
 * 
 * @package MLM
 * @since 1.0.0
 */

/* ============================================
   Escalation Styles
   ============================================ */
.mlm-chatbot-message-escalation-loading {
	align-self: flex-start;
	background-color: #f0f4ff;
	color: #333333;
	border: 1px solid #e0e7ff;
	border-radius: 12px;
	padding: 12px 16px;
	margin: 12px 0;
	max-width: 75%;
	display: flex;
	align-items: center;
}

.mlm-chatbot-escalation-content {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.mlm-chatbot-escalation-icon {
	flex-shrink: 0;
	color: #667eea;
	animation: spin 1s linear infinite;
}

.mlm-chatbot-escalation-text {
	flex: 1;
	min-width: 0;
}

.mlm-chatbot-escalation-title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #667eea;
}

.mlm-chatbot-escalation-subtitle {
	margin: 8px 0 0 0;
	font-size: 12px;
	color: #666666;
	line-height: 1.4;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.mlm-chatbot-message-admin {
	align-self: flex-start;
	background-color: #f3f4f6;
	color: #333333;
	border-left: 4px solid #667eea;
	border-radius: 8px;
	padding: 12px 16px;
	max-width: 75%;
	margin: 12px 0;
}

.mlm-chatbot-message-admin-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	gap: 8px;
}

.mlm-chatbot-message-admin-header strong {
	color: #667eea;
	font-size: 13px;
}

.mlm-chatbot-message-admin .mlm-chatbot-message-content {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.mlm-chatbot-message-system {
	align-self: center;
	background-color: #f0f0f0;
	color: #666666;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 12px;
	text-align: center;
	max-width: 80%;
	margin: 12px 0;
}

.mlm-chatbot-message-system p {
	margin: 0;
}

.mlm-chatbot-escalation-controls {
	position: fixed;
	bottom: calc(80px + 20px + env(safe-area-inset-bottom, 0));
	left: 0;
	right: 0;
	display: flex;
	gap: 8px;
	padding: 8px 16px;
	background-color: #f8f9fa;
	border-top: 1px solid #e0e0e0;
	z-index: 10000;
	justify-content: center;
}

.mlm-chatbot-escalation-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background-color: #667eea;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.mlm-chatbot-escalation-btn:hover {
	background-color: #5568d3;
	transform: translateY(-2px);
}

.mlm-chatbot-escalation-btn:active {
	transform: translateY(0);
}

.mlm-chatbot-escalation-btn svg {
	width: 16px;
	height: 16px;
}

.mlm-chatbot-btn-pause {
	background-color: #ff6b6b;
}

.mlm-chatbot-btn-pause:hover {
	background-color: #ff5252;
}

.mlm-chatbot-btn-resume {
	background-color: #4ade80;
}

.mlm-chatbot-btn-resume:hover {
	background-color: #22c55e;
}

/* ============================================
   Chat Icon Button
   ============================================ */
.mlm-chatbot-icon-wrapper {
	position: fixed;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 999998;
	transition: all 0.3s ease;
	color: #ffffff;
	background-color: #0073aa;
}

.mlm-chatbot-icon-wrapper:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.mlm-chatbot-icon-wrapper svg {
	width: 28px;
	height: 28px;
}

.mlm-chatbot-icon-wrapper .mlm-chatbot-icon-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

/* Icon Positions - RTL Support */
.mlm-chatbot-icon-bottom-right {
	bottom: 20px;
	right: 20px;
	left: auto;
}

.mlm-chatbot-icon-bottom-left {
	bottom: 20px;
	left: 20px;
	right: auto;
}

.mlm-chatbot-icon-top-right {
	top: 20px;
	right: 20px;
	left: auto;
}

.mlm-chatbot-icon-top-left {
	top: 20px;
	left: 20px;
	right: auto;
}

/* Notification Badge */
.mlm-chatbot-notification-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	width: 20px;
	height: 20px;
	background-color: #ff4444;
	border-radius: 50%;
	border: 2px solid #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: bold;
	color: #ffffff;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.1);
	}
}

/* ============================================
   Chat Modal
   ============================================ */
.mlm-chatbot-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: none;
	direction: rtl;
	overflow: hidden;
	overflow-x: hidden;
}

.mlm-chatbot-modal.active {
	display: flex;
}

.mlm-chatbot-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
}

.mlm-chatbot-modal-container {
	position: fixed;
	width: 90%;
	max-width: 420px;
	height: 600px;
	max-height: 85vh;
	background-color: #ffffff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	overflow-x: hidden;
	bottom: 20px;
	right: 20px;
	left: auto;
	top: auto;
	z-index: 999999;
	margin: 0;
	padding: 0;
}

/* Demo-specific styles */
.mlm-chatbot-demo-zhaket .mlm-chatbot-modal-container {
	border-radius: 8px;
}

.mlm-chatbot-demo-mlm .mlm-chatbot-modal-container {
	border-radius: 12px;
}

/* ============================================
   Modal Header
   ============================================ */
.mlm-chatbot-modal-header {
	/* Background color is set via inline style from settings */
	color: #ffffff;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	overflow: hidden;
	overflow-x: hidden;
	overflow-y: hidden;
	width: 100%;
	box-sizing: border-box;
	/* Hide scrollbar */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.mlm-chatbot-modal-header::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.mlm-chatbot-modal-header-content {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	overflow-x: hidden;
	overflow-y: hidden;
	/* Hide scrollbar */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.mlm-chatbot-modal-header-content::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.mlm-chatbot-header-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	overflow-x: hidden;
	overflow-y: hidden;
	/* Hide scrollbar */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.mlm-chatbot-header-text::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.mlm-chatbot-modal-subtitle {
	margin: 0;
	opacity: 0.9;
	line-height: 1.4;
	word-wrap: break-word;
	word-break: break-word;
	overflow-wrap: break-word;
	overflow-x: hidden;
	overflow-y: hidden;
	/* Hide scrollbar */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.mlm-chatbot-modal-subtitle::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.mlm-chatbot-status-indicator {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
}

.mlm-chatbot-status-dot {
	width: 8px;
	height: 8px;
	background-color: #4ade80;
	border-radius: 50%;
	animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

.mlm-chatbot-status-text {
	font-size: 12px;
	opacity: 0.9;
	color: inherit;
}

.mlm-chatbot-modal-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	word-wrap: break-word;
	word-break: break-word;
	overflow-wrap: break-word;
	overflow-x: hidden;
	overflow-y: hidden;
	/* Hide scrollbar */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.mlm-chatbot-modal-title::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

/* Avatars Container */
.mlm-chatbot-avatars-container {
	display: flex;
	align-items: center;
	position: relative;
	height: 40px;
	margin-left: 8px;
	width: 112px;
	max-width: 112px;
	min-width: 40px;
	flex-shrink: 0;
	overflow: hidden;
	overflow-x: hidden;
}

.mlm-chatbot-avatars-container img.mlm-chatbot-avatar {
	width: 40px !important;
	height: 40px !important;
	min-width: 40px !important;
	min-height: 40px !important;
	max-width: 40px !important;
	max-height: 40px !important;
	border-radius: 50% !important;
	border: 2px solid rgba(255, 255, 255, 0.8) !important;
	object-fit: cover !important;
	object-position: center center !important;
	position: absolute !important;
	background-color: #fff !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
	overflow: hidden !important;
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	top: 0 !important;
	flex-shrink: 0 !important;
}

.mlm-chatbot-avatars-container img.mlm-chatbot-avatar:nth-child(1) {
	z-index: 5 !important;
	left: 0 !important;
	right: auto !important;
}

.mlm-chatbot-avatars-container img.mlm-chatbot-avatar:nth-child(2) {
	z-index: 4 !important;
	left: 24px !important;
	right: auto !important;
}

.mlm-chatbot-avatars-container img.mlm-chatbot-avatar:nth-child(3) {
	z-index: 3 !important;
	left: 48px !important;
	right: auto !important;
}

.mlm-chatbot-avatars-container img.mlm-chatbot-avatar:nth-child(4) {
	z-index: 2 !important;
	left: 72px !important;
	right: auto !important;
}

.mlm-chatbot-modal-close {
	background: none;
	border: none;
	color: #ffffff;
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.8;
	transition: opacity 0.2s;
	border-radius: 4px;
	flex-shrink: 0;
	overflow: hidden;
	overflow-x: hidden;
	overflow-y: hidden;
	/* Hide scrollbar */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.mlm-chatbot-modal-close::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.mlm-chatbot-modal-close:hover {
	opacity: 1;
	background-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   Modal Body
   ============================================ */
.mlm-chatbot-modal-body {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 20px;
	display: flex;
	flex-direction: column;
	background-color: #f8f9fa;
	width: 100%;
	box-sizing: border-box;
	/* Hide scrollbar but keep scrolling functionality */
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE and Edge */
}

.mlm-chatbot-modal-body::-webkit-scrollbar {
	display: none; /* Chrome, Safari, Opera */
	width: 0;
	height: 0;
}

.mlm-chatbot-welcome-message {
	padding: 12px 16px;
	background-color: #e3f2fd;
	border-radius: 12px;
	margin-bottom: 16px;
	text-align: center;
	font-size: 14px;
	color: #1976d2;
	display: flex;
	align-items: center;
	gap: 12px;
	justify-content: flex-start;
	text-align: right;
}

.mlm-chatbot-welcome-avatar {
	flex-shrink: 0;
}

.mlm-chatbot-welcome-avatar img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(25, 118, 210, 0.2);
}

.mlm-chatbot-welcome-message p {
	margin: 0;
	flex: 1;
}

.mlm-chatbot-messages {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 0;
	width: 100%;
	overflow-x: hidden;
	box-sizing: border-box;
}

.mlm-chatbot-message {
	max-width: 75%;
	padding: 12px 16px;
	border-radius: 12px;
	word-wrap: break-word;
	word-break: break-word;
	overflow-wrap: break-word;
	animation: fadeIn 0.3s ease;
	box-sizing: border-box;
}

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

.mlm-chatbot-message-user {
	align-self: flex-end;
	/* Background color is set via inline style from settings */
	color: #ffffff;
	border-bottom-right-radius: 12px;
	border-bottom-left-radius: 4px;
}

.mlm-chatbot-message-assistant {
	align-self: flex-start;
	background-color: #ffffff;
	color: #333333;
	border: 1px solid #e0e0e0;
	border-bottom-left-radius: 12px;
	border-bottom-right-radius: 4px;
}

.mlm-chatbot-message-content {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	word-wrap: break-word;
	word-break: break-word;
	overflow-wrap: break-word;
	overflow-x: hidden;
}

.mlm-chatbot-message-content .mlm-chatbot-link {
	color: #667eea;
	text-decoration: none;
	font-weight: 500;
	border-bottom: 1px solid rgba(102, 126, 234, 0.3);
	transition: all 0.2s ease;
	word-break: break-all;
}

.mlm-chatbot-message-content .mlm-chatbot-link:hover {
	color: #5568d3;
	border-bottom-color: #5568d3;
	text-decoration: none;
}

.mlm-chatbot-message-assistant .mlm-chatbot-message-content .mlm-chatbot-link {
	color: #1976d2;
	border-bottom-color: rgba(25, 118, 210, 0.3);
}

.mlm-chatbot-message-assistant .mlm-chatbot-message-content .mlm-chatbot-link:hover {
	color: #1565c0;
	border-bottom-color: #1565c0;
}

.mlm-chatbot-message-time {
	font-size: 11px;
	opacity: 0.7;
	margin-top: 4px;
}

/* ============================================
   Typing Indicator
   ============================================ */
.mlm-chatbot-typing-indicator {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background-color: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	border-bottom-left-radius: 12px;
	border-bottom-right-radius: 4px;
	align-self: flex-start;
	margin-top: 12px;
	margin-bottom: 0;
	flex-wrap: nowrap;
	white-space: nowrap;
	width: auto;
	max-width: 75%;
	clear: both;
}

.mlm-chatbot-typing-dots {
	display: inline-flex;
	gap: 4px;
	flex-shrink: 0;
}

.mlm-chatbot-typing-dots span {
	width: 8px;
	height: 8px;
	background-color: #999999;
	border-radius: 50%;
	animation: typing 1.4s infinite;
	flex-shrink: 0;
}

.mlm-chatbot-typing-dots span:nth-child(2) {
	animation-delay: 0.2s;
}

.mlm-chatbot-typing-dots span:nth-child(3) {
	animation-delay: 0.4s;
}

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

.mlm-chatbot-typing-text {
	font-size: 14px;
	color: #666666;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ============================================
   Login Section
   ============================================ */
.mlm-chatbot-login-section {
	position: relative;
	margin-top: 16px;
	margin-bottom: 16px;
	z-index: 10;
}

.mlm-chatbot-login-bubble {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 16px;
	padding: 24px;
	box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
	color: #ffffff;
	position: relative;
	overflow: hidden;
}

.mlm-chatbot-login-bubble::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
	animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
		opacity: 0.5;
	}
	50% {
		transform: scale(1.1);
		opacity: 0.8;
	}
}

.mlm-chatbot-login-bubble-content {
	position: relative;
	z-index: 1;
}

.mlm-chatbot-login-bubble h4 {
	margin: 0 0 12px 0;
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
}

.mlm-chatbot-login-bubble p {
	margin: 0 0 20px 0;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.6;
}

.mlm-chatbot-login-form,
.mlm-chatbot-register-form {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 12px;
	padding: 20px;
	margin-top: 16px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mlm-chatbot-login-form h4,
.mlm-chatbot-register-form h4 {
	margin-top: 0;
	margin-bottom: 12px;
	color: #333333;
	font-size: 16px;
}

.mlm-chatbot-login-form p,
.mlm-chatbot-register-form p {
	margin-bottom: 16px;
	color: #666666;
	font-size: 14px;
}

.mlm-chatbot-login-toggle {
	margin-top: 12px;
	text-align: center;
}

.mlm-chatbot-toggle-link {
	color: #667eea;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.mlm-chatbot-toggle-link:hover {
	text-decoration: underline;
	color: #764ba2;
}

/* Disabled input state */
.mlm-chatbot-input:disabled {
	background-color: #f5f5f5;
	cursor: not-allowed;
	opacity: 0.6;
}

.mlm-chatbot-modal-footer:has(.mlm-chatbot-input:disabled) {
	opacity: 0.7;
	pointer-events: none;
}

.mlm-chatbot-login-toggle {
	margin-top: 12px;
	text-align: center;
}

.mlm-chatbot-toggle-link {
	color: #667eea;
	text-decoration: none;
	font-size: 14px;
}

.mlm-chatbot-toggle-link:hover {
	text-decoration: underline;
}

/* ============================================
   Modal Footer (Input)
   ============================================ */
.mlm-chatbot-modal-footer {
	padding: 16px;
	padding-bottom: calc(16px + env(safe-area-inset-bottom));
	background-color: #ffffff;
	border-top: 1px solid #e0e0e0;
	flex-shrink: 0;
	position: relative;
	z-index: 10;
	width: 100%;
	overflow: visible;
	box-sizing: border-box;
}

.mlm-chatbot-form {
	width: 100%;
	max-width: 100%;
	overflow: visible;
	box-sizing: border-box;
}

.mlm-chatbot-input-wrapper {
	display: flex;
	align-items: center;
	gap: 12px;
	background-color: #ffffff;
	border-radius: 0;
	padding: 12px 16px;
	position: relative;
	z-index: 10;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow: visible;
}

.mlm-chatbot-input {
	flex: 1;
	border: none !important;
	background-color: #ffffff;
	outline: none !important;
	font-size: 15px;
	color: #111827;
	padding: 0 16px;
	height: 44px;
	border-radius: 8px;
	direction: rtl;
	box-sizing: border-box;
	min-width: 0;
	transition: all 0.2s ease;
	box-shadow: none !important;
}

.mlm-chatbot-input:focus {
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	background-color: #ffffff;
}

.mlm-chatbot-input::placeholder {
	color: #9ca3af;
	font-weight: 400;
	font-size: 13px;
}

.mlm-chatbot-attach-btn,
.mlm-chatbot-emoji-btn,
.mlm-chatbot-mic-btn,
.mlm-chatbot-send-btn {
	background: transparent;
	border: none;
	color: #6b7280;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
	flex-shrink: 0;
	padding: 0;
}

.mlm-chatbot-attach-btn:hover,
.mlm-chatbot-emoji-btn:hover,
.mlm-chatbot-mic-btn:hover,
.mlm-chatbot-send-btn:hover {
	background-color: #f3f4f6;
	color: #374151;
}

.mlm-chatbot-send-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.mlm-chatbot-attach-btn svg,
.mlm-chatbot-emoji-btn svg,
.mlm-chatbot-mic-btn svg,
.mlm-chatbot-send-btn svg {
	width: 20px;
	height: 20px;
}

/* Emoji Picker */
.mlm-chatbot-emoji-picker {
	position: absolute;
	bottom: calc(100% + 10px);
	left: 0;
	right: 0;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	max-height: 300px;
	overflow-y: auto;
	padding: 12px;
	z-index: 10000;
	display: none;
	grid-template-columns: repeat(8, 1fr);
	gap: 8px;
	scrollbar-width: thin;
	scrollbar-color: #d0d0d0 #f0f0f0;
}

.mlm-chatbot-emoji-picker::-webkit-scrollbar {
	width: 6px;
}

.mlm-chatbot-emoji-picker::-webkit-scrollbar-track {
	background: #f0f0f0;
	border-radius: 3px;
}

.mlm-chatbot-emoji-picker::-webkit-scrollbar-thumb {
	background: #d0d0d0;
	border-radius: 3px;
}

.mlm-chatbot-emoji-picker::-webkit-scrollbar-thumb:hover {
	background: #b0b0b0;
}

.mlm-chatbot-emoji-picker .emoji-item {
	font-size: 24px;
	cursor: pointer;
	padding: 4px;
	text-align: center;
	border-radius: 6px;
	transition: background-color 0.2s;
	user-select: none;
	line-height: 1.2;
}

.mlm-chatbot-emoji-picker .emoji-item:hover {
	background-color: #f0f0f0;
}

/* File Message Styles */
.mlm-chatbot-file-message {
	margin-top: 8px;
}

.mlm-chatbot-file-message img,
.mlm-chatbot-file-message video {
	max-width: 100%;
	border-radius: 8px;
}

.mlm-chatbot-file-message audio {
	width: 100%;
	max-width: 300px;
}

.mlm-chatbot-file-link {
	padding: 8px 12px;
	background-color: #f0f0f0;
	border-radius: 8px;
}

.mlm-chatbot-file-link a {
	color: #667eea;
	text-decoration: none;
	font-weight: 500;
}

.mlm-chatbot-file-link a:hover {
	text-decoration: underline;
}

/* Product Card */
.mlm-chatbot-product-card {
	margin-top: 12px;
	margin-bottom: 8px;
	max-width: 75%;
	align-self: flex-start;
}

.mlm-chatbot-product-link {
	display: flex;
	background-color: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mlm-chatbot-product-link:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
	border-color: #667eea;
	text-decoration: none;
	color: inherit;
}

.mlm-chatbot-product-image {
	width: 120px;
	height: 120px;
	flex-shrink: 0;
	background-color: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.mlm-chatbot-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mlm-chatbot-product-info {
	flex: 1;
	padding: 16px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.mlm-chatbot-product-title {
	font-size: 15px;
	font-weight: 600;
	color: #333333;
	line-height: 1.4;
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.mlm-chatbot-product-price {
	font-size: 16px;
	font-weight: 700;
	color: #667eea;
	margin-top: auto;
}

.mlm-chatbot-product-price .woocommerce-Price-amount {
	color: #667eea;
}

/* Mobile styles for product card */
@media (max-width: 768px) {
	.mlm-chatbot-product-card {
		max-width: 85%;
	}
	
	.mlm-chatbot-product-image {
		width: 100px;
		height: 100px;
	}
	
	.mlm-chatbot-product-info {
		padding: 12px;
	}
	
	.mlm-chatbot-product-title {
		font-size: 14px;
	}
	
	.mlm-chatbot-product-price {
		font-size: 15px;
	}
}

/* Recording state */
.mlm-chatbot-mic-btn.recording {
	background-color: #ff4444 !important;
	color: #ffffff !important;
	animation: pulse-recording 1s infinite;
}

@keyframes pulse-recording {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 768px) {
	.mlm-chatbot-modal {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 999998;
		width: 100%;
		height: 100vh;
		height: 100dvh;
	}
	
	.mlm-chatbot-modal-overlay {
		display: none;
	}
	
	.mlm-chatbot-modal-container {
		width: 100% !important;
		height: 100vh !important;
		height: 100dvh !important;
		max-height: 100vh !important;
		max-height: 100dvh !important;
		border-radius: 0 !important;
		top: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
		position: fixed !important;
		margin: 0 !important;
		padding: 0 !important;
		box-shadow: none !important;
		padding-top: env(safe-area-inset-top, 0) !important;
		padding-left: env(safe-area-inset-left, 0) !important;
		padding-right: env(safe-area-inset-right, 0) !important;
	}
	
	.mlm-chatbot-modal-header {
		padding-top: 16px !important;
		padding-left: 20px !important;
		padding-right: 20px !important;
		padding-bottom: 16px !important;
		flex-shrink: 0;
		overflow: hidden !important;
		overflow-x: hidden !important;
		overflow-y: hidden !important;
		scrollbar-width: none !important;
		-ms-overflow-style: none !important;
		width: 100% !important;
		box-sizing: border-box !important;
	}
	
	.mlm-chatbot-modal-header::-webkit-scrollbar {
		display: none !important;
		width: 0 !important;
		height: 0 !important;
	}
	
	.mlm-chatbot-modal-header-content {
		overflow: hidden !important;
		overflow-x: hidden !important;
		overflow-y: hidden !important;
		scrollbar-width: none !important;
		-ms-overflow-style: none !important;
	}
	
	.mlm-chatbot-modal-header-content::-webkit-scrollbar {
		display: none !important;
		width: 0 !important;
		height: 0 !important;
	}
	
	.mlm-chatbot-modal-body {
		padding-left: 20px !important;
		padding-right: 20px !important;
		padding-top: 0 !important;
		padding-bottom: calc(100px + 20px) !important;
		flex: 1;
		min-height: 0;
		overflow-y: auto;
		overflow-x: hidden;
		-webkit-overflow-scrolling: touch;
		width: 100% !important;
		box-sizing: border-box !important;
		/* Hide scrollbar but keep scrolling functionality */
		scrollbar-width: none;
		-ms-overflow-style: none;
	}
	
	.mlm-chatbot-modal-body::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
	}
	
	.mlm-chatbot-modal-footer {
		padding-left: 16px !important;
		padding-right: 16px !important;
		padding-top: 16px !important;
		padding-bottom: calc(16px + env(safe-area-inset-bottom, 0)) !important;
		position: fixed !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
		flex-shrink: 0;
		background-color: #ffffff !important;
		z-index: 10001 !important;
		width: 100% !important;
		box-sizing: border-box !important;
		border-top: 1px solid #e0e0e0 !important;
	}
	
	.mlm-chatbot-emoji-picker {
		z-index: 10002 !important;
		position: absolute !important;
		bottom: calc(100% + 10px) !important;
	}
	
	.mlm-chatbot-icon-wrapper {
		width: 56px;
		height: 56px;
	}
	
	.mlm-chatbot-message {
		max-width: 85%;
	}
	
	.mlm-chatbot-login-section {
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		padding-left: calc(20px + env(safe-area-inset-left, 0));
		padding-right: calc(20px + env(safe-area-inset-right, 0));
		padding-top: calc(20px + env(safe-area-inset-top, 0));
		padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
	}
}

/* ============================================
   Scrollbar Styling - Hidden but functional
   ============================================ */
.mlm-chatbot-modal-header {
	/* Hide scrollbar if any */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.mlm-chatbot-modal-header::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.mlm-chatbot-modal-header-content {
	/* Hide scrollbar if any */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.mlm-chatbot-modal-header-content::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.mlm-chatbot-messages {
	/* Hide scrollbar if any */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.mlm-chatbot-messages::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

