#edc-root {
	--edc-accent: #2563eb;
	--edc-bg: #ffffff;
	--edc-surface: #f4f6fa;
	--edc-text: #111827;
	--edc-muted: #6b7280;
	--edc-border: #e5e7eb;
	position: fixed;
	bottom: 20px;
	z-index: 2147483000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--edc-text);
}
#edc-root.edc-pos-right { right: 20px; }
#edc-root.edc-pos-left { left: 20px; }

#edc-root *, #edc-root *::before, #edc-root *::after { box-sizing: border-box; }
#edc-root button, #edc-root input, #edc-root textarea, #edc-root select {
	font: inherit;
	color: inherit;
	margin: 0;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
}
#edc-root button { cursor: pointer; background: none; border: 0; padding: 0; line-height: 1.3; }
#edc-root svg { width: 100%; height: 100%; display: block; }
#edc-root p { margin: 0; }
#edc-root [hidden] { display: none !important; }

/* Launcher */
#edc-root .edc-launcher {
	position: relative;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--edc-accent);
	color: #fff;
	display: grid;
	place-items: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
	transition: transform .2s ease;
}
#edc-root .edc-launcher:hover { transform: scale(1.06); }
#edc-root .edc-launcher > span { width: 26px; height: 26px; grid-area: 1 / 1; transition: opacity .2s, transform .2s; }
#edc-root .edc-ic-close { opacity: 0; transform: rotate(-90deg); }
#edc-root.edc-open .edc-ic-open { opacity: 0; transform: rotate(90deg); }
#edc-root.edc-open .edc-ic-close { opacity: 1; transform: none; }
#edc-root .edc-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	border: 2px solid #fff;
}

/* Teaser */
#edc-root .edc-teaser {
	position: absolute;
	bottom: 74px;
	width: 250px;
	background: var(--edc-bg);
	border: 1px solid var(--edc-border);
	border-radius: 14px;
	padding: 14px 32px 14px 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
	cursor: pointer;
	animation: edc-pop .3s ease;
}
#edc-root.edc-pos-right .edc-teaser { right: 0; }
#edc-root.edc-pos-left .edc-teaser { left: 0; }
#edc-root .edc-teaser-x { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; color: var(--edc-muted); }

/* Panel */
#edc-root .edc-panel {
	position: absolute;
	bottom: 76px;
	width: 380px;
	height: min(620px, calc(100vh - 120px));
	background: var(--edc-bg);
	border-radius: 18px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px) scale(.98);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
#edc-root.edc-pos-right .edc-panel { right: 0; transform-origin: bottom right; }
#edc-root.edc-pos-left .edc-panel { left: 0; transform-origin: bottom left; }
#edc-root.edc-open .edc-panel { opacity: 1; visibility: visible; transform: none; }

#edc-root .edc-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	background: var(--edc-accent);
	color: #fff;
}
#edc-root .edc-avatar {
	width: 40px; height: 40px; flex: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, .2);
	padding: 9px;
}
#edc-root .edc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#edc-root .edc-title strong { font-size: 15px; font-weight: 600; }
#edc-root .edc-title span { font-size: 12px; opacity: .92; display: flex; align-items: center; gap: 6px; }
#edc-root .edc-title em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#edc-root .edc-title i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #4ade80; display: inline-block; }
#edc-root.edc-waiting .edc-title i { background: #fbbf24; }
#edc-root .edc-close { width: 30px; height: 30px; padding: 6px; border-radius: 8px; color: #fff; }
#edc-root .edc-close:hover { background: rgba(255, 255, 255, .15); }

