/* ---- Widget de chat comercial (assistente Neuros AI) ---- */
.neu-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  font-family: var(--default-font, "Manrope", sans-serif);
}

.neu-chat-toggle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-color, #A93E17), var(--accent-secondary-color, #15399A)) center / cover no-repeat;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.neu-chat-toggle.has-avatar { background-image: url("../images/chat/assistant-avatar.png"); }
.neu-chat-toggle:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6); }
.neu-chat-toggle svg { width: 24px; height: 24px; }
.neu-chat-toggle .neu-chat-icon-close {
  display: none;
  background: rgba(6, 6, 6, 0.72);
  width: 100%;
  height: 100%;
  place-items: center;
}
.neu-chat.is-open .neu-chat-toggle .neu-chat-icon-chat { display: none; }
.neu-chat.is-open .neu-chat-toggle .neu-chat-icon-close { display: grid; }
.neu-chat-toggle.has-avatar .neu-chat-icon-chat { display: none; }

.neu-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #33d17a;
  border: 2px solid var(--bg-color, #060606);
}

.neu-chat-panel {
  position: absolute;
  right: 0;
  bottom: 80px;
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 140px);
  background: #1a1b22;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  box-shadow: 0 4px 0 0 var(--accent-color, #A93E17), 0 24px 70px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.neu-chat.is-open .neu-chat-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.neu-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #21222b, #191a20);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}
.neu-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color, #A93E17), var(--accent-secondary-color, #15399A)) center / cover no-repeat;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.14);
}
.neu-chat-avatar.has-avatar { background-image: url("../images/chat/assistant-avatar.png"); }
.neu-chat-avatar.has-avatar span { display: none; }
.neu-chat-header-text { flex: 1; min-width: 0; }
.neu-chat-header-text strong { display: block; color: #fff; font-size: 13.5px; font-weight: 700; }
.neu-chat-header-text span { display: flex; align-items: center; gap: 5px; color: #7f8798; font-size: 11px; margin-top: 2px; }
.neu-chat-header-text span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #33d17a; display: inline-block; }
.neu-chat-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #8a92a3;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.neu-chat-close:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.neu-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.neu-chat-messages::-webkit-scrollbar { width: 5px; }
.neu-chat-messages::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }

.neu-chat-msg { max-width: 84%; font-size: 13px; line-height: 1.5; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.neu-chat-msg.from-bot { align-self: flex-start; background: #22232c; color: var(--text-color, #d4d7e0); border-bottom-left-radius: 4px; }
.neu-chat-msg.from-user { align-self: flex-end; background: linear-gradient(135deg, var(--accent-color, #A93E17), #8a3212); color: #fff; border-bottom-right-radius: 4px; }
.neu-chat-msg strong { color: #fff; }

.neu-chat-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #22232c; border-radius: 14px; border-bottom-left-radius: 4px; }
.neu-chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: #7f8798; animation: neu-chat-blink 1.2s infinite ease-in-out; }
.neu-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.neu-chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes neu-chat-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.neu-chat-form {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #1a1b22;
}
.neu-chat-input {
  flex: 1;
  resize: none;
  max-height: 90px;
  min-height: 20px;
  background: #22232c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
}
.neu-chat-input:focus { border-color: var(--accent-color, #A93E17); }
.neu-chat-input::placeholder { color: #63697a; }
.neu-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-color, #A93E17), var(--accent-secondary-color, #15399A));
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: opacity 0.15s ease;
}
.neu-chat-send:disabled { opacity: 0.45; cursor: not-allowed; }
.neu-chat-send svg { width: 16px; height: 16px; }

/* ---- Feedback do formulário de newsletter ---- */
.newsletter-msg {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
}
.newsletter-msg.is-success { color: #2fbf71; }
.newsletter-msg.is-error { color: #e65757; }

/* ---- Rodapé: razão social/CNPJ discretos, abaixo do copyright ---- */
.footer-legal-text {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--text-color, #A7AABB);
  opacity: 0.6;
}

@media (max-width: 480px) {
  .neu-chat { right: 14px; bottom: 14px; }
  .neu-chat-panel { width: calc(100vw - 28px); height: calc(100vh - 120px); bottom: 72px; }
}
