/* css-bolhas.css — bolhas de mensagem e botões de ação */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px 10px;
  display: flex; flex-direction: column; gap: 16px;
  scroll-behavior: smooth;
}
.messages::-webkit-scrollbar { width: 3px; }
.messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 4px; }

.date-divider {
  text-align: center; font-size: 11px;
  color: var(--muted); letter-spacing: .06em;
  text-transform: uppercase; opacity: .55;
}

.msg-row {
  display: flex; flex-direction: column; gap: 5px;
  animation: fadeUp .28s ease both;
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}
.msg-row.user { align-items: flex-end; }
.msg-row.ai   { align-items: flex-start; }

/* Bolha — largura 95% (igual à caixa de texto) */
.bubble {
  width: 95%;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.42;
  color: var(--text);
  word-break: break-word;
  white-space: pre-line;
}
.bubble strong { font-weight: 700; }
.msg-row.user .bubble {
  background: #d8e8ff;
  margin-right: 5px;
  border-radius: 8px 8px 2px 8px;
}
.msg-row.ai .bubble {
  background: #ffffff;
  margin-left: 5px;
  border-radius: 8px 8px 8px 2px;
}

/* Botões de ação (Copiar / Compartilhar) embaixo do texto */
.bubble-actions {
  display: flex; gap: 14px;
  padding: 2px 6px;
  align-items: center;
}
.action-btn {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted);
  transition: color .2s, transform .15s;
}
.action-btn:hover { color: var(--neon-cyan); transform: scale(1.08); }
.action-btn svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.action-btn span { font-size: 9px; letter-spacing: .02em; white-space: nowrap; }

/* ── Cartões de vídeo do YouTube ── */
.video-cards{
  display:flex;flex-direction:column;gap:10px;
  margin:8px 0 12px 0;max-width:88%;
}
.video-card{
  display:flex;gap:10px;align-items:center;
  background:#f5f6f8;
  border:1px solid rgba(0,0,0,.10);
  border-radius:12px;overflow:hidden;
  text-decoration:none;color:#1a1d23;
  transition:.15s;
  box-shadow:0 0 10px rgba(0,255,255,.08);
}
.video-card:active{transform:scale(.97);border-color:rgba(0,255,255,.6)}
.vc-thumb{
  position:relative;width:120px;height:68px;flex-shrink:0;
  background:#000;
}
.vc-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.vc-dur{
  position:absolute;bottom:4px;right:4px;
  background:rgba(0,0,0,.8);color:#fff;
  font-size:10px;padding:1px 5px;border-radius:4px;
  font-family:'Outfit',monospace;
}
.vc-play{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:28px;height:28px;border-radius:50%;
  background:rgba(255,0,0,.85);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:11px;padding-left:2px;
}
.vc-info{flex:1;min-width:0;padding:6px 10px 6px 0}
.vc-titulo{
  font-size:12px;font-weight:600;line-height:1.3;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;
}
.vc-canal{
  font-size:10px;color:rgba(0,0,0,.5);margin-top:3px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

/* Bolha "carregando" — três pontinhos pulsando enquanto o Alex pensa */
.carregando-pontos {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 2px;
}
.carregando-pontos span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(0,0,0,.35);
  animation: pontoPulsa 1.1s infinite ease-in-out;
}
.carregando-pontos span:nth-child(1) { animation-delay: 0s; }
.carregando-pontos span:nth-child(2) { animation-delay: 0.18s; }
.carregando-pontos span:nth-child(3) { animation-delay: 0.36s; }
@keyframes pontoPulsa {
  0%, 60%, 100% { opacity: .35; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1.15); }
}

/* === Status Indicador (Analisando / Preparando) === */
.alex-status-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  min-width: 220px;
  font-size: 0.9rem;
  color: #a0e0d0;
  font-style: italic;
}
.alex-status-ondas {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}
.alex-status-ondas span {
  display: inline-block;
  width: 3px;
  height: 8px;
  background: #00e5c0;
  border-radius: 2px;
  animation: ondaStatus 0.8s ease-in-out infinite;
}
.alex-status-ondas span:nth-child(1) { animation-delay: 0s; }
.alex-status-ondas span:nth-child(2) { animation-delay: 0.15s; height: 14px; }
.alex-status-ondas span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ondaStatus {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50%       { transform: scaleY(2); opacity: 1; }
}
.alex-status-texto {
  transition: opacity 0.3s;
}