/* Messages */
#edc-root .edc-body {
	flex: 1;
	overflow-y: auto;
	padding: 18px 16px 12px;
	background: var(--edc-surface);
	display: flex;
	flex-direction: column;
	gap: 10px;
	overscroll-behavior: contain;
}
#edc-root .edc-msg { display: flex; }
#edc-root .edc-visitor { justify-content: flex-end; }
#edc-root .edc-bubble {
	max-width: 85%;
	padding: 10px 14px;
	border-radius: 16px;
	overflow-wrap: anywhere;
}
#edc-root .edc-bot .edc-bubble, #edc-root .edc-agent .edc-bubble { background: var(--edc-bg); border: 1px solid var(--edc-border); border-bottom-left-radius: 5px; }
#edc-root .edc-agent .edc-bubble { border-left: 3px solid var(--edc-accent); }
#edc-root .edc-visitor .edc-bubble { background: var(--edc-accent); color: #fff; border-bottom-right-radius: 5px; }
#edc-root .edc-pending { opacity: .6; }
#edc-root .edc-who { display: block; font-size: 11px; font-weight: 700; color: var(--edc-accent); margin-bottom: 2px; }
#edc-root .edc-bubble p + p, #edc-root .edc-bubble p + ul, #edc-root .edc-bubble ul + p { margin-top: 6px; }
#edc-root .edc-bubble ul { margin: 4px 0 0; padding-left: 18px; }
#edc-root .edc-bubble li { margin: 2px 0; }
#edc-root .edc-bubble a { color: var(--edc-accent); text-decoration: underline; }
#edc-root .edc-visitor .edc-bubble a { color: #fff; }
#edc-root .edc-sys { align-self: center; font-size: 12px; color: var(--edc-muted); background: rgba(0, 0, 0, .05); padding: 4px 12px; border-radius: 999px; text-align: center; }

/* Option buttons */
#edc-root .edc-btns { display: flex; flex-wrap: wrap; gap: 6px; }
#edc-root .edc-btns.edc-center { justify-content: center; }
#edc-root .edc-btns button {
	border: 1px solid var(--edc-accent);
	color: var(--edc-accent);
	background: var(--edc-bg);
	border-radius: 999px;
	padding: 7px 13px;
	font-size: 13px;
	text-align: left;
	transition: background .15s, color .15s;
}
#edc-root .edc-btns button:hover { background: var(--edc-accent); color: #fff; }

/* Input */
#edc-root .edc-input {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 12px 14px;
	border-top: 1px solid var(--edc-border);
	background: var(--edc-bg);
}
#edc-root .edc-input textarea {
	flex: 1;
	resize: none;
	border: 1px solid var(--edc-border);
	border-radius: 12px;
	padding: 10px 12px;
	max-height: 110px;
	min-height: 42px;
	background: var(--edc-bg);
	outline: none;
	font-size: 14px;
}
#edc-root .edc-input textarea:focus { border-color: var(--edc-accent); }
#edc-root .edc-input button {
	width: 42px; height: 42px; flex: none;
	border-radius: 12px;
	background: var(--edc-accent);
	color: #fff;
	padding: 11px;
}

/* Requirement form */
#edc-root .edc-formwrap { width: 100%; max-width: 100%; }
#edc-root .edc-lead { display: flex; flex-direction: column; gap: 8px; }
#edc-root .edc-lead input, #edc-root .edc-lead textarea, #edc-root .edc-lead select {
	width: 100%;
	border: 1px solid var(--edc-border);
	border-radius: 10px;
	padding: 9px 11px;
	background: var(--edc-surface);
	outline: none;
	font-size: 14px;
	height: auto;
	min-height: 0;
}
#edc-root .edc-lead textarea { resize: vertical; }
#edc-root .edc-lead input:focus, #edc-root .edc-lead textarea:focus, #edc-root .edc-lead select:focus { border-color: var(--edc-accent); background: var(--edc-bg); }
#edc-root .edc-lead button {
	background: var(--edc-accent);
	color: #fff;
	border-radius: 10px;
	padding: 11px;
	font-weight: 600;
}
#edc-root .edc-lead button:disabled { opacity: .6; }
#edc-root .edc-err { color: #dc2626; font-size: 12px; }
#edc-root .edc-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

@keyframes edc-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Mobile */
@media (max-width: 480px) {
	#edc-root { bottom: 16px; }
	#edc-root.edc-pos-right { right: 16px; }
	#edc-root.edc-pos-left { left: 16px; }
	#edc-root .edc-panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; bottom: 0; }
	#edc-root.edc-open .edc-launcher { display: none; }
	#edc-root .edc-input textarea, #edc-root .edc-lead input, #edc-root .edc-lead textarea, #edc-root .edc-lead select { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	#edc-root * { animation: none !important; transition: none !important; }
}
