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

#lc-widget-root[data-position="left"] {
	right: auto;
	left: 20px;
}

#lc-widget-root[data-position="left"] .lc-panel {
	right: auto;
	left: 0;
}

.lc-bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--lc-color, #2563eb);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	border: none;
	position: relative;
	opacity: 1;
	transform: scale(1);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.lc-bubble-hidden {
	opacity: 0;
	transform: scale(0.8);
	pointer-events: none;
}

.lc-bubble svg { width: 28px; height: 28px; }

.lc-bubble-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #ef4444;
	color: #fff;
	border-radius: 50%;
	min-width: 20px;
	height: 20px;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	font-weight: 600;
}

.lc-bubble-dot {
	position: absolute;
	bottom: -2px;
	right: -2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: #9ca3af;
}

.lc-header-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lc-status-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #9ca3af;
	flex-shrink: 0;
}

.lc-dot-online { background: #22c55e; }
.lc-dot-offline { background: #ef4444; }

.lc-panel {
	position: absolute;
	bottom: 76px;
	right: 0;
	width: 340px;
	max-height: 480px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(10px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.lc-panel.lc-open {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.lc-panel-header {
	background: var(--lc-color, #2563eb);
	color: #fff;
	padding: 14px 16px;
	font-weight: 600;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.lc-panel-header .lc-close {
	cursor: pointer;
	opacity: 0.85;
	font-size: 20px;
	line-height: 1;
	background: none;
	border: none;
	color: #fff;
}

.lc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px 16px;
	background: #f4f5f7;
	min-height: 220px;
}

.lc-msg {
	max-width: 80%;
	padding: 8px 12px;
	border-radius: 14px;
	margin-bottom: 8px;
	font-size: 14px;
	line-height: 1.4;
	word-wrap: break-word;
}

.lc-msg-admin {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-bottom-left-radius: 4px;
}

.lc-msg-visitor {
	background: var(--lc-color, #2563eb);
	color: #fff;
	margin-left: auto;
	border-bottom-right-radius: 4px;
}

.lc-precontact {
	padding: 14px 16px;
	background: #fff;
}

.lc-precontact input {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	margin-bottom: 8px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 16px;
}

.lc-precontact button {
	width: 100%;
	padding: 9px;
	background: var(--lc-color, #2563eb);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
}

.lc-input-row {
	display: flex;
	border-top: 1px solid #e5e7eb;
	background: #fff;
}

.lc-attach-btn {
	border: none;
	background: none;
	color: #6b7280;
	padding: 0 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
}

.lc-attach-btn svg {
	width: 20px;
	height: 20px;
}

.lc-attach-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.lc-msg-image {
	max-width: 100%;
	max-height: 200px;
	border-radius: 8px;
	display: block;
	cursor: pointer;
}

.lc-msg-file {
	display: inline-block;
	color: inherit;
	text-decoration: underline;
	font-size: 13px;
}

.lc-input-row textarea {
	flex: 1;
	border: none;
	resize: none;
	padding: 12px;
	font-size: 16px;
	font-family: inherit;
	outline: none;
	max-height: 80px;
}

.lc-input-row button {
	border: none;
	background: none;
	color: var(--lc-color, #2563eb);
	font-weight: 600;
	padding: 0 16px;
	cursor: pointer;
}

.lc-branding {
	text-align: center;
	font-size: 11px;
	color: #9ca3af;
	padding: 6px 0 8px;
	background: #fff;
	border-top: 1px solid #f3f4f6;
}

@media (max-width: 480px) {
	.lc-panel {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		height: 100vh;
		height: 100dvh;
		max-height: none;
		border-radius: 0;
	}

	.lc-panel-header {
		padding-top: max(14px, env(safe-area-inset-top));
	}

	.lc-input-row textarea {
		max-height: 120px;
	}
}

