.ct-msg {
  display: flex;
  gap: 10px;
  animation: ct-fade-in 0.25s ease;
}
.ct-msg-bot { align-items: flex-start; }
.ct-msg-user { align-items: flex-start; flex-direction: row-reverse; }
.ct-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #CA313F, #E89A24);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}
.ct-msg-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-family: var(--cb-font-body, 'DM Sans', sans-serif);
  font-size: 14px;
  line-height: 1.55;
}
.ct-msg-bot .ct-msg-bubble {
  background: #251810;
  color: rgba(245,239,230,0.90);
  border-radius: 4px 14px 14px 14px;
}
.ct-msg-user .ct-msg-bubble {
  background: linear-gradient(135deg, #CA313F, #E89A24);
  color: #fff;
  border-radius: 14px 4px 14px 14px;
}

/* Typing dots */
.ct-typing {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}
.ct-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(245,239,230,0.4);
  animation: ct-bounce 1.2s infinite;
}
.ct-typing span:nth-child(2) { animation-delay: 0.2s; }
.ct-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ct-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}
@keyframes ct-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Pastille flottante ── */
#ct-bubble {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
#ct-bubble-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #CA313F, #E89A24);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(202,49,63,0.35);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
}
#ct-bubble-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(202,49,63,0.45);
}
#ct-bubble-popup {
  width: 340px;
  background: #1A100A;
  border: 1px solid rgba(245,239,230,0.10);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0,0,0,0.5);
  display: none;
  flex-direction: column;
}
#ct-bubble-popup.open { display: flex; }
#ct-bubble-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #251810;
  border-bottom: 1px solid rgba(245,239,230,0.07);
}
#ct-bubble-popup-header .ct-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #CA313F, #E89A24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
#ct-bubble-popup-title {
  flex: 1;
  font-family: var(--cb-font-display, 'Space Grotesk', sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: #F5EFE6;
}
#ct-bubble-close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(245,239,230,0.72);
  font-size: 18px;
  padding: 0;
  line-height: 1;
}
#ct-bubble-close:hover { color: #F5EFE6; }
#ct-bubble-msgs {
  padding: 16px;
  min-height: 140px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,239,230,0.1) transparent;
}
#ct-bubble-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(245,239,230,0.07);
  background: #1E1410;
}
#ct-bubble-input {
  flex: 1;
  background: rgba(245,239,230,0.07);
  border: 1px solid rgba(245,239,230,0.12);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--cb-font-body, 'DM Sans', sans-serif);
  font-size: 13px;
  color: #F5EFE6;
  outline: none;
}
#ct-bubble-input::placeholder { color: rgba(245,239,230,0.85); }
#ct-bubble-input:focus { border-color: rgba(232,154,36,0.50); }
#ct-bubble-send {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #CA313F, #E89A24);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#ct-bubble-send:disabled { opacity: 0.4; cursor: not-allowed; }
@media (max-width: 480px) {
  #ct-bubble { bottom: 16px; right: 16px; }
  #ct-bubble-popup { width: calc(100vw - 32px); }
}
