#erc-chat-root {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.erc-bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--erc-color, #2563eb);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,0.25);
	transition: transform 0.15s ease;
}
.erc-bubble:hover { transform: scale(1.06); }
.erc-bubble svg { width: 28px; height: 28px; fill: #fff; }

.erc-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #ef4444;
	color: #fff;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	min-width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
}

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

.erc-header {
	background: var(--erc-color, #2563eb);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.erc-header-title { font-weight: 600; font-size: 15px; }
.erc-close { cursor: pointer; opacity: 0.85; background: none; border: none; color: #fff; font-size: 18px; line-height: 1; }
.erc-close:hover { opacity: 1; }

.erc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f7f8fa;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.erc-msg {
	max-width: 80%;
	padding: 9px 12px;
	border-radius: 14px;
	font-size: 13.5px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.erc-msg-visitor {
	align-self: flex-end;
	background: var(--erc-color, #2563eb);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.erc-msg-admin, .erc-msg-bot {
	align-self: flex-start;
	background: #e9eaee;
	color: #1f2430;
	border-bottom-left-radius: 4px;
}

.erc-welcome {
	align-self: flex-start;
	background: #e9eaee;
	color: #1f2430;
	padding: 9px 12px;
	border-radius: 14px;
	border-bottom-left-radius: 4px;
	font-size: 13.5px;
	max-width: 85%;
}

.erc-precontact {
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #fff;
}
.erc-precontact input {
	padding: 9px 10px;
	border: 1px solid #d8dae0;
	border-radius: 8px;
	font-size: 13.5px;
}
.erc-precontact button {
	background: var(--erc-color, #2563eb);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 9px 10px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}

.erc-input-row {
	display: flex;
	border-top: 1px solid #e6e7eb;
	padding: 10px;
	gap: 8px;
	background: #fff;
}
.erc-input-row textarea {
	flex: 1;
	resize: none;
	border: 1px solid #d8dae0;
	border-radius: 10px;
	padding: 8px 10px;
	font-size: 13.5px;
	font-family: inherit;
	max-height: 70px;
}
.erc-send-btn {
	background: var(--erc-color, #2563eb);
	border: none;
	color: #fff;
	border-radius: 10px;
	padding: 0 14px;
	cursor: pointer;
	font-weight: 600;
	font-size: 13.5px;
}
.erc-send-btn:disabled { opacity: 0.5; cursor: default; }

.erc-status {
	font-size: 11px;
	color: #8b8f99;
	text-align: center;
	padding: 4px 0 0;
}
