/* Contact Click Tracker — floating "Need help?" support widget. Colours come from CSS variables set in Settings. */
.cct-sw, .cct-sw * { box-sizing: border-box; }
.cct-sw {
	position: fixed; bottom: 24px; z-index: 99990;
	display: flex; flex-direction: column; gap: 12px;
	font-family: var(--cct-font, inherit); font-size: 16px; line-height: 1.5; color: var(--cct-text);
	-webkit-font-smoothing: antialiased;
}
.cct-sw.cct-left { left: 24px; align-items: flex-start; }
.cct-sw.cct-right { right: 24px; align-items: flex-end; }
.cct-sw svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Panel */
.cct-sw-panel {
	width: 320px; max-width: calc(100vw - 48px); overflow: hidden;
	background: #fff; border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0,0,0,.28), 0 0 0 1px var(--cct-border);
	transform-origin: bottom left;
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.cct-sw.cct-right .cct-sw-panel { transform-origin: bottom right; }
.cct-sw:not(.cct-open) .cct-sw-panel { opacity: 0; visibility: hidden; transform: translateY(8px) scale(.97); pointer-events: none; }

.cct-sw-head { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--cct-dark); color: #fff; }
.cct-sw-avatar {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border-radius: 50%;
	background: var(--cct-accent-soft); color: var(--cct-accent-light);
}
.cct-sw-online {
	position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%;
	background: #34d399; border: 2px solid var(--cct-dark);
}
.cct-sw-who { flex: 1; min-width: 0; }
.cct-sw-name { margin: 0; font-family: var(--cct-heading-font, inherit); font-size: 15px; font-weight: 700; line-height: 1.3; color: #fff; }
.cct-sw-role { margin: 0; font-size: 12px; line-height: 1.4; color: rgba(255,255,255,.65); }
.cct-sw-close {
	display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer;
}
.cct-sw-close:hover, .cct-sw-close:focus-visible { background: rgba(255,255,255,.12); }
.cct-sw-close svg { width: 18px; height: 18px; }

.cct-sw-body { padding: 16px; }
.cct-sw-msg {
	margin: 0; padding: 12px 16px; border-radius: 16px 16px 16px 4px;
	background: var(--cct-light); color: var(--cct-text); font-size: 14px; line-height: 1.65;
}
.cct-sw-actions { display: grid; gap: 8px; margin-top: 16px; }
.cct-sw-btn {
	display: flex; align-items: center; gap: 12px; padding: 12px 16px;
	border: 1px solid var(--cct-border); border-radius: 12px; background: #fff;
	color: var(--cct-text) !important; font-size: 14px; font-weight: 700; text-decoration: none !important;
	transition: border-color .15s, background-color .15s;
}
.cct-sw-btn:hover, .cct-sw-btn:focus-visible { border-color: var(--cct-accent); background: var(--cct-light); }
.cct-sw-btn svg { color: var(--cct-accent); }
.cct-sw-btn.cct-wa svg { color: #25a35a; }

/* Launcher */
.cct-sw-launch {
	position: relative; display: inline-flex; align-items: center; gap: 12px;
	padding: 10px 24px 10px 10px; border: 0; border-radius: 999px; cursor: pointer;
	background: linear-gradient(to right, var(--cct-accent), var(--cct-dark));
	color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1;
	box-shadow: 0 10px 25px -6px rgba(0,0,0,.35);
	transition: transform .15s ease, box-shadow .15s ease;
}
.cct-sw-launch:hover, .cct-sw-launch:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 30px -6px rgba(0,0,0,.4); }
.cct-sw-launch-icon {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.2);
}
.cct-sw-launch .cct-sw-online { border-color: var(--cct-accent); }

@media (max-width: 480px) {
	.cct-sw { bottom: 16px; }
	.cct-sw.cct-left { left: 16px; }
	.cct-sw.cct-right { right: 16px; }
	.cct-sw-panel { max-width: calc(100vw - 32px); }
}
@media (prefers-reduced-motion: reduce) {
	.cct-sw-panel, .cct-sw-launch { transition: none; }
}
@media print { .cct-sw { display: none; } }
