#livechat-bubble {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: var(--livechat-accent, #00d000);
  color: var(--livechat-header-text, #0a0a0a);
  padding: 10px 14px;
  border-radius: 9999px;
  cursor: pointer;
  z-index: 99999;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
#livechat-bubble .bubble-status{ width:10px; height:10px; background:#fff; border-radius:50%; }
#livechat-bubble .bubble-icon{ font-size:18px; }

#livechat-widget {
  position: fixed;
  bottom: 18px; right: 18px;
  width: 340px; max-height: 560px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  display: none; flex-direction: column; overflow: hidden;
  z-index: 99998;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
#livechat-widget.chat-maximized { width: 520px; height: 640px; max-height: 640px; }

#chat-header {
  background: var(--livechat-accent, #00d000); color: var(--livechat-header-text, #0a0a0a);
  padding: 10px; display:flex; justify-content:space-between; align-items:center;
}
.agent-info{ display:flex; align-items:center; gap:10px; }
.agent-avatar{ width:32px; height:32px; border-radius:50%; }
.agent-name{ font-weight:700; color: var(--livechat-header-text, #0a0a0a); }
.agent-status{ font-size:12px; color: var(--livechat-header-text, #0a0a0a); opacity:.85; }
.chat-actions button{ background:transparent; border:0; color: var(--livechat-header-text, #0a0a0a); font-size:18px; margin-left:8px; cursor:pointer; }

#chat-body {
  flex:1; padding:10px; overflow-y:auto; display:flex; flex-direction:column; gap:8px; background:#f6f6f6;
}

/* Bubbles: higher contrast */
.message{ display:flex; flex-direction:column; }
.message.agent .bubble{
  background: var(--livechat-agent-bg, #0f172a);
  color: var(--livechat-agent-text, #f8fafc);
  border-radius:16px; padding:10px; max-width:80%;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.message.user .bubble{
  background: var(--livechat-user-bg, #e5e7eb); color: var(--livechat-user-text, #111827);
  align-self:flex-end; border-radius:16px; padding:10px; max-width:80%;
}

/* Links */
#chat-body .bubble a { color: var(--livechat-link, #1d4ed8); text-decoration:underline; }
#chat-body .bubble a:hover { text-decoration:none; }
.message.agent .bubble a { color: var(--livechat-link-agent, #93c5fd); } /* light blue on dark bubble */

/* Input row */
#chat-input{ display:flex; gap:.5rem; padding:.5rem; border-top:1px solid #e5e7eb; background:#fff; }
#chat-input input{
  flex:1; border:1px solid #e5e7eb; border-radius:9999px; padding:.6rem .9rem; background:#fff; outline:none;
}
#chat-input button{
  width:42px; height:42px; border-radius:9999px; border:none;
  background: var(--livechat-send-bg, #3b82f6); color:#fff; font-size:18px; line-height:1;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
#chat-input button:hover{ background: var(--livechat-send-hover, #2563eb); }
