#mf-ai-root,
#mf-ai-root * {
	box-sizing: border-box;
	font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}
#mf-ai-root { direction: rtl; }

/* دکمه شناور */
#mf-ai-launcher {
	position: fixed;
	right: 25px;
	bottom: 25px;
	width: 62px;
	height: 62px;
	border: none;
	border-radius: 50%;
	background: linear-gradient(145deg, #ffd83d, #dca900);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 999999;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
	transition: 0.3s;
}
#mf-ai-launcher:hover { transform: translateY(-4px); }

.mf-robot {
	width: 28px;
	height: 22px;
	background: #111;
	border-radius: 9px;
	position: relative;
}
.mf-robot:before {
	content: "";
	position: absolute;
	width: 4px;
	height: 7px;
	background: #111;
	top: -7px;
	left: 12px;
	border-radius: 5px;
}
.mf-robot:after {
	content: "";
	position: absolute;
	width: 5px;
	height: 5px;
	background: #ffd83d;
	border-radius: 50%;
	left: 6px;
	top: 8px;
	box-shadow: 10px 0 #ffd83d;
}

/* پنجره چت */
#mf-ai-chat {
	position: fixed;
	right: 25px;
	bottom: 100px;
	width: 360px;
	height: 500px;
	max-width: calc(100vw - 40px);
	background: linear-gradient(145deg, #151a20, #080a0d);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 22px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	z-index: 999998;
	box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
	opacity: 0;
	visibility: hidden;
	transform: translateY(25px) scale(0.96);
	transition: 0.35s ease;
}
#mf-ai-chat.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.mf-ai-header {
	height: 65px;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
}
.mf-ai-profile { display: flex; align-items: center; gap: 10px; }
.mf-ai-avatar {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: linear-gradient(145deg, #ffd83d, #dca900);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.mf-ai-title { color: #fff; font-size: 13px; font-weight: 800; }
.mf-ai-status { color: #35d27b; font-size: 10px; }

#mf-ai-close {
	width: 32px;
	height: 32px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: rgba(255, 255, 255, 0.05);
	position: relative;
	cursor: pointer;
}
#mf-ai-close:before, #mf-ai-close:after {
	content: "";
	position: absolute;
	width: 15px;
	height: 2px;
	background: #aaa;
	top: 15px;
	left: 8px;
}
#mf-ai-close:before { transform: rotate(45deg); }
#mf-ai-close:after { transform: rotate(-45deg); }

#mf-ai-messages { flex: 1; overflow-y: auto; padding: 14px; }

.mf-msg { display: flex; margin-bottom: 12px; }
.mf-msg.bot { justify-content: flex-start; }
.mf-msg.user { justify-content: flex-end; }

.mf-bubble { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 12.5px; line-height: 1.9; }
.bot .mf-bubble { background: #171d23; color: #eee; border-top-right-radius: 5px; }
.user .mf-bubble { background: #f5c400; color: #111; font-weight: 600; border-top-left-radius: 5px; }

.mf-options { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; max-width: 88%; }
.mf-option {
	width: 100%;
	padding: 10px;
	border-radius: 11px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	text-align: right;
	font-size: 12px;
	transition: 0.25s;
}
.mf-option:hover { border-color: #f5c400; background: rgba(245, 196, 0, 0.08); }

.mf-input-area { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); flex-shrink: 0; }
#mf-ai-input {
	flex: 1;
	height: 38px;
	border-radius: 10px;
	background: #151a20;
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #fff;
	padding: 0 12px;
	outline: none;
}
#mf-ai-send {
	width: 42px;
	height: 38px;
	border: none;
	border-radius: 10px;
	background: #f5c400;
	cursor: pointer;
	font-size: 15px;
}
.mf-input-area.mf-hidden { display: none; }

@media (max-width: 600px) {
	#mf-ai-chat { right: 10px; left: 10px; width: auto; bottom: 90px; height: 460px; }
	#mf-ai-launcher { right: 15px; bottom: 15px; }
}
