/* 1.69: AI chat bubble for visitors. Uses the site's accent colour. */
.wmpb-chat { --c: var(--wp--preset--color--accent, var(--color-primary, #2563eb)); position: fixed; bottom: 20px; z-index: 99990; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #0f172a; }
.wmpb-chat-right { right: 20px; }
.wmpb-chat-left { left: 20px; }
.wmpb-chat *, .wmpb-chat *::before, .wmpb-chat *::after { box-sizing: border-box; }
.wmpb-chat svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wmpb-chat-bubble { width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--c); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); transition: transform .15s; margin: 0; padding: 0; }
.wmpb-chat-bubble:hover { transform: scale(1.05); }
.wmpb-chat-bubble:focus-visible, .wmpb-chat button:focus-visible, .wmpb-chat a:focus-visible, .wmpb-chat textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 45%, #fff); outline-offset: 2px; }
.wmpb-chat-bubble svg { width: 26px; height: 26px; }
.wmpb-chat-left .wmpb-chat-bubble { margin-right: auto; }
.wmpb-chat-right .wmpb-chat-bubble { margin-left: auto; }
.wmpb-chat-panel { position: absolute; bottom: 72px; width: 370px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 110px); background: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(15, 23, 42, .28); display: flex; flex-direction: column; overflow: hidden; }
.wmpb-chat-right .wmpb-chat-panel { right: 0; }
.wmpb-chat-left .wmpb-chat-panel { left: 0; }
.wmpb-chat-panel[hidden] { display: none; }
.wmpb-chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; background: var(--c); color: #fff; }
.wmpb-chat-title { flex: 1; min-width: 0; display: grid; }
.wmpb-chat-title b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wmpb-chat-title span { font-size: 12px; opacity: .85; }
.wmpb-chat-x { background: transparent; border: 0; color: #fff; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.wmpb-chat-x:hover { background: rgba(255, 255, 255, .15); }
.wmpb-chat-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #f8fafc; }
.wmpb-chat-msg { display: flex; flex-direction: column; gap: 8px; max-width: 86%; }
.wmpb-chat-msg.is-a { align-self: flex-start; align-items: flex-start; }
.wmpb-chat-msg.is-v { align-self: flex-end; align-items: flex-end; }
.wmpb-chat-msg.is-new { animation: wmpbChatIn .2s ease-out; }
@keyframes wmpbChatIn { from { opacity: 0; transform: translateY(6px); } }
.wmpb-chat-text { padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.is-a .wmpb-chat-text { background: #fff; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px; }
.is-v .wmpb-chat-text { background: var(--c); color: #fff; border-bottom-right-radius: 4px; }
.wmpb-chat-note { font-size: 12px; color: #15803d; }
.wmpb-chat-typing .wmpb-chat-text { display: flex; gap: 4px; padding: 14px; }
.wmpb-chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: wmpbChatDot 1s infinite; }
.wmpb-chat-typing i:nth-child(2) { animation-delay: .15s; }
.wmpb-chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes wmpbChatDot { 50% { opacity: .3; transform: translateY(-2px); } }
.wmpb-chat-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--c); color: #fff !important; text-decoration: none !important; font-weight: 600; font-size: 14px; }
.wmpb-chat-btn svg { width: 16px; height: 16px; }
.wmpb-chat-btn:hover { filter: brightness(1.08); }
.wmpb-chat-quick { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 16px 12px; background: #f8fafc; }
.wmpb-chat-quick:empty { display: none; }
.wmpb-chat-chip { border: 1px solid color-mix(in srgb, var(--c) 40%, #cbd5e1); background: #fff; color: #0f172a; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.wmpb-chat-chip:hover { border-color: var(--c); }
.wmpb-chat-form { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border-top: 1px solid #e2e8f0; background: #fff; }
.wmpb-chat-input { flex: 1; resize: none; border: 1px solid #cbd5e1; border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; line-height: 1.35; max-height: 120px; color: #0f172a; background: #fff; margin: 0; }
.wmpb-chat-send { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--c); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; margin: 0; }
.wmpb-chat-send:disabled { opacity: .6; cursor: wait; }
.wmpb-chat-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wmpb-chat-foot { margin: 0; padding: 0 12px 10px; font-size: 11px; color: #64748b; text-align: center; background: #fff; }
@media (max-width: 480px) {
	.wmpb-chat { bottom: 16px; }
	.wmpb-chat-right { right: 16px; }
	.wmpb-chat-left { left: 16px; }
	.wmpb-chat.is-open .wmpb-chat-panel { position: fixed; inset: 0; width: auto; max-width: none; height: auto; max-height: none; border-radius: 0; bottom: 0; }
	.wmpb-chat.is-open .wmpb-chat-bubble { display: none; }
}
@media (prefers-reduced-motion: reduce) { .wmpb-chat * { animation: none !important; transition: none !important; } }

/* 1.92: a person from the business answering live */
.wmpb-chat-who { font-size: 11px; font-weight: 600; opacity: .7; margin: 0 0 3px 2px; }
.wmpb-chat-msg.is-person .wmpb-chat-text { box-shadow: inset 3px 0 0 #16a34a; }
.wmpb-chat-live { text-align: center; color: #166534; background: #dcfce7; border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
