#mch-chat-widget, #mch-chat-widget * {
	box-sizing: border-box;
	font-family: var(--mch-font, 'Poppins', sans-serif);
}

#mch-chat-widget {
	position: fixed;
	bottom: 24px;
	z-index: 999999;
}
#mch-chat-widget.mch-pos-right { right: 24px; }
#mch-chat-widget.mch-pos-left  { left: 24px; }

#mch-chat-toggle {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--mch-primary, #08A0B3);
	color: var(--mch-secondary, #fff);
	border: none;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(8,160,179,0.32);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .2s ease, box-shadow .2s ease;
}
#mch-chat-toggle:hover { transform: scale(1.06); }
#mch-chat-toggle svg { width: 22px; height: 22px; }

#mch-chat-window {
	position: absolute;
	bottom: 66px;
	width: 320px;
	max-width: 90vw;
	height: 440px;
	max-height: 70vh;
	background: var(--mch-secondary, #fff);
	border-radius: 14px;
	box-shadow: 0 12px 36px rgba(20,40,45,0.16);
	border: 1px solid rgba(8,160,179,0.08);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: mch-pop .18s ease;
}
#mch-chat-widget.mch-pos-right #mch-chat-window { right: 0; }
#mch-chat-widget.mch-pos-left  #mch-chat-window { left: 0; }
.mch-hidden { display: none !important; }

@keyframes mch-pop {
	from { opacity: 0; transform: translateY(10px) scale(.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mch-chat-header {
	background: var(--mch-primary, #08A0B3);
	color: var(--mch-secondary, #fff);
	padding: 11px 14px;
	display: flex;
	align-items: center;
}
.mch-header-info { display: flex; align-items: center; gap: 8px; }
.mch-header-info strong { font-size: 13px; font-weight: 600; letter-spacing: .1px; }
.mch-sub { font-size: 10.5px; opacity: .85; margin-top: 1px; }
.mch-dot {
	width: 7px; height: 7px; border-radius: 50%;
	background: #33e08a; display: inline-block;
	box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
	flex-shrink: 0;
}

.mch-chat-body {
	flex: 1;
	overflow-y: auto;
	padding: 13px;
	background: #f7fafb;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mch-msg {
	max-width: 84%;
	padding: 8px 11px;
	border-radius: 12px;
	font-size: 12.5px;
	line-height: 1.42;
	word-wrap: break-word;
}
.mch-msg.bot {
	background: #fff;
	color: #2b2b2b;
	border: 1px solid #e9eef0;
	align-self: flex-start;
	border-bottom-left-radius: 3px;
}
.mch-msg.user {
	background: var(--mch-primary, #08A0B3);
	color: var(--mch-secondary, #fff);
	align-self: flex-end;
	border-bottom-right-radius: 3px;
}
.mch-msg.typing { display: flex; gap: 4px; align-items: center; padding: 12px 14px; }
.mch-msg.typing span {
	width: 6px; height: 6px; border-radius: 50%;
	background: var(--mch-primary, #08A0B3);
	opacity: .5;
	animation: mch-blink 1.1s infinite ease-in-out;
}
.mch-msg.typing span:nth-child(2) { animation-delay: .15s; }
.mch-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes mch-blink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }

.mch-chat-input-row {
	display: flex;
	align-items: flex-end;
	gap: 7px;
	padding: 9px;
	border-top: 1px solid #eef2f3;
	background: #fff;
}
#mch-chat-input {
	flex: 1;
	resize: none;
	border: 1px solid #dfe7e9;
	border-radius: 9px;
	padding: 8px 11px;
	font-size: 12.5px;
	max-height: 80px;
	outline: none;
}
#mch-chat-input:focus { border-color: var(--mch-primary, #08A0B3); }

#mch-chat-send {
	width: 34px;
	height: 34px;
	border-radius: 9px;
	border: none;
	background: var(--mch-primary, #08A0B3);
	color: var(--mch-secondary, #fff);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
#mch-chat-send svg { width: 16px; height: 16px; }
#mch-chat-send:disabled { opacity: .5; cursor: not-allowed; }

.mch-powered {
	text-align: center;
	font-size: 9.5px;
	color: #a3aeb1;
	padding: 4px 0 7px;
	background: #fff;
}

/* Inline lead-capture form */
.mch-lead-form {
	background: #fff;
	border: 1px solid #e9eef0;
	border-radius: 12px;
	padding: 12px;
	align-self: stretch;
	max-width: 92%;
}
.mch-lead-form-title {
	font-size: 12px;
	font-weight: 600;
	color: #1c2b2e;
	margin-bottom: 8px;
}
.mch-lead-form input {
	width: 100%;
	border: 1px solid #dfe7e9;
	border-radius: 8px;
	padding: 7px 10px;
	font-size: 12px;
	margin-bottom: 7px;
	outline: none;
	box-sizing: border-box;
}
.mch-lead-form input:focus { border-color: var(--mch-primary, #08A0B3); }
.mch-lead-form-actions { display: flex; gap: 6px; margin-top: 2px; }
.mch-lead-submit {
	flex: 1;
	background: var(--mch-primary, #08A0B3);
	color: var(--mch-secondary, #fff);
	border: none;
	border-radius: 8px;
	padding: 7px 0;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}
.mch-lead-skip {
	background: transparent;
	color: #8a969a;
	border: none;
	font-size: 11px;
	cursor: pointer;
	padding: 7px 8px;
}

@media (max-width: 480px) {
	#mch-chat-window { width: 90vw; height: 72vh; bottom: 64px; }
}
