#slc-chat-root, #slc-chat-root * {
	box-sizing: border-box;
}

.slc-bubble {
	position: fixed;
	bottom: 22px;
	right: 22px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--slc-color, #2271b1);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0,0,0,.25);
	z-index: 999998;
	transition: transform .15s ease;
}
.slc-bubble:hover { transform: scale(1.06); }
.slc-bubble svg { width: 28px; height: 28px; fill: #fff; }

.slc-bubble .slc-unread-dot {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #e53935;
	border: 2px solid #fff;
	display: none;
}
.slc-bubble.has-unread .slc-unread-dot { display: block; }

.slc-window {
	position: fixed;
	bottom: 96px;
	right: 22px;
	width: 340px;
	max-width: calc(100vw - 32px);
	height: 480px;
	max-height: calc(100vh - 140px);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 40px rgba(0,0,0,.25);
	display: none;
	flex-direction: column;
	overflow: hidden;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.slc-window.open { display: flex; }

.slc-header {
	background: var(--slc-color, #2271b1);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-shrink: 0;
}
.slc-header h4 { margin: 0; font-size: 15px; font-weight: 600; }
.slc-header .slc-close { cursor: pointer; opacity: .85; font-size: 20px; line-height: 1; background: none; border: none; color: #fff; }
.slc-header .slc-close:hover { opacity: 1; }

.slc-body {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f5f6f8;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.slc-msg {
	max-width: 80%;
	padding: 8px 12px;
	border-radius: 14px;
	font-size: 13.5px;
	line-height: 1.4;
	word-wrap: break-word;
	white-space: pre-wrap;
}
.slc-msg.visitor {
	align-self: flex-end;
	background: var(--slc-color, #2271b1);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.slc-msg.admin {
	align-self: flex-start;
	background: #fff;
	color: #222;
	border: 1px solid #e2e4e8;
	border-bottom-left-radius: 4px;
}
.slc-msg-time {
	font-size: 10px;
	opacity: .6;
	margin-top: 2px;
}

.slc-form {
	padding: 12px;
	border-top: 1px solid #eceef1;
	flex-shrink: 0;
	background: #fff;
}
.slc-form input, .slc-form textarea {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #d7d9dd;
	border-radius: 8px;
	font-size: 13.5px;
	margin-bottom: 8px;
	font-family: inherit;
	resize: none;
}
.slc-form button {
	width: 100%;
	padding: 10px;
	border: none;
	border-radius: 8px;
	background: var(--slc-color, #2271b1);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	font-size: 13.5px;
}
.slc-form button:hover { opacity: .92; }

.slc-prechat p { margin: 0 0 12px; font-size: 13.5px; color: #444; }

.slc-row {
	display: flex;
	gap: 8px;
	align-items: flex-end;
}
.slc-row textarea { margin-bottom: 0; flex: 1; min-height: 38px; max-height: 90px; }
.slc-row button { width: auto; padding: 9px 14px; }

.slc-closed-note {
	text-align: center;
	font-size: 12px;
	color: #888;
	padding: 6px 0;
}

@media (max-width: 480px) {
	.slc-window {
		right: 10px;
		bottom: 86px;
		width: calc(100vw - 20px);
	}
	.slc-bubble { right: 16px; bottom: 16px; }
}
