/* Nexi - Chatbot */
/* Botón Nexi: solo imagen, sin fondo ni círculo */
#nexi-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  /* sin fondo ni borde ni sombras */
  background: transparent;
  border: none;
  box-shadow: none;

  /* que no haya forma circular ni rellenos */
  border-radius: 0;
  padding: 0;
  margin: 0;

  /* que el tamaño lo gobierne la imagen */
  width: auto;
  height: auto;

  cursor: pointer;
  line-height: 0;  /* evita espacios alrededor de la imagen */
  z-index: 10001;
}

#nexi-btn img {
  width: 56px;     /* ajusta tamaño del robot aquí */
  height: 56px;    /* si quieres que sea proporcional, quita esta línea y deja solo width */
  object-fit: contain;
  display: block;
  border-radius: 0;   /* sin redondeo */
  background: transparent;
}

#nexi-widget {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 320px;
  max-height: 60vh;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 10001;
  /* Pila sans-serif robusta para evitar quirks de ligaduras/glyphs */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

#nexi-header {
  background: #80B5A5;
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#nexi-header .title {
  font-weight: 700;
  font-size: 16px;
}

#nexi-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

#nexi-messages {
  padding: 12px;
  height: 280px;
  overflow-y: auto;
  background: #f7faf9;
}

.nexi-msg {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 10px;
  max-width: 85%;
  line-height: 1.35;
  font-size: 14px;

  /* Robustez tipográfica: evita problemas tras "¿" */
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-transform: none;
  white-space: pre-wrap; /* preserva espacios/saltos */
}

.nexi-bot {
  background: #e8f3ef;
  color: #1a2f28;
}

.nexi-user {
  background: #def1ea;
  color: #12362e;
  margin-left: auto;
}

#nexi-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px 0 12px;
}

.nexi-suggestion {
  background: #f0f7f5;
  border: 1px solid #d1e8e0;
  color: #1e4b3f;
  border-radius: 16px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

#nexi-inputbar {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px 12px;
  border-top: 1px solid #eef3f1;
  background: #fff;
}

#nexi-input {
  flex: 1;
  border: 1px solid #d7e7e1;
  border-radius: 18px;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
}

#nexi-send {
  background: #80B5A5;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
}

/* Nexi - Saludo emergente */
#nexi-greeting {
  position: fixed;
  right: 20px;
  bottom: 86px; /* justo encima del botón */
  max-width: 260px;
  background: #ffffff;
  border: 1px solid #dbe9e3;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
  z-index: 10002;
  animation: nexiFadeIn .25s ease-out;
}

#nexi-greeting .greet-content {
  display: flex;
  align-items: start;
  gap: 10px;
  padding: 12px 12px 10px 12px;
}

#nexi-greeting .greet-text {
  color: #18352c;
  font-size: 14px;
  line-height: 1.35;
}

#nexi-greeting .greet-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #78968b;
  font-size: 16px;
  cursor: pointer;
}

@keyframes nexiFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Forzar tipografía/antiligaduras en todo el widget y saludo */
#nexi-widget,
#nexi-widget *,
#nexi-greeting,
#nexi-greeting * {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-variant-ligatures: none !important;
  text-transform: none !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}