.ww-widget-root {
	position: fixed;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	bottom: var(--ww-offset-y, 20px);
}

.ww-pos-bottom-right { right: var(--ww-offset-x, 20px); }
.ww-pos-bottom-left { left: var(--ww-offset-x, 20px); }

.ww-widget-button {
	width: var(--ww-size, 60px);
	height: var(--ww-size, 60px);
	border-radius: 50%;
	background: var(--ww-color, #1F9D74);
	border: none;
	box-shadow: 0 4px 16px rgba(0,0,0,0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	padding: 0;
	gap: 8px;
}

.ww-widget-button:hover {
	transform: scale(1.06);
	box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.ww-widget-button .ww-button-text {
	display: none;
}

.ww-widget-root.ww-has-label .ww-widget-button {
	width: auto;
	padding: 0 18px 0 14px;
	border-radius: 999px;
}

.ww-widget-root.ww-has-label .ww-widget-button .ww-button-text {
	display: inline-block;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	white-space: nowrap;
}

.ww-anim-pulse .ww-widget-button::before {
	content: "";
	position: absolute;
	width: var(--ww-size, 60px);
	height: var(--ww-size, 60px);
	border-radius: 50%;
	background: var(--ww-color, #1F9D74);
	opacity: 0.6;
	animation: ww-pulse-anim 2s infinite;
	z-index: -1;
}

@keyframes ww-pulse-anim {
	0% { transform: scale(1); opacity: 0.6; }
	70% { transform: scale(1.6); opacity: 0; }
	100% { transform: scale(1.6); opacity: 0; }
}

.ww-anim-bounce .ww-widget-button {
	animation: ww-bounce-anim 2.2s infinite;
}

@keyframes ww-bounce-anim {
	0%, 100% { transform: translateY(0); }
	10% { transform: translateY(-8px); }
	20% { transform: translateY(0); }
}

/* Popup bubble */
.ww-popup-bubble {
	position: absolute;
	bottom: calc(var(--ww-size, 60px) + 16px);
	width: 280px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.2);
	padding: 14px 16px 16px;
	animation: ww-fade-in 0.25s ease;
}

.ww-pos-bottom-right .ww-popup-bubble { right: 0; }
.ww-pos-bottom-left .ww-popup-bubble { left: 0; }

@keyframes ww-fade-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.ww-popup-close {
	position: absolute;
	top: 6px;
	right: 8px;
	background: none;
	border: none;
	font-size: 18px;
	line-height: 1;
	color: #999;
	cursor: pointer;
}

.ww-popup-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.ww-popup-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
}

.ww-popup-avatar-default {
	background: #1F9D74;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ww-popup-header strong {
	font-size: 14px;
	color: #222;
}

.ww-popup-body {
	font-size: 13.5px;
	color: #444;
	line-height: 1.5;
	margin-bottom: 12px;
}

.ww-popup-cta {
	width: 100%;
	background: #1F9D74;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.ww-popup-cta:hover {
	background: #1ebe5b;
}

/* Agent menu */
.ww-agent-menu {
	position: absolute;
	bottom: calc(var(--ww-size, 60px) + 16px);
	width: 240px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.2);
	padding: 10px;
	animation: ww-fade-in 0.2s ease;
}

.ww-pos-bottom-right .ww-agent-menu { right: 0; }
.ww-pos-bottom-left .ww-agent-menu { left: 0; }

.ww-agent-menu-title {
	font-size: 12px;
	text-transform: uppercase;
	color: #999;
	padding: 4px 8px 8px;
	font-weight: 600;
}

.ww-agent-option {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
	background: #f5f7f6;
	border: none;
	border-radius: 8px;
	padding: 8px 10px;
	margin-bottom: 6px;
	cursor: pointer;
	text-align: left;
}

.ww-agent-option:hover {
	background: #e9f9ef;
}

.ww-agent-name {
	font-size: 13.5px;
	font-weight: 600;
	color: #222;
}

.ww-agent-role {
	font-size: 11.5px;
	color: #888;
}

@media (max-width: 480px) {
	.ww-popup-bubble,
	.ww-agent-menu {
		width: calc(100vw - 40px);
		max-width: 300px;
	}
}
