/* ============== STAFFPLUS CHAT WIDGET (CSS) ============== */
.sp-chat-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0ea5e9;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.2);
  cursor: pointer;
  z-index: 999999;
}

.sp-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 86px;
  width: 340px;
  max-width: calc(100% - 40px);
  background: #0b1220;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  color: #e5e7eb;
  font-family: ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial;
  display: none;
  z-index: 999999;
}

.sp-chat-header {
  background: #111827;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.sp-title {
  font-weight: 700;
  font-size: 14px;
}

.sp-sub {
  font-size: 12px;
  color: #9ca3af;
}

.sp-chat-body {
  background: #0b1220;
  height: 380px;
  padding: 12px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.sp-msg {
  max-width: 80%;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.35;
  font-size: 14px;
  white-space: pre-wrap;
}

.sp-bot {
  background: #0f172a;
  border: 1px solid #1f2937;
}

.sp-user {
  background: #2563eb;
  color: #fff;
  margin-left: auto;
}

.sp-sugg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.sp-sugg button {
  background: #111827;
  color: #93c5fd;
  border: 1px solid #1f2937;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.sp-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #0f172a;
  border-top: 1px solid #1f2937;
}

.sp-input input {
  flex: 1;
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 10px;
  color: #e5e7eb;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.sp-input button {
  background: #2563eb;
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.sp-typing {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}
/* ============== / STAFFPLUS CHAT WIDGET (CSS) ============== */
.sp-msg-wrap { display: flex; flex-direction: column; max-width: 80%; margin: 8px 0; }
.sp-msg-wrap.right { margin-left: auto; align-items: flex-end; }
.sp-msg-wrap.left { align-items: flex-start; }
.sp-meta { color:#9ca3af; font-size: 11px; margin-top: 4px; }
/* Clic perfecto en el FAB aunque sea sobre el SVG */
.sp-chat-fab svg { pointer-events: none; }

/* Accesibilidad: focus visible al navegar con TAB */
.sp-input input:focus,
.sp-input button:focus,
.sp-sugg button:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

/* Botón de transferencia a WhatsApp / mano humana */
.sp-whatsapp-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #10b981; /* verde WhatsApp */
  color: #ffffff !important; /* asegurar letras blancas */
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  border: none;
  width: auto;
  max-width: 220px;
  box-sizing: border-box;
  text-align: center;
}
.sp-whatsapp-btn:hover { opacity: 0.98; }

/* Si el enlace queda dentro de la burbuja del bot, forzamos color blanco */
.sp-msg.sp-bot .sp-whatsapp-btn { color: #fff; }

/* Icono y label dentro del botón: tamaño más pequeño y centrado sobre la etiqueta */
.sp-whatsapp-icon,
.sp-whatsapp-img {
  width: 20px;
  height: 20px;
  display: block;
  margin: 0 auto 6px auto;
  fill: #ffffff;
  object-fit: contain;
}
.sp-whatsapp-label { color: #ffffff; text-align: center; display: block; }
