/* css/suporte-widget.css — Widget de Suporte (botão flutuante + chat FAQ) */

#suporte-fab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: transform 0.15s ease;
}
#suporte-fab:hover {
  transform: scale(1.06);
}

#suporte-painel {
  position: fixed;
  bottom: 88px;
  left: 20px;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: 70vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
#suporte-painel.show {
  display: flex;
}

.suporte-header {
  background: #3b82f6;
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.suporte-header .suporte-voltar {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  display: none;
}
.suporte-header .suporte-voltar.show {
  display: block;
}
.suporte-header .suporte-titulos {
  flex: 1;
}
.suporte-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.suporte-header p {
  margin: 2px 0 0;
  font-size: 11px;
  opacity: 0.85;
}
.suporte-header .suporte-fechar {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.85;
}

.suporte-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f1f5f9;
}

/* Bolhas de mensagem - estilo chat */
.suporte-msg-agente {
  background: #fff;
  border-radius: 12px 12px 12px 2px;
  padding: 10px 13px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #1f2937;
  line-height: 1.5;
  max-width: 88%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.suporte-msg-visitante {
  background: #3b82f6;
  color: #fff;
  border-radius: 12px 12px 2px 12px;
  padding: 10px 13px;
  margin: 0 0 10px auto;
  font-size: 13px;
  line-height: 1.4;
  max-width: 80%;
  width: fit-content;
}

/* Indicador de "escribiendo..." */
.suporte-digitando {
  background: #fff;
  border-radius: 12px 12px 12px 2px;
  padding: 11px 15px;
  margin-bottom: 10px;
  display: inline-flex;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.suporte-digitando span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
  animation: suporte-bounce 1.2s infinite ease-in-out;
}
.suporte-digitando span:nth-child(2) { animation-delay: 0.15s; }
.suporte-digitando span:nth-child(3) { animation-delay: 0.3s; }
@keyframes suporte-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Lista de opções de FAQ */
.suporte-faq-container {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
}
.suporte-faq-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: #1f2937;
  cursor: pointer;
  transition: background 0.15s ease;
}
.suporte-faq-item:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

/* Botões "resolvió tu duda" */
.suporte-resolveu-botoes {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.suporte-resolveu-botoes button {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.suporte-resolveu-botoes button.sim {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

/* Campo de digitar o nome */
.suporte-nome-form {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.suporte-nome-form input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
}
.suporte-nome-form input:focus {
  border-color: #3b82f6;
}
.suporte-nome-form button {
  width: 38px;
  border: none;
  border-radius: 10px;
  background: #3b82f6;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.suporte-msg-agente a {
  color: #3b82f6;
  font-weight: 600;
}

body.dark-mode #suporte-painel {
  background: #1e293b;
}
body.dark-mode .suporte-body {
  background: #0f172a;
}
body.dark-mode .suporte-msg-agente,
body.dark-mode .suporte-digitando {
  background: #1e293b;
  color: #e5e7eb;
}
body.dark-mode .suporte-faq-item {
  background: #1e293b;
  border-color: #334155;
  color: #e5e7eb;
}
body.dark-mode .suporte-nome-form input {
  background: #1e293b;
  border-color: #334155;
  color: #e5e7eb;
}
