.voc-bot-root {
  --voc-ink: #f4f7f5;
  --voc-muted: rgba(244, 247, 245, .72);
  --voc-panel: #101612;
  --voc-panel-2: #18211c;
  --voc-accent: var(--primary, #006850);
  --voc-accent-2: #0ea36f;
  position: fixed;
  /* Acima do FAB do WhatsApp (bottom ~22px + altura do botão) */
  bottom: 96px;
  z-index: 49;
  font-family: var(--font-body, "Segoe UI", sans-serif);
}
.voc-bot-right { right: 18px; }
.voc-bot-left { left: 18px; }

.voc-fab {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--voc-accent), #0a4d3c);
  padding: .75rem .95rem;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
  font-weight: 800;
  font-size: .86rem;
  max-width: min(220px, calc(100vw - 40px));
}
.voc-fab:hover { transform: translateY(-2px); }
.voc-fab svg { flex: 0 0 auto; }

.voc-panel {
  width: min(380px, calc(100vw - 28px));
  height: min(560px, calc(100vh - 160px));
  display: none;
  flex-direction: column;
  background: var(--voc-panel);
  color: var(--voc-ink);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(0,0,0,.35);
  margin-bottom: .55rem;
}
.voc-bot-root.is-open .voc-panel { display: flex; }
.voc-bot-root.is-open .voc-fab { display: none; }
.voc-bot-root.is-open {
  bottom: 96px;
}

.voc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1rem .85rem;
  background: linear-gradient(180deg, #143328, var(--voc-panel));
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.voc-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.voc-head p {
  margin: .25rem 0 0;
  color: var(--voc-muted);
  font-size: .78rem;
  line-height: 1.35;
}
.voc-head-actions {
  display: flex;
  gap: .35rem;
}
.voc-icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.voc-icon-btn:hover { background: rgba(255,255,255,.16); }

.voc-messages {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  background:
    radial-gradient(circle at top right, rgba(14,163,111,.12), transparent 40%),
    var(--voc-panel);
}

.voc-bubble {
  max-width: 92%;
  padding: .7rem .85rem;
  border-radius: 14px;
  font-size: .9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.voc-bubble.bot {
  align-self: flex-start;
  background: var(--voc-panel-2);
  border: 1px solid rgba(255,255,255,.06);
}
.voc-bubble.user {
  align-self: flex-end;
  background: var(--voc-accent);
  color: #fff;
}
.voc-bubble.system {
  align-self: center;
  background: transparent;
  color: var(--voc-muted);
  font-size: .78rem;
  text-align: center;
}

.voc-courses {
  display: grid;
  gap: .55rem;
  margin-top: .15rem;
}
.voc-course {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: .6rem;
  padding: .55rem;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  text-decoration: none;
  color: inherit;
}
.voc-course:hover { border-color: rgba(14,163,111,.45); }
.voc-course img,
.voc-course .ph {
  width: 56px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: #24322c;
}
.voc-course .ph {
  display: grid;
  place-items: center;
  color: var(--voc-muted);
  font-size: .7rem;
  font-weight: 800;
}
.voc-course strong {
  display: block;
  font-size: .82rem;
  line-height: 1.25;
}
.voc-course span {
  display: block;
  margin-top: .15rem;
  color: var(--voc-muted);
  font-size: .72rem;
}

.voc-lead {
  display: none;
  gap: .45rem;
  padding: .75rem 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #0d1410;
}
.voc-bot-root.show-lead .voc-lead { display: grid; }
.voc-lead input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  background: #16201b;
  color: #fff;
  border-radius: 10px;
  padding: .55rem .7rem;
  font: inherit;
}
.voc-lead button {
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #0b0f0d;
  font-weight: 800;
  padding: .6rem .8rem;
  cursor: pointer;
}
.voc-lead button:disabled { opacity: .6; cursor: wait; }

.voc-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .45rem;
  padding: .75rem;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #0d1410;
}
.voc-compose input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  background: #16201b;
  color: #fff;
  border-radius: 999px;
  padding: .7rem 1rem;
  font: inherit;
}
.voc-compose button {
  border: 0;
  border-radius: 999px;
  background: var(--voc-accent-2);
  color: #fff;
  font-weight: 800;
  padding: 0 1rem;
  cursor: pointer;
}
.voc-compose button:disabled { opacity: .55; cursor: wait; }

.voc-typing {
  align-self: flex-start;
  color: var(--voc-muted);
  font-size: .78rem;
}

@media (max-width: 640px) {
  .voc-bot-root,
  .voc-bot-root.is-open {
    bottom: 88px;
  }
  .voc-bot-right, .voc-bot-left {
    right: 12px;
    left: auto;
  }
  .voc-bot-left {
    left: 12px;
    right: auto;
  }
  .voc-fab span {
    /* no mobile, ícone + texto curto ainda ok; evita sobrepor largura do WA */
  }
  .voc-panel {
    width: calc(100vw - 24px);
    height: min(65vh, 520px);
  }
}

@media (min-width: 768px) {
  .voc-bot-root,
  .voc-bot-root.is-open {
    /* Desktop: WhatsApp costuma mostrar label e fica mais alto */
    bottom: 118px;
  }
}
