.mpbot-root {
	--mpbot-primary: #4338ca;
	--mpbot-secondary: #7c3aed;
	--mpbot-background: #f8fafc;
	--mpbot-surface: #ffffff;
	--mpbot-text: #334155;
	--mpbot-muted: #64748b;
	--mpbot-border: #e2e8f0;
	--mpbot-user-message: #4338ca;
	--mpbot-header-start: #0f172a;
	--mpbot-header-end: #7c3aed;
	all: initial;
	color-scheme: light;
	color: var(--mpbot-text);
	direction: rtl;
	display: block !important;
	font-family: 'Vazirmatn', 'IRANSansX', Tahoma, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	position: relative;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	z-index: 2147483647;
}

.mpbot-root *,
.mpbot-root *::before,
.mpbot-root *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.mpbot-root button,
.mpbot-root textarea {
	font: inherit;
}

.mpbot-root button {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	touch-action: manipulation;
	transition: all 0.2s ease;
}

.mpbot-root button:focus-visible,
.mpbot-root textarea:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--mpbot-primary) 28%, transparent);
	outline-offset: 2px;
}

.mpbot-root svg:not(.mpbot-lottie-icon svg) {
	display: block !important;
	fill: none !important;
	height: 100% !important;
	stroke: currentColor !important;
	stroke-linecap: round !important;
	stroke-linejoin: round !important;
	stroke-width: 2.5 !important;
	width: 100% !important;
}

