#svc-chat-root {
	position: fixed;
	bottom: 20px;
	z-index: 999999;
	font-family: var(--svc-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
}
#svc-chat-root.svc-pos-right { right: 20px; }
#svc-chat-root.svc-pos-left { left: 20px; }

.svc-bubble {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: var(--svc-color, #2563eb);
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0,0,0,0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
	position: relative;
	overflow: hidden;
	padding: 0;
}
.svc-bubble:hover { transform: scale(1.06); }
.svc-bubble svg { width: 26px; height: 26px; }
.svc-bubble img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

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

.svc-panel {
	position: absolute;
	bottom: 72px;
	width: 340px;
	max-width: calc(100vw - 40px);
	height: 460px;
	max-height: calc(100vh - 120px);
	background: var(--svc-bg, #fff);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(0,0,0,0.22);
	display: none;
	flex-direction: column;
	overflow: hidden;
}
#svc-chat-root.svc-pos-right .svc-panel { right: 0; }
#svc-chat-root.svc-pos-left .svc-panel { left: 0; }
.svc-panel.svc-open { display: flex; }

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

.svc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: var(--svc-messages-bg, #f7f8fa);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

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

.svc-input-row {
	display: flex;
	border-top: 1px solid #eaeaee;
	padding: 10px;
	gap: 8px;
}
.svc-input {
	flex: 1;
	border: 1px solid #e2e3e8;
	border-radius: 20px;
	padding: 9px 14px;
	font-size: 13.5px;
	resize: none;
	outline: none;
	font-family: inherit;
	color: var(--svc-text, #1f2430);
	background: var(--svc-bg, #fff);
	max-height: 80px;
}
.svc-input:focus { border-color: var(--svc-color, #2563eb); }

.svc-send {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: var(--svc-color, #2563eb);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.svc-send:disabled { opacity: 0.5; cursor: default; }
.svc-send svg { width: 16px; height: 16px; }

@media (max-width: 480px) {
	.svc-panel { width: calc(100vw - 24px); height: calc(100vh - 100px); }
}
