/* Widget */
.cbv2-launcher{position:fixed;z-index:99999;bottom:20px;right:20px;width:64px;height:64px;border-radius:50%;border:3px solid var(--cbv2-accent,#ba697f);display:flex;align-items:center;justify-content:center;background:#fff;box-shadow:0 4px 16px rgba(0,0,0,.15);cursor:pointer;overflow:hidden}
.cbv2-launcher.left{left:20px;right:auto}
.cbv2-launcher.center-bottom{left:50%;transform:translateX(-50%)}
.cbv2-launcher.center{left:50%;bottom:50%;transform:translate(-50%,50%)}
.cbv2-launcher img{width:100%;height:100%;object-fit:cover}
.cbv2-dot{width:12px;height:12px;border-radius:50%;background:var(--cbv2-accent,#ba697f)}

.cbv2-window{position:fixed;z-index:999999;border-radius:16px;box-shadow:0 12px 40px rgba(0,0,0,.2);overflow:hidden;display:none;background:var(--cbv2-bg,#fff)}
.cbv2-window.visible{display:flex;flex-direction:column}
.cbv2-header{padding:10px 12px;background: var(--cbv2-header-bg, #ffffff);border-bottom:1px solid #eee;display:flex;align-items:center;justify-content:space-between}
.cbv2-title{
	font-weight:600;
    color: var(--cbv2-title-color, #000000);
}
.cbv2-close{cursor:pointer;font-size:18px;line-height:1}
/* Mensagens em coluna (uma por linha) */
.cbv2-messages{
  padding:10px;
  height:100%;
  overflow:auto;
  background: linear-gradient(
    180deg,
    var(--cbv2-chat-bg-1, #0a111f) 0%,
    var(--cbv2-chat-bg-2, #020617) 100%
  ) !important;
  display:flex;                /* NOVO */
  flex-direction:column;       /* NOVO */
  gap:8px;                     /* espaço entre mensagens */
}


.cbv2-bubble{
  background:var(--cbv2-bubble,#f5f5f5);
  color:var(--cbv2-text-bot,#000) !important; /* 👈 ISTO */
  padding:8px 12px;
  border-radius:12px;
  display:block;
  align-self:flex-start;
  max-width:85%;
  word-break:break-word;
}


/* Bolha do utilizador: vai para a direita */
.cbv2-bubble.user{
  background:#e6f2ff;
  color:var(--cbv2-text-user,#000) !important; /* 👈 ISTO */
  align-self:flex-end;
  margin-left:0;
}


.cbv2-footer{
	padding:8px;
	border-top:1px solid #eee;
	display:flex;gap:6px
}


.cbv2-footer input[type="text"],
.cbv2-footer input[type="email"],
.cbv2-footer input[type="tel"],
.cbv2-footer input[type="date"]{
  flex:1;
  padding:8px 10px;
  border:1px solid #ddd;
  border-radius:10px;
  color:var(--cbv2-text-input,#000) !important; /* 👈 ISTO */
}
.cbv2-footer button{padding:8px 12px;border:none;border-radius:10px;background:var(--cbv2-accent,#ba697f);color:#fff;cursor:pointer}
@media (max-width:768px){ .cbv2-launcher{width:56px;height:56px;bottom:12px;right:12px} }


/* Indicador de escrita (...) */
.cbv2-typing {
    background: #e5e7eb;
    padding: 12px 16px;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    display: inline-flex;
    gap: 4px;
    width: fit-content;
    margin-bottom: 8px;
    align-self: flex-start;
}

.cbv2-dot {
    width: 6px;
    height: 6px;
    background: #6b7280;
    border-radius: 50%;
    animation: cbv2-bounce 1.4s infinite ease-in-out both;
}

.cbv2-dot:nth-child(1) { animation-delay: -0.32s; }
.cbv2-dot:nth-child(2) { animation-delay: -0.16s; }
.cbv2-dot:nth-child(3) { animation-delay: 0s; }

@keyframes cbv2-bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}
