#buzz-asistent {
	--ba-accent: #F5B700;
	--ba-ink: #1d1d1f;
	--ba-muted: #6b6b70;
	--ba-bg: #ffffff;
	--ba-soft: #f4f4f6;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.45;
	color: var(--ba-ink);
}

#buzz-asistent *,
#buzz-asistent *::before,
#buzz-asistent *::after { box-sizing: border-box; }

#buzz-asistent .ba-launcher {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 0;
	background: var(--ba-accent);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin-left: auto;
	transition: transform .15s ease;
}
#buzz-asistent .ba-launcher:hover { transform: scale(1.06); }
#buzz-asistent .ba-launcher svg { width: 28px; height: 28px; fill: var(--ba-ink); }
#buzz-asistent.ba-open .ba-launcher { display: none; }

#buzz-asistent .ba-panel {
	width: 370px;
	height: min(600px, calc(100vh - 40px));
	background: var(--ba-bg);
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
#buzz-asistent .ba-panel[hidden] { display: none; }

#buzz-asistent .ba-header {
	background: var(--ba-accent);
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
#buzz-asistent .ba-title { display: flex; flex-direction: column; }
#buzz-asistent .ba-title strong { font-size: 16px; color: var(--ba-ink); }
#buzz-asistent .ba-title span { font-size: 12px; color: rgba(0, 0, 0, .65); }
#buzz-asistent .ba-actions { display: flex; gap: 4px; }
#buzz-asistent .ba-icon {
	background: transparent;
	border: 0;
	font-size: 22px;
	line-height: 1;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	cursor: pointer;
	color: var(--ba-ink);
	padding: 0;
}
#buzz-asistent .ba-icon:hover { background: rgba(0, 0, 0, .08); }

#buzz-asistent .ba-log {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--ba-bg);
}

#buzz-asistent .ba-log > * { flex-shrink: 0; }

#buzz-asistent .ba-msg {
	max-width: 85%;
	padding: 10px 13px;
	border-radius: 14px;
	white-space: pre-wrap;
	word-wrap: break-word;
}
#buzz-asistent .ba-assistant {
	background: var(--ba-soft);
	align-self: flex-start;
	border-bottom-left-radius: 4px;
}
#buzz-asistent .ba-user {
	background: var(--ba-ink);
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}
#buzz-asistent .ba-msg a { color: inherit; text-decoration: underline; font-weight: 600; }
#buzz-asistent .ba-error { background: #fdecec; color: #8a1f1f; }

#buzz-asistent .ba-typing { display: flex; gap: 4px; padding: 14px; }
#buzz-asistent .ba-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ba-muted);
	animation: ba-bounce 1s infinite ease-in-out;
}
#buzz-asistent .ba-typing span:nth-child(2) { animation-delay: .15s; }
#buzz-asistent .ba-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ba-bounce {
	0%, 80%, 100% { transform: translateY(0); opacity: .5; }
	40% { transform: translateY(-5px); opacity: 1; }
}

#buzz-asistent .ba-escalate {
	align-self: stretch;
	border: 1px solid #e3e3e8;
	border-radius: 12px;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}
#buzz-asistent .ba-escalate p { margin: 0; font-size: 14px; }
#buzz-asistent .ba-escalate input,
#buzz-asistent .ba-escalate textarea {
	width: 100%;
	border: 1px solid #d6d6dc;
	border-radius: 8px;
	padding: 8px 10px;
	font: inherit;
	font-size: 14px;
	margin: 0;
	background: #fff;
	color: var(--ba-ink);
}
#buzz-asistent .ba-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }

#buzz-asistent .ba-form {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid #ececf0;
	align-items: flex-end;
	margin: 0;
}
#buzz-asistent .ba-input {
	flex: 1;
	resize: none;
	border: 1px solid #d6d6dc;
	border-radius: 10px;
	padding: 9px 11px;
	font: inherit;
	font-size: 15px;
	max-height: 120px;
	margin: 0;
	background: #fff;
	color: var(--ba-ink);
}
#buzz-asistent .ba-input:focus,
#buzz-asistent .ba-escalate input:focus,
#buzz-asistent .ba-escalate textarea:focus { outline: 2px solid var(--ba-accent); border-color: transparent; }

#buzz-asistent .ba-send {
	background: var(--ba-accent);
	color: var(--ba-ink);
	border: 0;
	border-radius: 10px;
	padding: 10px 14px;
	font: inherit;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
}
#buzz-asistent .ba-send:disabled { opacity: .55; cursor: default; }

#buzz-asistent .ba-foot {
	font-size: 11px;
	color: var(--ba-muted);
	padding: 0 14px 10px;
	text-align: center;
}

@media (max-width: 480px) {
	#buzz-asistent { right: 12px; bottom: 12px; }
	#buzz-asistent.ba-open { right: 0; bottom: 0; left: 0; top: 0; }
	#buzz-asistent .ba-panel { width: 100vw; height: 100%; border-radius: 0; }
	#buzz-asistent .ba-input { font-size: 16px; } /* evită zoom-ul pe iOS */
}
