/* Widget embutido num tema WordPress de terceiros (Ohio) que aplica regras
   globais agressivas em `button[type=submit]`/`svg` (ex: `fill: currentColor
   !important`-like em ícones, resets de padding/min-height) — por isso quase
   tudo aqui usa !important e reset explícito de button/svg. Sem isso, o tema
   host pode silenciosamente sobrescrever cores e tamanhos deste widget. */

#helena-chat-root, #helena-chat-root * {
  box-sizing: border-box !important;
}

#helena-chat-root {
  position: fixed !important;
  z-index: 999999 !important;
  right: 20px !important;
  bottom: 20px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  line-height: normal !important;
}

#helena-chat-root button {
  all: unset;
  box-sizing: border-box !important;
  cursor: pointer !important;
}

#helena-chat-root svg {
  display: block !important;
}

/* ── Balão de convite ("teaser") — à esquerda do botão flutuante ────────── */

#helena-chat-teaser {
  position: absolute !important;
  right: 76px !important;
  bottom: 12px !important;
  left: auto !important;
  width: max-content !important;
  max-width: 260px !important;
  background: #fff !important;
  color: #173700 !important;
  padding: 14px 32px 14px 18px !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  animation: helena-chat-teaser-in 0.35s ease;
}
#helena-chat-teaser[hidden] { display: none !important; }
#helena-chat-teaser p { margin: 0 !important; padding: 0 !important; color: inherit !important; font: inherit !important; }
#helena-chat-teaser-close {
  position: absolute !important;
  top: 6px !important;
  right: 8px !important;
  font-size: 16px !important;
  line-height: 1 !important;
  color: #99a29c !important;
  padding: 2px !important;
}
#helena-chat-teaser-close:hover { color: #173700 !important; }

@keyframes helena-chat-teaser-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Botão flutuante + bolinha online ──────────────────────────────────── */

#helena-chat-toggle {
  position: relative !important;
  width: 60px !important;
  height: 60px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #9fe870 !important;
  box-shadow: 0 6px 20px rgba(23, 55, 0, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.15s ease;
}
#helena-chat-toggle:hover { transform: scale(1.05); background: #9fe870 !important; }
#helena-chat-toggle svg path { fill: #173700 !important; }
#helena-chat-toggle .helena-chat-toggle-icon-close {
  display: none;
  font-size: 30px !important;
  line-height: 1 !important;
  color: #173700 !important;
}
#helena-chat-root.-open #helena-chat-toggle .helena-chat-toggle-icon-open { display: none; }
#helena-chat-root.-open #helena-chat-toggle .helena-chat-toggle-icon-close { display: block !important; }

#helena-chat-root .helena-chat-online-dot {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  width: 13px !important;
  height: 13px !important;
  border-radius: 50% !important;
  background: #34c759 !important;
  border: 2px solid #fff !important;
}
#helena-chat-root .helena-chat-online-dot.-on-avatar {
  top: auto !important;
  bottom: -1px !important;
  right: -1px !important;
  width: 10px !important;
  height: 10px !important;
  border-color: #173700 !important;
}

/* ── Painel do chat ─────────────────────────────────────────────────────── */

#helena-chat-panel {
  position: absolute !important;
  right: 0 !important;
  bottom: 76px !important;
  width: 340px !important;
  max-width: calc(100vw - 40px) !important;
  height: 480px !important;
  max-height: calc(100vh - 140px) !important;
  background: #fff !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#helena-chat-panel[hidden] { display: none !important; }

#helena-chat-panel .helena-chat-header {
  background: #173700 !important;
  color: #fff !important;
  padding: 12px 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
#helena-chat-panel .helena-chat-avatar {
  position: relative !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
/* Ícone quadrado (colorido, preenche o quadro) — cobre o círculo todo, sem padding. */
#helena-chat-panel .helena-chat-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
#helena-chat-panel .helena-chat-header-text { flex: 1 !important; }
#helena-chat-panel .helena-chat-header-text strong { display: block !important; font-size: 15px !important; color: #fff !important; }
#helena-chat-panel .helena-chat-header-text span { display: block !important; font-size: 12px !important; opacity: 0.75 !important; color: #fff !important; }
#helena-chat-close {
  color: #fff !important;
  font-size: 22px !important;
  line-height: 1 !important;
  opacity: 0.8 !important;
  flex-shrink: 0 !important;
}
#helena-chat-close:hover { opacity: 1 !important; }

.helena-chat-screen {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.helena-chat-screen[hidden] { display: none !important; }

#helena-chat-messages {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

#helena-chat-messages .helena-chat-msg {
  max-width: 82% !important;
  padding: 9px 12px !important;
  border-radius: 14px !important;
  font-size: 13.5px !important;
  line-height: 1.4 !important;
  white-space: pre-wrap !important;
  margin: 0 !important;
}
#helena-chat-messages .helena-chat-msg.-user {
  align-self: flex-end !important;
  background: #9fe870 !important;
  color: #173700 !important;
  border-bottom-right-radius: 4px !important;
}
#helena-chat-messages .helena-chat-msg.-assistant {
  align-self: flex-start !important;
  background: #f0f2f1 !important;
  color: #222 !important;
  border-bottom-left-radius: 4px !important;
}
#helena-chat-messages .helena-chat-msg.-system {
  align-self: center !important;
  background: transparent !important;
  color: #777 !important;
  font-size: 12px !important;
  text-align: center !important;
}
#helena-chat-messages .helena-chat-msg.-typing { color: #999 !important; font-style: italic !important; }

#helena-chat-messages .helena-chat-quick-replies {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  align-self: flex-start !important;
  max-width: 100% !important;
  margin: 0 !important;
}
#helena-chat-messages .helena-chat-quick-reply {
  border: 1.5px solid #9fe870 !important;
  background: #fff !important;
  color: #173700 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  padding: 7px 12px !important;
  border-radius: 999px !important;
  line-height: 1.3 !important;
}
#helena-chat-messages .helena-chat-quick-reply:hover {
  background: #9fe870 !important;
}

#helena-chat-message-form {
  display: flex !important;
  gap: 8px !important;
  padding: 10px 12px !important;
  border-top: 1px solid #eee !important;
}
#helena-chat-message-input {
  all: unset;
  box-sizing: border-box !important;
  flex: 1 !important;
  border: 1px solid #d8dedc !important;
  border-radius: 20px !important;
  padding: 9px 14px !important;
  font-size: 13.5px !important;
  color: #222 !important;
  background: #fff !important;
}
#helena-chat-message-input:focus { outline: 2px solid #9fe870 !important; border-color: #9fe870 !important; }
#helena-chat-message-form button {
  width: 38px !important;
  height: 38px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #173700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
#helena-chat-message-form button:hover { background: #0e2400 !important; }
#helena-chat-message-form button svg { fill: none !important; }
#helena-chat-message-form button svg path { fill: none !important; stroke: #fff !important; }

@media (max-width: 480px) {
  #helena-chat-panel { width: calc(100vw - 24px) !important; right: -8px !important; }
  #helena-chat-teaser { right: 68px !important; max-width: calc(100vw - 100px) !important; }
}
