#mcw-chatbot-root {
	--mcw-primary: #2271b1;
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

#mcw-chatbot-root.mcw-position-right { right: 24px; }
#mcw-chatbot-root.mcw-position-left { left: 24px; }

.mcw-toggle-btn {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--mcw-primary);
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
	float: right;
}
#mcw-chatbot-root.mcw-position-left .mcw-toggle-btn { float: left; }

.mcw-toggle-btn:hover { transform: scale(1.06); }
.mcw-toggle-btn svg { width: 26px; height: 26px; fill: #fff; }

.mcw-window {
	position: absolute;
	bottom: 76px;
	width: 340px;
	max-width: calc(100vw - 32px);
	height: 480px;
	max-height: 70vh;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	display: none;
	flex-direction: column;
	overflow: hidden;
}
#mcw-chatbot-root.mcw-position-right .mcw-window { right: 0; }
#mcw-chatbot-root.mcw-position-left .mcw-window { left: 0; }
#mcw-chatbot-root.mcw-open .mcw-window { display: flex; }

.mcw-header {
	background: var(--mcw-primary);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}
.mcw-header-title { font-weight: 600; font-size: 15px; }
.mcw-close-btn {
	background: transparent;
	border: none;
	color: #fff;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	padding: 0;
}

.mcw-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f5f6f7;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mcw-msg {
	max-width: 82%;
	padding: 9px 13px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
}
.mcw-msg-bot {
	align-self: flex-start;
	background: #fff;
	color: #222;
	border-bottom-left-radius: 4px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.mcw-msg-user {
	align-self: flex-end;
	background: var(--mcw-primary);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.mcw-msg-error {
	align-self: center;
	background: #fdecea;
	color: #a02622;
	font-size: 12.5px;
}
.mcw-msg-typing {
	align-self: flex-start;
	background: #fff;
	color: #999;
	font-style: italic;
}

.mcw-input-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #e5e5e5;
	flex-shrink: 0;
	background: #fff;
}
.mcw-input {
	flex: 1;
	resize: none;
	border: 1px solid #d8d8d8;
	border-radius: 18px;
	padding: 9px 14px;
	font-size: 14px;
	max-height: 90px;
	line-height: 1.4;
	font-family: inherit;
}
.mcw-input:focus { outline: none; border-color: var(--mcw-primary); }

.mcw-send-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: var(--mcw-primary);
	color: #fff;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mcw-send-btn:disabled { opacity: 0.5; cursor: default; }
.mcw-send-btn svg { width: 17px; height: 17px; fill: #fff; }

@media (max-width: 480px) {
	.mcw-window { width: calc(100vw - 32px); }
}
