:root { --mbdc-accent: #0a66c2; }

.mbdc-chat {
	display: flex; flex-direction: column;
	width: 100%; max-width: 420px; height: 520px;
	background: #fff; color: #1d1d1f;
	border: 1px solid #e3e3e8; border-radius: 14px;
	box-shadow: 0 10px 30px rgba(0,0,0,.12);
	font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	overflow: hidden; box-sizing: border-box;
}
.mbdc-chat * { box-sizing: border-box; }
.mbdc-header { background: var(--mbdc-accent); color: #fff; padding: 12px 16px; font-weight: 600; }
.mbdc-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f7f7f9; }
.mbdc-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.mbdc-assistant { align-self: flex-start; background: #fff; border: 1px solid #e3e3e8; border-bottom-left-radius: 4px; }
.mbdc-user { align-self: flex-end; background: var(--mbdc-accent); color: #fff; border-bottom-right-radius: 4px; }
.mbdc-typing { color: #888; animation: mbdc-pulse 1s infinite alternate; }
.mbdc-error { border-color: #e0a3a3; background: #fff5f5; color: #a12626; }
@keyframes mbdc-pulse { from { opacity: .4; } to { opacity: 1; } }

.mbdc-choices { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 100%; }
.mbdc-choice {
	border: 1px solid var(--mbdc-accent); background: #fff; color: var(--mbdc-accent);
	border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer;
	transition: background .15s, color .15s;
}
.mbdc-choice:hover, .mbdc-choice:focus-visible { background: var(--mbdc-accent); color: #fff; outline: none; }

.mbdc-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e3e3e8; background: #fff; }
.mbdc-input { flex: 1; resize: none; border: 1px solid #d2d2d7; border-radius: 10px; padding: 8px 10px; font: inherit; color: inherit; background: #fff; }
.mbdc-input:focus { outline: 2px solid var(--mbdc-accent); outline-offset: -1px; }
.mbdc-send { border: 0; border-radius: 10px; padding: 0 14px; background: var(--mbdc-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.mbdc-send:disabled { opacity: .5; cursor: wait; }
.mbdc-note { font-size: 11.5px; color: #6e6e73; padding: 0 12px 10px; background: #fff; }

.mbdc-inline .mbdc-chat { margin: 1em auto; }

#mbdc-floating { position: fixed; right: 20px; bottom: 20px; z-index: 99999; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.mbdc-panel .mbdc-chat { width: 370px; height: 500px; }
.mbdc-launcher {
	border: 0; border-radius: 999px; padding: 12px 18px;
	background: var(--mbdc-accent); color: #fff;
	font: 600 15px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	box-shadow: 0 6px 18px rgba(0,0,0,.2); cursor: pointer;
}

@media (max-width: 480px) {
	#mbdc-floating { right: 12px; bottom: 12px; left: 12px; }
	.mbdc-panel { width: 100%; }
	.mbdc-panel .mbdc-chat { width: 100%; max-width: none; height: 70vh; }
}
