/**
 * Smart Site AI Chatbot — Clean Human-Crafted SaaS Interface (v1.1.0)
 * Light & Dark Theme, Compact Product/Service Cards, WhatsApp Handoff, GDPR Banner & Inline Shortcode
 */

.ssac-root {
	--ssac-bg: #ffffff;
	--ssac-surface: #f8fafc;
	--ssac-border: #e2e8f0;
	--ssac-text: #0f172a;
	--ssac-text-muted: #64748b;
	--ssac-bot-bubble: #f1f5f9;
	--ssac-card-bg: #ffffff;
	--ssac-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.22), 0 0 1px rgba(15, 23, 42, 0.16);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	line-height: 1.5;
	box-sizing: border-box;
}

.ssac-root *,
.ssac-root *::before,
.ssac-root *::after {
	box-sizing: border-box;
}

.ssac-pos-right {
	right: 24px;
}

.ssac-pos-left {
	left: 24px;
}

.ssac-theme-dark {
	--ssac-bg: #0f172a;
	--ssac-surface: #1e293b;
	--ssac-border: #334155;
	--ssac-text: #f8fafc;
	--ssac-text-muted: #94a3b8;
	--ssac-bot-bubble: #1e293b;
	--ssac-card-bg: #162033;
	--ssac-shadow: 0 26px 65px rgba(2, 6, 23, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Tooltip */
.ssac-tooltip {
	position: absolute;
	bottom: 74px;
	right: 0;
	background: var(--ssac-bg);
	color: var(--ssac-text);
	border: 1px solid var(--ssac-border);
	padding: 10px 15px;
	border-radius: 14px;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
	display: flex;
	align-items: center;
	gap: 9px;
	white-space: nowrap;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	animation: ssacFloat 3s ease-in-out infinite;
}

.ssac-tooltip-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #10b981;
	box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
	flex-shrink: 0;
}

.ssac-pos-left .ssac-tooltip {
	right: auto;
	left: 0;
}

.ssac-open .ssac-tooltip {
	display: none !important;
}

.ssac-tooltip-close {
	background: transparent;
	border: 0;
	color: var(--ssac-text-muted);
	font-size: 16px;
	line-height: 1;
	padding: 0 2px;
	cursor: pointer;
}

/* Floating Launcher Button */
.ssac-launcher {
	width: 60px;
	height: 60px;
	border-radius: 18px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: linear-gradient(135deg, var(--ssac-primary, #4f46e5) 0%, var(--ssac-accent, #4338ca) 100%);
	color: #ffffff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	box-shadow: 0 14px 32px rgba(79, 70, 229, 0.36);
	box-shadow: 0 14px 32px color-mix(in srgb, var(--ssac-primary, #4f46e5) 36%, transparent);
	transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
}

.ssac-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 38px rgba(79, 70, 229, 0.46);
	box-shadow: 0 18px 38px color-mix(in srgb, var(--ssac-primary, #4f46e5) 46%, transparent);
}

.ssac-launcher-ring {
	position: absolute;
	inset: -4px;
	border-radius: 22px;
	border: 1.5px solid var(--ssac-primary, #4f46e5);
	opacity: 0.35;
	animation: ssacPulseRing 2.6s infinite;
	pointer-events: none;
}

.ssac-custom-launcher-img {
	width: 30px;
	height: 30px;
	object-fit: contain;
	border-radius: 8px;
}

.ssac-launcher-icon-close {
	display: none;
}

.ssac-open .ssac-launcher-icon-open {
	display: none;
}

.ssac-open .ssac-launcher-icon-close {
	display: flex;
}

.ssac-online-dot {
	position: absolute;
	top: -3px;
	right: -3px;
	width: 13px;
	height: 13px;
	background: #10b981;
	border: 2.5px solid #ffffff;
	border-radius: 50%;
}

/* Main Chat Window */
.ssac-window {
	position: absolute;
	bottom: 74px;
	right: 0;
	width: 396px;
	max-width: calc(100vw - 28px);
	height: 615px;
	max-height: calc(100vh - 110px);
	background: var(--ssac-bg);
	color: var(--ssac-text);
	border: 1px solid var(--ssac-border);
	border-radius: 20px;
	box-shadow: var(--ssac-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transform: translateY(16px) scale(0.97);
	transform-origin: bottom right;
	transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.ssac-pos-left .ssac-window {
	right: auto;
	left: 0;
	transform-origin: bottom left;
}

.ssac-open .ssac-window {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

/* Header */
.ssac-header {
	background: var(--ssac-header-bg, #0f172a);
	color: #ffffff;
	padding: 15px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-shrink: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ssac-header-brand {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
}

.ssac-avatar {
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: linear-gradient(135deg, var(--ssac-primary, #4f46e5), var(--ssac-accent, #4338ca));
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	flex-shrink: 0;
	color: #ffffff;
}

.ssac-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 11px;
}

.ssac-avatar-status {
	position: absolute;
	bottom: -2px;
	right: -2px;
	width: 10px;
	height: 10px;
	background: #10b981;
	border: 2px solid #0f172a;
	border-radius: 50%;
}

.ssac-header-meta {
	min-width: 0;
}

.ssac-header-title-row {
	display: flex;
	align-items: center;
	gap: 7px;
}

.ssac-title {
	margin: 0;
	font-size: 14.5px;
	font-weight: 700;
	color: #ffffff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ssac-context-pill {
	font-size: 10px;
	font-weight: 600;
	color: #c7d2fe;
	background: rgba(99, 102, 241, 0.22);
	border: 1px solid rgba(165, 180, 252, 0.3);
	padding: 1px 7px;
	border-radius: 999px;
	white-space: nowrap;
}

.ssac-subtitle {
	margin: 2px 0 0;
	font-size: 11.5px;
	color: #cbd5e1;
	display: flex;
	align-items: center;
	gap: 5px;
}

.ssac-pulse {
	width: 6px;
	height: 6px;
	background: #10b981;
	border-radius: 50%;
	display: inline-block;
}

.ssac-header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.ssac-icon-btn {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #e2e8f0;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.ssac-icon-btn:hover {
	background: rgba(255, 255, 255, 0.18);
	color: #ffffff;
}

/* Quick Action Dock */
.ssac-action-dock {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 9px 12px;
	background: var(--ssac-surface);
	border-bottom: 1px solid var(--ssac-border);
	flex-shrink: 0;
}

.ssac-action-dock::-webkit-scrollbar {
	display: none;
}

.ssac-dock-btn {
	background: var(--ssac-bg);
	color: var(--ssac-text);
	border: 1px solid var(--ssac-border);
	border-radius: 8px;
	padding: 6px 10px;
	font-size: 11.5px;
	line-height: 1.2;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	transition: all 0.15s ease;
}

.ssac-dock-btn svg {
	color: var(--ssac-primary, #4f46e5);
	flex-shrink: 0;
}

.ssac-dock-btn:hover {
	border-color: var(--ssac-primary, #4f46e5);
	color: var(--ssac-primary, #4f46e5);
}

/* GDPR Consent Banner */
.ssac-gdpr-banner {
	background: var(--ssac-surface);
	border-bottom: 1px solid var(--ssac-border);
	padding: 10px 14px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 11.5px;
	color: var(--ssac-text-muted);
}

.ssac-gdpr-icon {
	color: var(--ssac-primary, #4f46e5);
	flex-shrink: 0;
	margin-top: 2px;
}

.ssac-gdpr-body p {
	margin: 0 0 7px;
	line-height: 1.4;
}

.ssac-gdpr-accept-btn {
	background: var(--ssac-primary, #4f46e5);
	color: #ffffff;
	border: 0;
	border-radius: 7px;
	padding: 4px 11px;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
}

/* Messages Stream */
.ssac-messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scroll-behavior: smooth;
}

.ssac-msg-row {
	display: flex;
	flex-direction: column;
	max-width: 92%;
}

.ssac-msg-anim {
	animation: ssacFadeUp 0.2s ease-out;
}

.ssac-msg-bot {
	align-self: flex-start;
}

.ssac-msg-user {
	align-self: flex-end;
}

.ssac-msg-bubble {
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 13.3px;
	line-height: 1.52;
	word-wrap: break-word;
}

.ssac-msg-bot .ssac-msg-bubble {
	background: var(--ssac-bot-bubble);
	color: var(--ssac-text);
	border-bottom-left-radius: 4px;
	border: 1px solid var(--ssac-border);
}

.ssac-msg-user .ssac-msg-bubble {
	background: linear-gradient(135deg, var(--ssac-primary, #4f46e5), var(--ssac-accent, #4338ca));
	color: #ffffff;
	border-bottom-right-radius: 4px;
}

.ssac-msg-bubble a {
	color: var(--ssac-primary, #4f46e5);
	font-weight: 600;
	text-decoration: underline;
}

.ssac-msg-user .ssac-msg-bubble a {
	color: #ffffff;
}

.ssac-msg-bubble code {
	background: rgba(99, 102, 241, 0.12);
	padding: 1px 5px;
	border-radius: 5px;
	font-size: 12px;
}

/* Compact Product / Service Cards */
.ssac-cards-wrap {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
	width: 100%;
}

.ssac-related-label {
	font-size: 11px;
	font-weight: 700;
	color: var(--ssac-primary, #4f46e5);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding-left: 2px;
}

.ssac-item-card {
	background: var(--ssac-card-bg);
	border: 1px solid var(--ssac-border);
	border-radius: 12px;
	padding: 10px;
	box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
	transition: border-color 0.18s ease;
}

.ssac-item-card:hover {
	border-color: var(--ssac-primary, #4f46e5);
}

.ssac-item-card-top {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.ssac-card-thumb {
	width: 48px;
	height: 48px;
	border-radius: 9px;
	overflow: hidden;
	flex-shrink: 0;
	background: var(--ssac-surface);
	border: 1px solid var(--ssac-border);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ssac-primary, #4f46e5);
}

.ssac-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ssac-item-card-info {
	flex: 1 1 auto;
	min-width: 0;
}

.ssac-item-card-badges {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	margin-bottom: 2px;
}

.ssac-card-badge {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--ssac-primary, #4f46e5);
	background: rgba(79, 70, 229, 0.1);
	padding: 1px 6px;
	border-radius: 5px;
}

.ssac-card-price {
	font-size: 11px;
	font-weight: 700;
	color: #10b981;
}

.ssac-card-title {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--ssac-text) !important;
	text-decoration: none !important;
	line-height: 1.3;
	margin-bottom: 3px;
}

.ssac-card-title:hover {
	color: var(--ssac-primary, #4f46e5) !important;
}

.ssac-card-desc {
	margin: 0;
	font-size: 11.5px;
	color: var(--ssac-text-muted);
	line-height: 1.38;
}

.ssac-item-card-actions {
	display: flex;
	gap: 6px;
	margin-top: 8px;
	padding-top: 7px;
	border-top: 1px solid var(--ssac-border);
}

.ssac-card-btn-view,
.ssac-card-btn-book {
	flex: 1;
	text-align: center;
	padding: 5px 8px;
	border-radius: 7px;
	font-size: 11.5px;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	transition: opacity 0.15s;
}

.ssac-card-btn-view {
	background: var(--ssac-surface);
	color: var(--ssac-text) !important;
	border: 1px solid var(--ssac-border);
}

.ssac-card-btn-book {
	background: var(--ssac-primary, #4f46e5);
	color: #ffffff;
	border: 0;
}

/* Human Support & WhatsApp Handoff Card */
.ssac-handoff-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
}

.ssac-handoff-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 12px;
	border-radius: 10px;
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: none !important;
	transition: transform 0.15s ease;
}

.ssac-handoff-btn:hover {
	transform: translateY(-1px);
}

.ssac-handoff-wa {
	background: rgba(16, 185, 129, 0.12);
	border: 1px solid rgba(16, 185, 129, 0.4);
	color: #059669 !important;
}

.ssac-theme-dark .ssac-handoff-wa {
	color: #34d399 !important;
}

.ssac-handoff-call {
	background: color-mix(in srgb, var(--ssac-primary, #4f46e5) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--ssac-primary, #4f46e5) 40%, transparent);
	color: var(--ssac-primary, #4f46e5) !important;
}

.ssac-handoff-mail {
	background: var(--ssac-surface);
	border: 1px solid var(--ssac-border);
	color: var(--ssac-text) !important;
}

/* Inline Conversational Action Form */
.ssac-inline-form {
	background: var(--ssac-card-bg);
	border: 1px solid var(--ssac-border);
	border-radius: 12px;
	padding: 11px;
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.ssac-inline-form-title {
	font-size: 12px;
	font-weight: 700;
	color: var(--ssac-text);
}

.ssac-inline-form input,
.ssac-inline-form textarea {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid var(--ssac-border);
	border-radius: 8px;
	font-size: 12.5px;
	background: var(--ssac-surface);
	color: var(--ssac-text);
}

.ssac-if-submit {
	background: linear-gradient(135deg, var(--ssac-primary, #4f46e5), var(--ssac-accent, #4338ca));
	color: #ffffff;
	border: 0;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}

.ssac-inline-success {
	font-size: 12.5px;
	font-weight: 600;
	color: #10b981;
	padding: 4px;
}

/* Suggestion Chips */
.ssac-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 9px 12px;
	border-top: 1px solid var(--ssac-border);
	background: var(--ssac-bg);
	flex-shrink: 0;
}

.ssac-chips:empty {
	display: none;
}

.ssac-chips::-webkit-scrollbar {
	display: none;
}

.ssac-chip {
	background: var(--ssac-surface);
	color: var(--ssac-text);
	border: 1px solid var(--ssac-border);
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.25;
	max-width: 100%;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	transition: all 0.15s;
}

.ssac-chip:hover {
	border-color: var(--ssac-primary, #4f46e5);
	color: var(--ssac-primary, #4f46e5);
}

/* Input Composer */
.ssac-composer {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px 12px 12px;
	background: var(--ssac-bg);
	border-top: 1px solid var(--ssac-border);
	flex-shrink: 0;
}

.ssac-input-wrap {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	background: var(--ssac-surface);
	border: 1.5px solid var(--ssac-border);
	border-radius: 12px;
	padding: 7px 10px;
}

.ssac-input-wrap:focus-within {
	border-color: var(--ssac-primary, #4f46e5);
}

.ssac-input {
	flex: 1 1 auto;
	border: 0 !important;
	background: transparent !important;
	color: var(--ssac-text) !important;
	font-size: 13px;
	line-height: 1.4;
	resize: none;
	max-height: 90px;
	padding: 2px 0;
	outline: none !important;
	box-shadow: none !important;
}

.ssac-voice-btn {
	background: transparent;
	border: 0;
	color: var(--ssac-text-muted);
	cursor: pointer;
	padding: 3px;
	display: flex;
}

.ssac-voice-btn.ssac-recording {
	color: #ef4444;
}

.ssac-send-btn {
	width: 38px;
	height: 38px;
	border-radius: 11px;
	border: 0;
	background: linear-gradient(135deg, var(--ssac-primary, #4f46e5), var(--ssac-accent, #4338ca));
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
}

/* Footer */
.ssac-footer {
	padding: 5px 12px 7px;
	text-align: center;
	font-size: 10.5px;
	color: var(--ssac-text-muted);
	background: var(--ssac-bg);
}

.ssac-footer a {
	color: var(--ssac-primary, #4f46e5);
	font-weight: 600;
	text-decoration: none;
}

/* Typing Dots */
.ssac-typing-bubble {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 11px 14px;
}

.ssac-typing-bubble span {
	width: 6px;
	height: 6px;
	background: var(--ssac-text-muted);
	border-radius: 50%;
	animation: ssacBounce 1.2s infinite;
}

.ssac-typing-bubble span:nth-child(2) {
	animation-delay: 0.15s;
}

.ssac-typing-bubble span:nth-child(3) {
	animation-delay: 0.3s;
}

/* Feature 4: Inline Shortcode / Gutenberg Block Card */
.ssac-inline-embed-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	padding: 22px;
	margin: 20px 0;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.ssac-inline-embed-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.ssac-inline-embed-avatar {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: #4f46e5;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ssac-inline-embed-meta strong {
	display: block;
	font-size: 16px;
	color: #0f172a;
}

.ssac-inline-embed-meta span {
	font-size: 12.5px;
	color: #64748b;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ssac-inline-embed-meta .ssac-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #10b981;
	display: inline-block;
}

.ssac-inline-embed-welcome {
	margin: 0 0 16px;
	font-size: 14px;
	color: #334155;
	line-height: 1.55;
}

.ssac-inline-embed-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ssac-inline-trigger-btn {
	background: #4f46e5;
	color: #ffffff;
	border: 0;
	border-radius: 10px;
	padding: 10px 18px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ssac-inline-chip-btn {
	background: #f8fafc;
	color: #0f172a;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	padding: 10px 15px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

@keyframes ssacPulseRing {
	0% { transform: scale(0.96); opacity: 0.5; }
	70% { transform: scale(1.14); opacity: 0; }
	100% { transform: scale(1.14); opacity: 0; }
}

@keyframes ssacFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-3px); }
}

@keyframes ssacFadeUp {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes ssacBounce {
	0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
	40% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 480px) {
	.ssac-root {
		bottom: 16px;
	}
	.ssac-pos-right {
		right: 16px;
	}
	.ssac-pos-left {
		left: 16px;
	}
	.ssac-window {
		width: calc(100vw - 32px);
		height: calc(100vh - 96px);
		bottom: 68px;
	}
}

/* Visually hidden label, kept readable by assistive technology. */
.ssac-root .ssac-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ssac-composer-locked .ssac-input,
.ssac-composer-locked .ssac-send-btn {
	opacity: 0.5;
	cursor: not-allowed;
}

.ssac-if-error {
	margin: 6px 0 0;
	font-size: 12px;
	color: #DC2626;
}

/* Floating button stack: Call, WhatsApp and the assistant, same size. */
.ssac-fab-stack {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.ssac-fab {
	width: 60px;
	height: 60px;
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
}

.ssac-fab:hover,
.ssac-fab:focus-visible {
	transform: translateY(-2px);
}

.ssac-fab:focus-visible {
	outline: 3px solid rgba(15, 23, 42, 0.35);
	outline-offset: 3px;
}

.ssac-fab-call {
	background: #ffffff;
	color: var(--ssac-primary, #4f46e5);
	border: 1px solid var(--ssac-border);
	box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
}

.ssac-fab-call:hover,
.ssac-fab-call:focus-visible {
	color: var(--ssac-primary, #4f46e5);
}

.ssac-fab-wa {
	background: #25d366;
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.18);
	box-shadow: 0 10px 26px rgba(37, 211, 102, 0.38);
}

.ssac-fab-wa:hover,
.ssac-fab-wa:focus-visible {
	color: #ffffff;
}

/* Desktop: the label is a hover tip beside the button. */
.ssac-fab-label {
	position: absolute;
	top: 50%;
	right: calc(100% + 12px);
	transform: translateY(-50%);
	background: #0f172a;
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	padding: 6px 10px;
	border-radius: 8px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease;
}

.ssac-pos-left .ssac-fab-label {
	right: auto;
	left: calc(100% + 12px);
}

.ssac-fab:hover .ssac-fab-label,
.ssac-fab:focus-visible .ssac-fab-label {
	opacity: 1;
}

.ssac-launcher .ssac-fab-label {
	display: none;
}

/* Desktop: assistant on top, then WhatsApp, then Call. */
.ssac-fab-stack .ssac-launcher {
	order: -1;
}

.ssac-fab-stack .ssac-fab-call {
	order: 1;
}

/* The greeting tooltip sits beside the assistant button at the top of the stack. */
.ssac-root:has(.ssac-has-extra) .ssac-tooltip {
	bottom: 10px;
	right: 74px;
}

.ssac-fab-2:not(.ssac-open) .ssac-tooltip {
	bottom: 82px;
}

.ssac-fab-3:not(.ssac-open) .ssac-tooltip {
	bottom: 154px;
}

.ssac-pos-left:has(.ssac-has-extra) .ssac-tooltip {
	right: auto;
	left: 74px;
}

/* While the chat is open only the close button stays, below the window. */
.ssac-open .ssac-fab-call,
.ssac-open .ssac-fab-wa {
	display: none;
}

/* Mobile: a full-width bottom bar with labelled buttons. */
@media (max-width: 600px) {
	.ssac-root.ssac-has-bar {
		left: 0;
		right: 0;
		bottom: 0;
	}

	.ssac-has-bar .ssac-fab-stack {
		flex-direction: row;
		align-items: stretch;
		gap: 8px;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
		background: var(--ssac-bg);
		border-top: 1px solid var(--ssac-border);
		box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
	}

	.ssac-has-bar .ssac-fab-stack .ssac-launcher,
	.ssac-has-bar .ssac-fab-stack .ssac-fab-call {
		order: 0;
	}

	.ssac-has-bar .ssac-fab-stack .ssac-fab {
		flex: 1 1 0;
		min-width: 0;
		width: auto;
		height: 48px;
		padding: 0 6px;
		box-sizing: border-box;
		border-radius: 12px;
		gap: 8px;
		box-shadow: none;
	}

	.ssac-has-bar .ssac-fab-stack .ssac-fab:hover {
		transform: none;
	}

	.ssac-has-bar .ssac-fab-stack .ssac-fab svg {
		width: 20px;
		height: 20px;
	}

	.ssac-has-bar .ssac-fab-stack .ssac-fab-label,
	.ssac-has-bar.ssac-pos-left .ssac-fab-stack .ssac-fab-label {
		position: static;
		transform: none;
		opacity: 1;
		background: transparent;
		color: inherit;
		padding: 0;
		font-size: 14px;
		font-weight: 700;
	}

	.ssac-has-bar .ssac-fab-stack .ssac-launcher .ssac-fab-label {
		display: inline;
	}

	.ssac-has-bar .ssac-fab-call {
		background: color-mix(in srgb, var(--ssac-primary, #4f46e5) 10%, #ffffff);
		border-color: transparent;
	}

	.ssac-has-bar .ssac-fab-stack .ssac-launcher-ring,
	.ssac-has-bar .ssac-fab-stack .ssac-online-dot {
		display: none;
	}

	.ssac-has-bar .ssac-fab-stack .ssac-launcher-icon-open,
	.ssac-has-bar .ssac-fab-stack .ssac-launcher-icon-close {
		align-items: center;
	}

	/* Keep the bar visible while chatting; the window sits above it. */
	.ssac-has-bar.ssac-open .ssac-fab-call,
	.ssac-has-bar.ssac-open .ssac-fab-wa {
		display: flex;
	}

	.ssac-has-bar .ssac-window,
	.ssac-has-bar.ssac-pos-left .ssac-window {
		left: 8px;
		right: 8px;
		width: auto;
		max-width: none;
		bottom: calc(76px + env(safe-area-inset-bottom, 0px));
		height: calc(100vh - 100px);
		height: calc(100dvh - 100px);
	}

	.ssac-has-bar .ssac-tooltip {
		display: none;
	}

	/* Leave room so the bar never covers the footer. */
	body:has(.ssac-has-bar) {
		padding-bottom: 72px;
	}
}

/* Honeypot field for bots. */
.ssac-root .ssac-if-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
	.ssac-fab,
	.ssac-launcher {
		transition: none;
	}
}

/* Unread count on the launcher while the window is closed. */
.ssac-unread {
	position: absolute;
	top: -6px;
	left: -6px;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: #dc2626;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	border: 2px solid #ffffff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.ssac-unread[hidden] {
	display: none;
}

.ssac-open .ssac-unread {
	display: none;
}

.ssac-has-bar .ssac-fab-stack .ssac-unread {
	display: inline-block;
	position: static;
	margin-left: 4px;
	border: 0;
}

.ssac-has-bar .ssac-fab-stack .ssac-unread[hidden],
.ssac-has-bar.ssac-open .ssac-unread {
	display: none;
}

/* mw 2026-11-15: hide quick-action dock and suggestion chips */
#ssac-chips,.ssac-action-dock{display:none!important}
