#adbcw-root {
	--adbcw-primary: #0b5fae;
	--adbcw-primary-dark: #08447f;
	position: fixed;
	bottom: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#adbcw-root.adbcw-pos-right { right: 20px; }
#adbcw-root.adbcw-pos-left { left: 20px; }

/* ---------- Floating bubble ---------- */
.adbcw-bubble {
	position: relative;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--adbcw-primary), var(--adbcw-primary-dark));
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(11, 95, 174, 0.4), 0 2px 6px rgba(0,0,0,0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.adbcw-bubble:hover {
	transform: scale(1.08) translateY(-1px);
	box-shadow: 0 12px 28px rgba(11, 95, 174, 0.5), 0 3px 8px rgba(0,0,0,0.18);
}
.adbcw-bubble svg { width: 28px; height: 28px; position: relative; z-index: 2; }

/* Soft pulsing ring that quietly draws the eye without being annoying */
.adbcw-bubble-ring {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--adbcw-primary);
	opacity: 0;
	z-index: 1;
}
#adbcw-root.adbcw-attention .adbcw-bubble-ring {
	animation: adbcw-pulse 2.2s ease-out infinite;
}
@keyframes adbcw-pulse {
	0%   { opacity: 0.45; transform: scale(1); }
	70%  { opacity: 0;    transform: scale(1.7); }
	100% { opacity: 0;    transform: scale(1.7); }
}
#adbcw-root.adbcw-attention .adbcw-bubble {
	animation: adbcw-nudge 2.2s ease-in-out infinite;
}
@keyframes adbcw-nudge {
	0%, 82%, 100% { transform: translateY(0); }
	88% { transform: translateY(-4px); }
	94% { transform: translateY(0); }
}

/* Small "new message" ping dot */
.adbcw-ping {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #ff4d4f;
	border: 2px solid #fff;
	z-index: 3;
	display: none;
}
#adbcw-root.adbcw-attention .adbcw-ping { display: block; }

.adbcw-panel {
	position: absolute;
	bottom: 80px;
	width: 370px;
	max-width: 92vw;
	height: 530px;
	max-height: 76vh;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 16px 48px rgba(0,0,0,0.22);
	display: none;
	flex-direction: column;
	overflow: hidden;
}
#adbcw-root.adbcw-pos-right .adbcw-panel { right: 0; }
#adbcw-root.adbcw-pos-left .adbcw-panel { left: 0; }
#adbcw-root.adbcw-open .adbcw-panel { display: flex; }
#adbcw-root.adbcw-open .adbcw-bubble .adbcw-icon-chat { display: none; }
#adbcw-root.adbcw-open .adbcw-bubble .adbcw-icon-close { display: block; }
.adbcw-bubble .adbcw-icon-close { display: none; }

.adbcw-header {
	background: linear-gradient(135deg, var(--adbcw-primary), var(--adbcw-primary-dark));
	color: #fff;
	padding: 16px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.adbcw-header-title { font-weight: 600; font-size: 15.5px; }
.adbcw-header-sub { font-size: 12px; opacity: 0.9; margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.adbcw-dot-online { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; }
.adbcw-header-close { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; padding: 4px; opacity: 0.9; }
.adbcw-header-close:hover { opacity: 1; }

.adbcw-tabs {
	display: flex;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}
.adbcw-tab {
	flex: 1;
	padding: 11px 8px;
	text-align: center;
	font-size: 13px;
	font-weight: 500;
	background: #fafafa;
	border: none;
	cursor: pointer;
	color: #555;
	border-bottom: 2px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.adbcw-tab.active {
	color: var(--adbcw-primary);
	border-bottom-color: var(--adbcw-primary);
	background: #fff;
}

.adbcw-view { display: none; flex-direction: column; flex: 1; min-height: 0; }
.adbcw-view.active { display: flex; }

.adbcw-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.adbcw-msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.adbcw-msg-bot { background: #f1f3f5; color: #222; align-self: flex-start; border-bottom-left-radius: 4px; }
.adbcw-msg-user { background: var(--adbcw-primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.adbcw-msg-typing { display: inline-flex; gap: 3px; padding: 10px 12px; }
.adbcw-msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: #999; animation: adbcw-blink 1.2s infinite; }
.adbcw-msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.adbcw-msg-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes adbcw-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.adbcw-quick-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; flex-shrink: 0; }
.adbcw-quick-btn {
	font-size: 12px;
	padding: 6px 10px;
	border-radius: 999px;
	border: 1px solid var(--adbcw-primary);
	background: #fff;
	color: var(--adbcw-primary);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.adbcw-quick-btn:hover { background: var(--adbcw-primary); color: #fff; }

.adbcw-input-row {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #eee;
	flex-shrink: 0;
}
.adbcw-input-row textarea {
	flex: 1;
	resize: none;
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 8px 10px;
	font-size: 13.5px;
	font-family: inherit;
	max-height: 70px;
}
.adbcw-send-btn {
	background: linear-gradient(135deg, var(--adbcw-primary), var(--adbcw-primary-dark));
	color: #fff;
	border: none;
	border-radius: 10px;
	width: 40px;
	cursor: pointer;
	flex-shrink: 0;
}

.adbcw-wa-view, .adbcw-agent-view {
	padding: 20px 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-align: center;
}
.adbcw-wa-badge {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #eafbf0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.adbcw-wa-view p, .adbcw-agent-view p { color: #555; font-size: 13.5px; margin: 0; }
.adbcw-wa-btn {
	background: #25D366;
	color: #fff;
	text-decoration: none;
	padding: 12px 22px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 14px;
	box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.adbcw-agent-form { display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; }
.adbcw-agent-form input, .adbcw-agent-form textarea {
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 9px 10px;
	font-size: 13.5px;
	font-family: inherit;
}
.adbcw-agent-form button {
	background: linear-gradient(135deg, var(--adbcw-primary), var(--adbcw-primary-dark));
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px;
	font-weight: 600;
	cursor: pointer;
}
.adbcw-agent-status { font-size: 13px; padding: 8px; border-radius: 8px; }
.adbcw-agent-status.ok { background: #e6f6ea; color: #1a7a3a; }
.adbcw-agent-status.err { background: #fdeaea; color: #b3261e; }

.adbcw-inline-trigger {
	background: linear-gradient(135deg, var(--adbcw-primary, #0b5fae), var(--adbcw-primary-dark, #08447f));
	color: #fff;
	border: none;
	padding: 12px 20px;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	font-size: 14px;
}

@media (max-width: 480px) {
	.adbcw-panel { width: 94vw; height: 78vh; bottom: 78px; }
}