/* === Sticky Launcher - Fixed Position Above All Elements === */
body .mpbot-launcher,
body div.mpbot-root > .mpbot-launcher {
	position: fixed !important;
	position: fixed;
	bottom: 30px !important;
	right: 30px !important;
	left: auto !important;
	width: 80px !important;
	height: 80px !important;
	min-width: 80px !important;
	min-height: 80px !important;
	border-radius: 50% !important;
	background: linear-gradient(135deg, #0f172a 0%, #4338ca 45%, #7c3aed 100%) !important;
	color: #fff !important;
	display: grid !important;
	place-items: center !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: 0 8px 30px rgba(67, 56, 202, 0.45), 0 0 60px rgba(124, 58, 237, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
	cursor: pointer !important;
	z-index: 2147483647 !important;
	overflow: visible !important;
	visibility: visible !important;
	opacity: 1 !important;
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease !important;
	animation: mpbot-launcher-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite, mpbot-launcher-grow 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both !important;
	/* Prevent stacking context issues with Elementor */
	transform-origin: center center !important;
	will-change: transform, box-shadow !important;
	contain: layout style paint !important;
}

/* Ensure the launcher is truly on top of everything */
body .mpbot-launcher:hover,
body div.mpbot-root > .mpbot-launcher:hover {
	transform: scale(1.1) !important;
	box-shadow: 0 12px 40px rgba(67, 56, 202, 0.55), 0 0 80px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

body .mpbot-launcher.is-active,
body div.mpbot-root > .mpbot-launcher.is-active {
	transform: rotate(90deg) scale(1.1) !important;
}

/* Remove any inherited transform from parent containers */
.mpbot-root .mpbot-launcher,
.mpbot-panel ~ .mpbot-launcher {
	position: fixed !important;
	bottom: 30px !important;
	right: 30px !important;
	left: auto !important;
}

/* Pulse animation to always show the icon */
@keyframes mpbot-launcher-pulse {
	0% {
		box-shadow: 0 8px 30px rgba(67, 56, 202, 0.45), 0 0 0 0 rgba(124, 58, 237, 0.4);
	}
	25% {
		box-shadow: 0 8px 30px rgba(67, 56, 202, 0.45), 0 0 0 12px rgba(124, 58, 237, 0);
	}
	50% {
		box-shadow: 0 8px 30px rgba(67, 56, 202, 0.45), 0 0 0 0 rgba(124, 58, 237, 0);
	}
	75% {
		box-shadow: 0 8px 30px rgba(67, 56, 202, 0.45), 0 0 0 12px rgba(124, 58, 237, 0);
	}
	100% {
		box-shadow: 0 8px 30px rgba(67, 56, 202, 0.45), 0 0 0 0 rgba(124, 58, 237, 0);
	}
}

@keyframes mpbot-launcher-grow {
	0% {
		transform: scale(0) translateY(20px);
		opacity: 0;
	}
	60% {
		transform: scale(1.15) translateY(0);
		opacity: 1;
	}
	100% {
		transform: scale(1) translateY(0);
		opacity: 1;
	}
}

/* Bounce animation on hover */
@keyframes mpbot-launcher-bounce {
	0%, 100% { transform: translateY(0); }
	30% { transform: translateY(-6px); }
	60% { transform: translateY(-2px); }
}

/* Icon inside launcher */
body .mpbot-launcher svg,
body .mpbot-launcher span,
body div.mpbot-root > .mpbot-launcher svg,
body div.mpbot-root > .mpbot-launcher span {
	width: 38px !important;
	height: 38px !important;
	min-width: 38px !important;
	min-height: 38px !important;
	max-width: 38px !important;
	max-height: 38px !important;
	stroke-width: 1.8 !important;
	flex-shrink: 0 !important;
}

body .mpbot-launcher span.mpbot-launcher-custom,
body div.mpbot-root > .mpbot-launcher span.mpbot-launcher-custom {
	font-size: 36px !important;
	font-weight: 800;
}

/* Media image launcher */
.mpbot-launcher-media {
	width: 100% !important;
	height: 100% !important;
	border-radius: 50% !important;
	object-fit: cover !important;
}

/* Ensure launcher always renders above Elementor sticky elements */
.mpbot-launcher {
	position: fixed !important;
	bottom: 30px !important;
	right: 30px !important;
	left: auto !important;
	z-index: 2147483647 !important;
	width: 80px !important;
	height: 80px !important;
	min-width: 80px !important;
	min-height: 80px !important;
	animation: mpbot-launcher-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite, mpbot-launcher-grow 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both !important;
}

.mpbot-launcher svg,
.mpbot-launcher-custom {
	width: 38px !important;
	height: 38px !important;
	min-width: 38px !important;
	min-height: 38px !important;
	max-width: 38px !important;
	max-height: 38px !important;
}

.mpbot-launcher-custom {
	font-size: 36px !important;
}

/* Hide scrollbar for launcher area on some browsers */
.mpbot-launcher::-webkit-scrollbar {
	display: none !important;
}

/* Panel (chat box) */
.mpbot-panel {
	background: var(--mpbot-surface);
	border: 1px solid var(--mpbot-border);
	border-radius: 28px;
	bottom: 124px;
	box-shadow: 0 30px 90px color-mix(in srgb, var(--mpbot-header-start) 24%, transparent), 0 8px 24px color-mix(in srgb, var(--mpbot-header-start) 10%, transparent), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
	display: flex;
	flex-direction: column;
	height: min(720px, calc(100dvh - 148px));
	overflow: hidden;
	position: fixed;
	right: 30px;
	transform: translateY(20px) scale(0.96);
	transform-origin: bottom right;
	transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	width: min(460px, calc(100vw - 60px));
	backdrop-filter: blur(20px);
	z-index: 2147483647 !important;
	/* Prevent Elementor stacking context issues */
	will-change: transform, opacity;
	contain: layout style paint;
}

.mpbot-panel.is-open {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.mpbot-panel:not(.is-open) {
	opacity: 0;
	pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 600px) {
	body .mpbot-launcher,
	body div.mpbot-root > .mpbot-launcher {
		bottom: 18px !important;
		right: 18px !important;
		width: 64px !important;
		height: 64px !important;
		min-width: 64px !important;
		min-height: 64px !important;
		animation: mpbot-launcher-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
	}
	body .mpbot-launcher svg,
	body .mpbot-launcher span,
	body div.mpbot-root > .mpbot-launcher svg,
	body div.mpbot-root > .mpbot-launcher span {
		width: 30px !important;
		height: 30px !important;
		min-width: 30px !important;
		min-height: 30px !important;
	}
	.mpbot-panel {
		bottom: 92px;
		right: 0;
		width: 100% !important;
		border-radius: 28px 28px 0 0;
		transform-origin: bottom right;
	}
}

@media (max-width: 480px) {
	body .mpbot-launcher,
	body div.mpbot-root > .mpbot-launcher {
		bottom: 14px !important;
		right: 14px !important;
		width: 56px !important;
		height: 56px !important;
		min-width: 56px !important;
		min-height: 56px !important;
	}
	body .mpbot-launcher svg,
	body .mpbot-launcher span,
	body div.mpbot-root > .mpbot-launcher svg,
	body div.mpbot-root > .mpbot-launcher span {
		width: 26px !important;
		height: 26px !important;
		min-width: 26px !important;
		min-height: 26px !important;
	}
}

/* Ensure elementor sticky containers don't affect our launcher */
.elementor-sticky--fixed,
.elementor-sticky {
	z-index: auto !important;
}

/* High z-index override for any Elementor elements */
body .mpbot-launcher {
	z-index: 999999999 !important;
}

.mpbot-panel {
	background: var(--mpbot-surface);
	border: 1px solid var(--mpbot-border);
	border-radius: 28px;
	bottom: 24px;
	box-shadow: 0 30px 90px color-mix(in srgb, var(--mpbot-header-start) 24%, transparent), 0 8px 24px color-mix(in srgb, var(--mpbot-header-start) 10%, transparent), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
	display: flex;
	flex-direction: column;
	height: min(720px, calc(100dvh - 48px));
	overflow: hidden;
	position: fixed;
	right: 30px;
	transform: translateY(20px) scale(0.96);
	transform-origin: bottom right;
	transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	width: min(460px, calc(100vw - 48px));
	backdrop-filter: blur(20px);
	z-index: 2147483647 !important;
}

.mpbot-panel.is-open {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.mpbot-panel:not(.is-open) {
	opacity: 0;
	pointer-events: none;
}

.mpbot-panel-header {
	align-items: center;
	background: linear-gradient(135deg, var(--mpbot-header-start) 0%, var(--mpbot-primary) 55%, var(--mpbot-secondary) 100%);
	color: #fff;
	display: flex;
	gap: 14px;
	justify-content: space-between;
	min-height: 80px;
	padding: 16px 20px;
	position: relative;
	overflow: hidden;
}

.mpbot-panel-header::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -50%;
	width: 100% !important;
	height: 200%;
	background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
	pointer-events: none;
}

.mpbot-title-wrap {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	position: relative;
	z-index: 1;
}

.mpbot-eyebrow {
	color: rgba(255, 255, 255, 0.65);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.3px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-transform: uppercase;
}

.mpbot-panel-title {
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -0.3px;
	line-height: 1.4;
	margin: 0;
}

.mpbot-header-actions {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
	position: relative;
	z-index: 1;
}

.mpbot-new-chat {
	color: #fff;
	align-items: center;
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	color: #fff;
	display: inline-flex;
	font-size: 11px;
	font-weight: 700;
	gap: 6px;
	height: 36px;
	justify-content: center;
	padding: 0 14px;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
	white-space: nowrap;
	backdrop-filter: blur(4px);
}

.mpbot-new-chat:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.35);
	transform: translateY(-1px);
}

.mpbot-new-chat svg {
	height: 20px !important;
		min-width: 20px !important;
		min-height: 20px !important;
		stroke-width: 2.2 !important;
	width: 20px !important;
}

.mpbot-icon-button {
	color: #fff;
	align-items: center;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	color: #fff;
	display: grid;
	height: 36px;
	justify-items: center;
	padding: 0;
	transition: background 0.2s ease, transform 0.15s ease;
	width: 36px;
}

.mpbot-icon-button:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: scale(1.05);
}

.mpbot-icon-button svg {
	height: 24px !important;
		min-width: 24px !important;
		min-height: 24px !important;
		stroke-width: 2.5 !important;
	width: 24px !important;
}

.mpbot-panel-body {
	background: var(--mpbot-background);
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	position: relative;
}

.mpbot-messages {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 14px;
	min-height: 0;
	min-width: 0;
	overflow-y: auto;
	padding: 20px 16px 14px;
	scrollbar-color: var(--mpbot-muted) transparent;
	scrollbar-width: thin;
}

.mpbot-messages::-webkit-scrollbar {
	width: 6px;
}

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

.mpbot-messages::-webkit-scrollbar-thumb {
	background: color-mix(in srgb, var(--mpbot-muted) 50%, transparent);
	border-radius: 3px;
}

.mpbot-empty-state {
	align-items: center;
	background: linear-gradient(135deg, color-mix(in srgb, var(--mpbot-surface) 85%, var(--mpbot-background)), color-mix(in srgb, var(--mpbot-surface) 90%, var(--mpbot-background)));
	border: 1px dashed color-mix(in srgb, var(--mpbot-primary) 25%, var(--mpbot-border));
	border-radius: 20px;
	color: var(--mpbot-text);
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: auto;
	max-width: 320px;
	padding: 32px 24px;
	text-align: center;
	width: 100% !important;
	animation: mpbot-fade-in 0.5s ease 0.2s both;
}

@keyframes mpbot-fade-in {
	0% { opacity: 0; transform: translateY(10px); }
	100% { opacity: 1; transform: translateY(0); }
}

.mpbot-empty-state strong {
	color: var(--mpbot-primary);
	font-size: 16px;
	font-weight: 800;
}

.mpbot-empty-state p {
	font-size: 13px;
	line-height: 1.9;
	margin: 0;
	color: var(--mpbot-muted);
}

.mpbot-empty-icon {
	align-items: center;
	background: linear-gradient(135deg, color-mix(in srgb, var(--mpbot-primary) 12%, var(--mpbot-surface)), color-mix(in srgb, var(--mpbot-secondary) 12%, var(--mpbot-surface)));
	border-radius: 20px;
	color: color-mix(in srgb, var(--mpbot-primary) 75%, var(--mpbot-secondary));
	display: grid;
	height: 56px;
	justify-items: center;
	width: 56px;
	box-shadow: 0 4px 12px color-mix(in srgb, var(--mpbot-primary) 15%, transparent);
}

.mpbot-empty-icon svg {
	height: 28px;
	width: 28px;
}

.mpbot-message {
	align-items: flex-start;
	display: flex;
	justify-content: flex-start;
	max-width: 88%;
	animation: mpbot-slide-in 0.3s ease both;
}

@keyframes mpbot-slide-in {
	0% { opacity: 0; transform: translateY(8px); }
	100% { opacity: 1; transform: translateY(0); }
}

.mpbot-message-assistant {
	align-self: flex-end;
	justify-content: flex-end;
}

.mpbot-message-user {
	align-self: flex-start;
	justify-content: flex-start;
}

.mpbot-message-system {
	align-self: center;
	justify-content: center;
	max-width: 96%;
}

.mpbot-bubble {
	background: var(--mpbot-surface);
	border: 1px solid var(--mpbot-border);
	border-radius: 18px 18px 6px 18px;
	box-shadow: 0 4px 12px color-mix(in srgb, var(--mpbot-text) 4%, transparent);
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px 15px 10px;
	max-width: 100% !important;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.mpbot-message-user .mpbot-bubble {
	background: linear-gradient(135deg, var(--mpbot-primary), var(--mpbot-secondary));
	border-color: transparent;
	border-radius: 18px 18px 18px 6px;
	color: #fff;
	box-shadow: 0 6px 20px color-mix(in srgb, var(--mpbot-primary) 30%, transparent);
}

.mpbot-message-error .mpbot-bubble {
	background: color-mix(in srgb, #fef2f2 80%, var(--mpbot-surface));
	border-color: color-mix(in srgb, #ef4444 40%, var(--mpbot-border));
	color: #dc2626;
}

.mpbot-message-system .mpbot-bubble {
	background: color-mix(in srgb, var(--mpbot-surface) 94%, var(--mpbot-text));
	border-color: color-mix(in srgb, #ef4444 40%, var(--mpbot-border));
	border-radius: 16px;
	color: #dc2626;
	font-weight: 600;
	font-size: 13px;
}

.mpbot-message-text {
	color: var(--mpbot-text);
	font-size: 13.5px;
	line-height: 1.8;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

.mpbot-message-user .mpbot-message-text {
	color: #fff;
}

.mpbot-message-time {
	color: var(--mpbot-muted);
	font-size: 10px;
	text-align: left;
	font-weight: 500;
}

.mpbot-message-user .mpbot-message-time {
	color: rgba(255, 255, 255, 0.65);
}

.mpbot-typing {
	color: var(--mpbot-secondary);
	font-size: 12px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 4px;
}

.mpbot-typing::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--mpbot-secondary);
	animation: mpbot-typing-dot 1.4s infinite;
}

@keyframes mpbot-typing-dot {
	0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
	30% { opacity: 1; transform: scale(1.2); }
}

.mpbot-suggestions {
	background: linear-gradient(135deg, color-mix(in srgb, var(--mpbot-surface) 97%, var(--mpbot-primary)), color-mix(in srgb, var(--mpbot-surface) 95%, var(--mpbot-secondary)));
	border: 1px solid var(--mpbot-border);
	border-radius: 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 2px 0;
	padding: 14px 16px;
	animation: mpbot-fade-in 0.4s ease both;
}

.mpbot-suggestions-title {
	color: var(--mpbot-muted);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.mpbot-suggestion {
	align-items: center;
	background: var(--mpbot-surface);
	border: 1px solid var(--mpbot-border);
	border-radius: 14px;
	color: var(--mpbot-text);
	display: flex;
	font-size: 13px;
	font-weight: 600;
	justify-content: space-between;
	padding: 12px 14px;
	text-align: right;
	transition: all 0.2s ease;
	width: 100% !important;
	cursor: pointer;
}

.mpbot-suggestion:hover {
	background: color-mix(in srgb, var(--mpbot-surface) 90%, var(--mpbot-primary));
	border-color: var(--mpbot-primary);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px color-mix(in srgb, var(--mpbot-primary) 15%, transparent);
}

.mpbot-suggestion::after {
	content: '→';
	flex: 0 0 auto;
	margin-right: 8px;
	color: var(--mpbot-primary);
	font-weight: 700;
}

.mpbot-composer {
	align-items: flex-end;
	background: var(--mpbot-surface);
	border-top: 1px solid var(--mpbot-border);
	display: flex;
	gap: 10px;
	padding: 14px 16px 18px;
}

.mpbot-input {
	background: color-mix(in srgb, var(--mpbot-border) 30%, var(--mpbot-surface));
	border: 1px solid var(--mpbot-border);
	border-radius: 18px;
	color: var(--mpbot-text);
	display: block !important;
	font-size: 13.5px;
	line-height: 1.7;
	max-height: 120px;
	min-height: 48px;
	outline: none;
	padding: 12px 16px;
	resize: none;
	transition: all 0.25s ease;
	width: 100% !important;
	direction: rtl;
}

.mpbot-input::placeholder {
	color: var(--mpbot-muted);
}

.mpbot-input:focus {
	background: #fff;
	border-color: var(--mpbot-secondary);
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.mpbot-input:disabled {
	background: #f1f5f9;
	color: var(--mpbot-muted);
	cursor: wait;
}

.mpbot-input.is-over-limit {
	border-color: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.mpbot-send {
	align-items: center;
	background: linear-gradient(135deg, var(--mpbot-primary), var(--mpbot-secondary));
	border-radius: 18px;
	box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
	color: #fff;
	display: flex;
	font-size: 14px;
	font-weight: 700;
	flex: 0 0 auto;
	height: 48px;
	justify-content: center;
	padding: 0 18px;
	transition: all 0.25s ease;
	white-space: nowrap;
	touch-action: manipulation;
}

.mpbot-send:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.mpbot-send:active:not(:disabled) {
	transform: translateY(0);
}

.mpbot-send:disabled {
	cursor: wait;
	opacity: 0.5;
}


.mpbot-root.is-busy .mpbot-send {
	animation: mpbot-pulse-btn 1.5s ease-in-out infinite;
}

@keyframes mpbot-pulse-btn {
	50% { opacity: 0.7; }
}

.mpbot-ai-animated {
	animation: mpbot-ai-zoom 2s ease-in-out infinite;
}

.mpbot-ai-animated svg {
	filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.6));
}

.mpbot-ai-animated svg path {
	stroke: url(#mpbot-ai-gradient);
}

@keyframes mpbot-ai-zoom {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.25); }
}

.mpbot-icon-gemini path {
	fill: url(#mpbot-ai-gradient);
	stroke: none;
}

.mpbot-icon-gemini {
	color: #f0abfc;
}

.mpbot-lottie-icon {
	display: block !important;
	height: 100%;
	width: 100% !important;
}

.mpbot-lottie-icon svg {
	display: block !important;
	height: 100% !important;
	width: 100% !important;
}

.mpbot-launcher .mpbot-lottie-icon {
	height: 26px;
	width: 26px;
}

.mpbot-empty-icon .mpbot-empty-icon-inner {
	height: 28px;
	width: 28px;
}

.mpbot-contact-form {
	align-self: flex-start;
	background: var(--mpbot-surface);
	border: 1px solid color-mix(in srgb, var(--mpbot-primary) 30%, var(--mpbot-border));
	border-radius: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 4px 0;
	max-width: 340px;
	padding: 20px;
	width: 100% !important;
	box-shadow: 0 8px 24px color-mix(in srgb, var(--mpbot-primary) 8%, transparent);
	animation: mpbot-fade-in 0.4s ease both;
}

.mpbot-contact-title {
	color: var(--mpbot-primary);
	font-size: 14px;
	font-weight: 800;
	margin: 0;
	text-align: center;
}

.mpbot-contact-field {
	color: var(--mpbot-text);
	display: flex;
	flex-direction: column;
	font-size: 12px;
	font-weight: 600;
	gap: 6px;
}

.mpbot-contact-input {
	background: color-mix(in srgb, var(--mpbot-border) 28%, var(--mpbot-surface));
	border: 1px solid var(--mpbot-border);
	border-radius: 14px;
	color: var(--mpbot-text);
	font-size: 13.5px;
	outline: none;
	padding: 10px 14px;
	transition: all 0.25s ease;
	direction: rtl;
}

.mpbot-contact-input:focus {
	border-color: var(--mpbot-secondary);
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.mpbot-contact-submit {
	align-items: center;
	background: linear-gradient(135deg, var(--mpbot-primary), var(--mpbot-secondary));
	border-radius: 14px;
	color: #fff;
	display: flex;
	font-size: 13px;
	font-weight: 700;
	justify-content: center;
	justify-self: start;
	min-height: 44px;
	padding: 0 18px;
	transition: all 0.25s ease;
	width: fit-content;
	box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.mpbot-contact-submit:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.mpbot-contact-submit:disabled {
	cursor: wait;
	opacity: 0.6;
}

.mpbot-contact-error {
	color: #dc2626;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	text-align: center;
}

.mpbot-footer {
	align-items: center;
	background: color-mix(in srgb, var(--mpbot-surface) 97%, var(--mpbot-primary));
	border-top: 1px solid var(--mpbot-border);
	color: var(--mpbot-muted);
	display: flex;
	font-size: 10px;
	gap: 12px;
	justify-content: space-between;
	min-height: 24px;
	padding: 4px 16px;
}

.mpbot-char-counter {
	font-size: 10px;
	font-weight: 600;
}

.mpbot-char-counter.is-over {
	color: #dc2626;
	font-weight: 800;
}

.mpbot-root.is-contact-pending .mpbot-panel-header {
	opacity: 0.7;
}

@media (max-width: 600px) {
	.mpbot-launcher {
		border-radius: 50%;
		bottom: 18px;
		height: 60px;
		right: 18px;
		width: 60px;
	}
	.mpbot-launcher svg,
	.mpbot-launcher-custom {
		height: 30px !important;
		width: 30px !important;
	}
	.mpbot-panel {
		border-radius: 0;
		bottom: 0;
		height: 100dvh;
		right: 0;
		width: 100% !important;
		border-radius: 28px 28px 0 0;
		transform-origin: bottom right;
	}
	.mpbot-panel.is-open {
		transform: translateY(0) scale(1);
	}
}

@media (max-width: 480px) {
	.mpbot-panel-header {
		gap: 8px;
		padding: 12px 14px;
		min-height: 70px;
		opacity: 1 !important;
		visibility: visible !important;
		display: flex !important;
	}
	.mpbot-new-chat {
		padding: 0 12px;
		width: auto;
		min-width: 120px;
	}
	.mpbot-new-chat span {
		display: inline;
	}
	.mpbot-panel-title {
		font-size: 16px;
	}
	.mpbot-messages {
		padding: 16px 12px 10px;
	}
	.mpbot-message {
		max-width: 92%;
	}
	.mpbot-contact-form {
		max-width: 100% !important;
	}
}

@media (max-height: 620px) {
	.mpbot-panel {
		height: calc(100dvh - 20px);
		transform-origin: bottom left;
	}
	.mpbot-panel-header {
		min-height: 66px;
	}
	.mpbot-messages {
		padding-top: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mpbot-launcher,
	.mpbot-panel,
	.mpbot-message,
	.mpbot-empty-state,
	.mpbot-suggestion,
	.mpbot-contact-form,
	.mpbot-new-chat,
	.mpbot-icon-button {
		animation: none !important;
		transition: none !important;
	}
}

/* === Markdown Styles === */
.mpbot-message-text h1 {
	font-size: 20px;
	font-weight: 800;
	margin: 0 0 8px;
	color: var(--mpbot-primary);
	line-height: 1.4;
}

.mpbot-message-text h2 {
	font-size: 18px;
	font-weight: 700;
	margin: 10px 0 6px;
	color: var(--mpbot-primary);
	line-height: 1.4;
}

.mpbot-message-text h3 {
	font-size: 16px;
	font-weight: 700;
	margin: 8px 0 4px;
	color: var(--mpbot-text);
	line-height: 1.4;
}

.mpbot-message-text h4 {
	font-size: 15px;
	font-weight: 700;
	margin: 6px 0 4px;
	color: var(--mpbot-text);
}

.mpbot-message-text h5 {
	font-size: 14px;
	font-weight: 700;
	margin: 4px 0;
	color: var(--mpbot-text);
}

.mpbot-message-text h6 {
	font-size: 13px;
	font-weight: 700;
	margin: 4px 0;
	color: var(--mpbot-muted);
}

.mpbot-message-text strong {
	font-weight: 800;
	color: var(--mpbot-primary);
}

.mpbot-message-text em {
	font-style: italic;
	color: var(--mpbot-secondary);
}

.mpbot-message-text del {
	text-decoration: line-through;
	color: var(--mpbot-muted);
}

.mpbot-message-text code {
	background: color-mix(in srgb, var(--mpbot-muted) 15%, var(--mpbot-surface));
	border: 1px solid var(--mpbot-border);
	border-radius: 6px;
	padding: 2px 6px;
	font-size: 12px;
	font-family: 'Vazirmatn', 'IRANSansX', monospace;
	color: var(--mpbot-secondary);
	direction: ltr;
	text-align: left;
}

.mpbot-message-text .mpbot-inline-code {
	background: color-mix(in srgb, var(--mpbot-muted) 15%, var(--mpbot-surface));
	border: 1px solid var(--mpbot-border);
	border-radius: 6px;
	padding: 2px 6px;
	font-size: 12px;
	font-family: 'Vazirmatn', 'IRANSansX', monospace;
	color: var(--mpbot-secondary);
}

.mpbot-message-text .mpbot-code-block {
	background: #1e1e2e;
	border: 1px solid #313244;
	border-radius: 12px;
	padding: 14px 16px;
	margin: 8px 0;
	overflow-x: auto;
	direction: ltr;
	text-align: left;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mpbot-message-text .mpbot-code-block code {
	background: none;
	border: none;
	padding: 0;
	color: #cdd6f4;
	font-size: 13px;
	line-height: 1.7;
}

.mpbot-message-text .mpbot-code-block code.language-python {
	color: #89d4b8;
}

.mpbot-message-text .mpbot-code-block code.language-javascript {
	color: #89b4fa;
}

.mpbot-message-text .mpbot-code-block code.language-css {
	color: #89d4fa;
}

.mpbot-message-text .mpbot-code-block code.language-html {
	color: #fab387;
}

.mpbot-message-text a {
	color: var(--mpbot-primary);
	cursor: pointer;
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, var(--mpbot-primary) 40%, transparent);
	font-weight: 600;
	transition: color 0.2s ease;
}

.mpbot-message-text a:hover {
	color: var(--mpbot-secondary);
	text-decoration-color: var(--mpbot-secondary);
}

.mpbot-message-text p {
	margin: 0 0 8px;
	line-height: 1.8;
}

.mpbot-message-text p:last-child {
	margin-bottom: 0;
}

.mpbot-message-text ul,
.mpbot-message-text ol {
	margin: 6px 0;
	padding-right: 20px;
	line-height: 1.8;
}

.mpbot-message-text li {
	margin-bottom: 4px;
}

.mpbot-message-text blockquote {
	border-right: 3px solid var(--mpbot-primary);
	background: color-mix(in srgb, var(--mpbot-primary) 8%, var(--mpbot-surface));
	border-radius: 0 10px 10px 0;
	margin: 8px 0;
	padding: 10px 16px;
	color: var(--mpbot-text);
	font-style: italic;
}

.mpbot-message-text blockquote p:last-child {
	margin-bottom: 0;
}

.mpbot-message-text hr {
	border: none;
	border-top: 2px solid var(--mpbot-border);
	margin: 12px 0;
}

.mpbot-message-text ul {
	list-style-type: disc;
}

.mpbot-message-text ol {
	list-style-type: decimal;
}

/* === New Message Styles === */
.mpbot-message-assistant .mpbot-bubble {
	background: linear-gradient(135deg, #f8f7ff, #f0edff);
	border: 1px solid #e0d8f5;
	border-radius: 18px 18px 6px 18px;
	box-shadow: 0 4px 12px rgba(118, 101, 229, 0.08);
}

.mpbot-message-user .mpbot-bubble {
	background: linear-gradient(135deg, var(--mpbot-primary), var(--mpbot-secondary));
	border-color: transparent;
	border-radius: 18px 18px 18px 6px;
	color: #fff;
	box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.mpbot-message-user .mpbot-message-text {
	color: #fff;
}

.mpbot-message-user .mpbot-message-text strong {
	color: #fff;
}

.mpbot-message-user .mpbot-message-text em {
	color: rgba(255, 255, 255, 0.85);
}

.mpbot-message-user .mpbot-message-text code {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.mpbot-message-user .mpbot-message-text a {
	color: #fff;
	cursor: pointer;
	text-decoration-color: rgba(255, 255, 255, 0.4);
}

.mpbot-message-user .mpbot-message-text a:hover {
	color: rgba(255, 255, 255, 0.85);
}

.mpbot-message-user .mpbot-code-block {
	background: rgba(0, 0, 0, 0.25);
	border-color: rgba(255, 255, 255, 0.15);
}

.mpbot-message-user .mpbot-code-block code {
	color: #cdd6f4;
}

/* === Empty State Animation === */
.mpbot-empty-icon {
	animation: mpbot-empty-breathe 2s ease-in-out infinite;
}

@keyframes mpbot-empty-breathe {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.08); }
}

/* === Message Typing Indicator === */
.mpbot-typing {
	color: var(--mpbot-secondary);
	font-size: 12px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 4px;
}

.mpbot-typing::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--mpbot-secondary);
	animation: mpbot-typing-dot 1.4s infinite;
}

@keyframes mpbot-typing-dot {
	0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
	30% { opacity: 1; transform: scale(1.2); }
}

/* === Suggestion Button Styles === */
.mpbot-suggestion {
	position: relative;
	overflow: hidden;
}

.mpbot-suggestion::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100% !important;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.08), transparent);
	transition: left 0.5s ease;
}

.mpbot-suggestion:hover::before {
	left: 100%;
}

.mpbot-suggestion::after {
	content: '→';
	flex: 0 0 auto;
	margin-right: 8px;
	color: var(--mpbot-primary);
	font-weight: 700;
}

/* === Elementor Compatibility - Force Sticky Position === */
@supports (position: sticky) or (position: fixed) {
	.mpbot-launcher {
		position: fixed !important;
		bottom: 30px !important;
		right: 30px !important;
		left: auto !important;
		z-index: 999999999 !important;
		animation: mpbot-launcher-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
	}
}

/* Override Elementor sticky container z-index */
.elementor-sticky--fixed,
.elementor-sticky,
.elementor-top-section,
.elementor-sticky--fixed .elementor-container {
	z-index: auto !important;
	transform: none !important;
}

/* Ensure launcher always appears above sticky elements */
body .mpbot-launcher,
body div.mpbot-root > .mpbot-launcher {
	z-index: 999999999 !important;
	position: fixed !important;
	bottom: 30px !important;
	right: 30px !important;
	left: auto !important;
}

/* Mobile adjustments */
@media (max-width: 600px) {
	body .mpbot-launcher,
	body div.mpbot-root > .mpbot-launcher {
		bottom: 18px !important;
		right: 18px !important;
		width: 64px !important;
		height: 64px !important;
		min-width: 64px !important;
		min-height: 64px !important;
	}
	body .mpbot-launcher svg,
	body .mpbot-launcher span,
	body div.mpbot-root > .mpbot-launcher svg,
	body div.mpbot-root > .mpbot-launcher span {
		width: 30px !important;
		height: 30px !important;
		min-width: 30px !important;
		min-height: 30px !important;
	}
	.mpbot-panel {
		right: 0 !important;
		bottom: 92px;
		width: 100% !important;
		border-radius: 28px 28px 0 0;
	}
}

@media (max-width: 480px) {
	body .mpbot-launcher,
	body div.mpbot-root > .mpbot-launcher {
		bottom: 14px !important;
		right: 14px !important;
		width: 56px !important;
		height: 56px !important;
		min-width: 56px !important;
		min-height: 56px !important;
	}
	body .mpbot-launcher svg,
	body .mpbot-launcher span,
	body div.mpbot-root > .mpbot-launcher svg,
	body div.mpbot-root > .mpbot-launcher span {
		width: 26px !important;
		height: 26px !important;
		min-width: 26px !important;
		min-height: 26px !important;
	}
}

/* Link with external target indicator */
.mpbot-message-text a[target="_blank"]::after {
	content: ' ↗';
	font-size: 10px;
	opacity: 0.6;
}

.mpbot-message-user .mpbot-message-text a[target="_blank"]::after {
	color: rgba(255, 255, 255, 0.7);
}

/* Code block language label */
.mpbot-code-block code[class*="language-"]::before {
	content: attr(class);
	display: block !important;
	font-size: 10px;
	color: #6c7086;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.mpbot-message-user .mpbot-code-block code[class*="language-"]::before {
	color: #6c7086;
}

/* Better link in code */
.mpbot-message-text .mpbot-inline-code a {
	color: inherit;
	text-decoration: underline;
}

/* Prevent empty paragraph */
.mpbot-message-text p:empty {
	display: none;
}
