#lantana-chat-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 22px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  background: #048d28;
  color: #fff;
  z-index: 9999;
}

#lantana-chat-panel {
  position: fixed;
  right: 18px;
  bottom: 84px;
  width: 360px;
  max-width: calc(100vw - 36px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.16);
  overflow: hidden;
  display: none;
  z-index: 9999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

#lantana-chat-panel.open { display: flex; flex-direction: column; }

#lantana-chat-header {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: #fafafa;
}

#lantana-chat-title { font-weight: 650; font-size: 14px; }

#lantana-chat-close { border: none; background: transparent; cursor: pointer; font-size: 16px; }

#lantana-chat-messages {
  padding: 12px;
  overflow: auto;
  flex: 1;
}

.lantana-msg { margin: 8px 0; display: flex; }
.lantana-msg .lantana-msg-text {
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.3;
  font-size: 13px;
  max-width: 85%;
  white-space: pre-wrap;
}

.lantana-user { justify-content: flex-end; }
.lantana-user .lantana-msg-text { background: #111; color: #fff; border-bottom-right-radius: 6px; }

.lantana-assistant { justify-content: flex-start; }
.lantana-assistant .lantana-msg-text { background: #f3f4f6; color: #111; border-bottom-left-radius: 6px; }

#lantana-chat-consent {
  padding: 10px 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 12px;
  color: #333;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #fafafa;
}

#lantana-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

#lantana-chat-input {
  flex: 1;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

#lantana-chat-send {
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  background: #111;
  color: #fff;
  font-size: 13px;
}
#lantana-chat-send:disabled { opacity: 0.6; cursor: not-allowed; }


.lantana-msg-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lantana-action-btn {
  background: #6b2cff; /* violeta lantana */
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.lantana-action-btn:hover {
  opacity: 0.9;
}

/* --- FIX: acciones del bot abajo, no al costado --- */
.lantana-msg {
  flex-direction: column;  /* asegura texto arriba + acciones abajo */
  align-items: flex-start;
}

.lantana-user {
  align-items: flex-end;   /* el usuario a la derecha */
}

.lantana-msg-text {
  width: fit-content;
  max-width: 85%;
}

.lantana-msg-actions {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;  /* 🔥 apiladas */
  gap: 10px;
}

.lantana-action-btn {
  width: 100%;             /* 🔥 botón ancho completo */
  text-align: center;
  border-radius: 12px;
  padding: 10px 12px;
}

/* Opcional: si querés que los botones del usuario no aparezcan */
.lantana-user .lantana-msg-actions {
  display: none;
}


/* ===== Actions (botones) – estética DOOH/Smart City + layout abajo ===== */

/* Asegura que el mensaje sea columna: texto arriba, acciones abajo */
.lantana-msg {
  margin: 8px 0;
  display: flex;
  flex-direction: column;
}

/* Mantener alineación: usuario derecha, asistente izquierda */
.lantana-user { align-items: flex-end; }
.lantana-assistant { align-items: flex-start; }

/* Mensaje */
.lantana-msg .lantana-msg-text {
  width: fit-content;
  max-width: 85%;
}

/* Contenedor de acciones: abajo del texto */
.lantana-msg-actions {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column; /* apiladas */
  gap: 10px;
}

/* Botones: full width + gradiente acorde */
.lantana-action-btn {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  text-align: center;

  background: linear-gradient(135deg, #1e90ff 0%, #01343f 40%, #6b3bff 100%);

  box-shadow:
    0 6px 14px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -1px 0 rgba(0,0,0,0.25);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

/* Hover = se eleva */
.lantana-action-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.25);
  filter: saturate(1.1);
}

/* Click = se hunde */
.lantana-action-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow:
    0 4px 10px rgba(0,0,0,0.3),
    inset 0 2px 4px rgba(0,0,0,0.35);
}


/* Opcional: ocultar acciones en mensajes del usuario */
.lantana-user .lantana-msg-actions {
  display: none;
}
