:root{
  --cb-chat-bg: #0b0f19;
  --cb-chat-card: #121a2b;
  --cb-chat-border: rgba(255,255,255,0.08);
  --cb-chat-text: rgba(255,255,255,0.92);
  --cb-chat-muted: rgba(255,255,255,0.65);
  --cb-chat-accent: #8b5cf6; /* adjust to your brand */
}

.cb-chat-launcher{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid var(--cb-chat-border);
  background: linear-gradient(135deg, var(--cb-chat-accent), #22c55e);
  box-shadow: 0 14px 30px rgba(0,0,0,0.25);
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

.cb-chat-launcher svg{ width: 26px; height: 26px; color: white; }

.cb-chat-panel{
  position: fixed;
  right: 18px;
  bottom: 84px;
  z-index: 9999;
  width: min(380px, calc(100vw - 36px));
  height: 520px;
  border-radius: 18px;
  background: var(--cb-chat-bg);
  border: 1px solid var(--cb-chat-border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.cb-chat-panel.open{ display:flex; }

.cb-chat-header{
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--cb-chat-border);
  padding: 14px 14px;
  display:flex;
  gap: 10px;
  align-items:center;
}

.cb-chat-badge{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(139,92,246,0.18);
  border: 1px solid rgba(139,92,246,0.35);
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--cb-chat-accent);
  font-weight: 700;
}

.cb-chat-title{
  flex:1;
  color: var(--cb-chat-text);
  font-weight: 700;
}

.cb-chat-subtitle{
  font-size: 12px;
  color: var(--cb-chat-muted);
  margin-top: 2px;
}

.cb-chat-close{
  border: 1px solid var(--cb-chat-border);
  background: transparent;
  color: var(--cb-chat-text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
}

.cb-chat-messages{
  flex:1;
  padding: 14px;
  overflow-y: auto;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.cb-msg{
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--cb-chat-border);
  line-height: 1.35;
  font-size: 14px;
}

.cb-msg.bot{
  background: var(--cb-chat-card);
  color: var(--cb-chat-text);
  align-self: flex-start;
  border-top-left-radius: 6px;
}

.cb-msg.user{
  background: rgba(139,92,246,0.20);
  color: var(--cb-chat-text);
  align-self: flex-end;
  border-top-right-radius: 6px;
  border-color: rgba(139,92,246,0.35);
}

.cb-typing{
  font-size: 12px;
  color: var(--cb-chat-muted);
  padding: 0 14px 10px 14px;
  display:none;
}

.cb-typing.show{ display:block; }

.cb-chat-input{
  border-top: 1px solid var(--cb-chat-border);
  padding: 12px;
  display:flex;
  gap: 10px;
  background: rgba(255,255,255,0.02);
}

.cb-chat-input input{
  flex:1;
  border-radius: 14px;
  border: 1px solid var(--cb-chat-border);
  padding: 10px 12px;
  background: rgba(0,0,0,0.25);
  color: var(--cb-chat-text);
  outline: none;
}

.cb-chat-input button{
  border-radius: 14px;
  border: 1px solid rgba(139,92,246,0.35);
  background: rgba(139,92,246,0.22);
  color: var(--cb-chat-text);
  padding: 10px 14px;
  cursor:pointer;
  font-weight: 700;
}