/* SA Businesses — AI chat assistant widget */
.sab-chat-widget { position: fixed; bottom: 22px; z-index: 99998; font-family: inherit; }
.sab-chat-widget.sab-chat-right { right: 22px; }
.sab-chat-widget.sab-chat-left { left: 22px; }

.sab-chat-launcher {
	display: inline-flex; align-items: center; gap: 10px;
	background: #0f766e; color: #fff; border: 0; cursor: pointer;
	padding: 14px 20px; border-radius: 999px; font-size: 15px; font-weight: 600;
	box-shadow: 0 12px 30px rgba(15, 118, 110, .35);
	transition: transform .15s ease, box-shadow .15s ease;
}
.sab-chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(15, 118, 110, .45); }
.sab-chat-launcher i { font-size: 18px; }
@media (max-width: 600px) {
	.sab-chat-launcher { padding: 16px; }
	.sab-chat-launcher-label { display: none; }
}

.sab-chat-modal {
	position: absolute; bottom: 72px; width: 380px; max-width: calc(100vw - 32px);
	height: 540px; max-height: calc(100vh - 130px);
	background: #fff; border-radius: 18px; overflow: hidden;
	display: flex; flex-direction: column;
	box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
	border: 1px solid #e2e8f0;
}
.sab-chat-right .sab-chat-modal { right: 0; }
.sab-chat-left .sab-chat-modal { left: 0; }
.sab-chat-modal[hidden] { display: none; }

.sab-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: #0f766e; color: #fff; }
.sab-chat-head-id { display: flex; align-items: center; gap: 10px; }
.sab-chat-head-id strong { display: block; font-size: 15px; line-height: 1.2; }
.sab-chat-head-id small { opacity: .85; font-size: 12px; }
.sab-chat-avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.sab-chat-close { background: transparent; border: 0; color: #fff; font-size: 18px; cursor: pointer; opacity: .85; }
.sab-chat-close:hover { opacity: 1; }

.sab-chat-body { flex: 1; overflow-y: auto; padding: 16px; background: #f8fafc; display: flex; flex-direction: column; gap: 12px; }
.sab-chat-msg { max-width: 88%; font-size: 14px; line-height: 1.5; }
.sab-chat-msg p { margin: 0 0 8px; }
.sab-chat-msg p:last-child { margin-bottom: 0; }
.sab-chat-msg.sab-from-user { align-self: flex-end; background: #0f766e; color: #fff; padding: 10px 14px; border-radius: 16px 16px 4px 16px; }
.sab-chat-msg.sab-from-bot { align-self: flex-start; color: #0f172a; }
.sab-chat-msg.sab-from-bot a { color: #0f766e; font-weight: 600; }
.sab-chat-msg ul, .sab-chat-msg ol { margin: 0 0 8px 18px; }

.sab-chat-card { border: 1px solid #e2e8f0; background: #fff; border-radius: 14px; padding: 12px 14px; margin-top: 8px; }
.sab-chat-card-title { font-weight: 700; font-size: 14px; }
.sab-chat-card-title a { color: #0f172a; text-decoration: none; }
.sab-chat-card-title a:hover { color: #0f766e; }
.sab-chat-card-sub { font-size: 13px; color: #475569; margin-top: 2px; }
.sab-chat-card-meta { font-size: 12px; color: #64748b; margin-top: 4px; }
.sab-chat-card-meta a { color: #0f766e; }
.sab-chat-card-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; color: #0f766e; text-decoration: none; }

.sab-chat-typing { display: inline-flex; gap: 4px; align-self: flex-start; padding: 10px 12px; }
.sab-chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: sabBounce 1.1s infinite; }
.sab-chat-typing span:nth-child(2) { animation-delay: .15s; }
.sab-chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sabBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

.sab-chat-suggestions { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 0; background: #fff; }
.sab-chat-chip { flex: 0 0 auto; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; padding: 6px 12px; font-size: 12px; color: #334155; cursor: pointer; white-space: nowrap; }
.sab-chat-chip:hover { background: #ecfdf5; border-color: #99f6e4; color: #0f766e; }

.sab-chat-form { display: flex; gap: 8px; padding: 12px; background: #fff; border-top: 1px solid #eef2f6; }
.sab-chat-input { flex: 1; border: 1px solid #dbe3ec; border-radius: 999px; padding: 11px 16px; font-size: 14px; outline: none; }
.sab-chat-input:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,.12); }
.sab-chat-send { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 50%; background: #0f766e; color: #fff; cursor: pointer; display: grid; place-items: center; }
.sab-chat-send:disabled { opacity: .5; cursor: default; }
