#wcc-widget, #wcc-widget * {
	box-sizing: border-box;
}

#wcc-widget {
	--wcc-btn-color: #25D366;
	--wcc-header-color: #075E54;
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wcc-pos-right { right: 24px; }
.wcc-pos-left  { left: 24px; }

/* Toggle button */
.wcc-toggle-btn {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--wcc-btn-color);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	position: relative;
	z-index: 2;
}

.wcc-toggle-btn:hover {
	transform: scale(1.06);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.wcc-toggle-btn svg {
	width: 28px;
	height: 28px;
	position: absolute;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.wcc-icon-close { opacity: 0; transform: scale(0.6) rotate(-45deg); }
.wcc-icon-chat  { opacity: 1; transform: scale(1) rotate(0deg); }

#wcc-widget.wcc-open .wcc-icon-chat  { opacity: 0; transform: scale(0.6) rotate(45deg); }
#wcc-widget.wcc-open .wcc-icon-close { opacity: 1; transform: scale(1) rotate(0deg); }

/* Pulse animation to attract attention */
.wcc-toggle-btn::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
	animation: wcc-pulse 2.4s infinite;
	pointer-events: none;
}

@keyframes wcc-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
	70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
	100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Panel */
.wcc-panel {
	position: absolute;
	bottom: 76px;
	width: 340px;
	max-width: calc(100vw - 32px);
	max-height: 70vh;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.wcc-pos-right .wcc-panel { right: 0; }
.wcc-pos-left  .wcc-panel { left: 0; }

#wcc-widget.wcc-open .wcc-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.wcc-panel-header {
	background: var(--wcc-header-color);
	color: #fff;
	padding: 18px 20px;
	flex-shrink: 0;
}

.wcc-panel-header-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wcc-panel-header-text strong {
	font-size: 16px;
	font-weight: 600;
}

.wcc-panel-header-text span {
	font-size: 12.5px;
	opacity: 0.85;
	line-height: 1.4;
}

.wcc-panel-body {
	overflow-y: auto;
	padding: 12px;
}

.wcc-screen-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #6b7280;
	margin: 4px 8px 10px;
}

.wcc-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* Department item */
.wcc-dept-item {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px 10px;
	background: #f5f7f8;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	text-align: left;
	font-size: 14px;
	color: #1f2937;
	transition: background 0.15s ease;
}

.wcc-dept-item:hover { background: #ebeef0; }

.wcc-dept-icon {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--wcc-btn-color);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	flex-shrink: 0;
}

.wcc-dept-name { flex: 1; font-weight: 500; }
.wcc-chevron { color: #9ca3af; font-size: 18px; }

/* Back button */
.wcc-back-btn {
	background: none;
	border: none;
	color: var(--wcc-header-color);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 6px 8px;
	margin-bottom: 4px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* Agent item */
.wcc-agent-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border-radius: 10px;
	text-decoration: none;
	color: #1f2937;
	background: #fff;
	border: 1px solid #eef0f1;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.wcc-agent-item:hover {
	background: #f5fbf7;
	border-color: var(--wcc-btn-color);
}

.wcc-agent-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.wcc-agent-avatar-initials {
	background: var(--wcc-header-color);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 15px;
}

.wcc-agent-info {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.wcc-agent-name {
	font-size: 14px;
	font-weight: 600;
}

.wcc-agent-position {
	font-size: 12px;
	color: #6b7280;
}

.wcc-agent-status {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--wcc-btn-color);
	flex-shrink: 0;
}

@media (max-width: 480px) {
	.wcc-panel {
		width: calc(100vw - 24px);
		bottom: 74px;
	}
}
