/* Lanzador minimizado (botón flotante) */
.inmo-launcher {
  position: fixed;
  left: 40px;
  bottom: 40px;
  z-index: 2147483647; /* bien arriba de todo */
}

.inmo-launcher-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.inmo-launcher-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 22px rgba(0,0,0,0.25);
}

.inmo-launcher-btn:active {
  transform: translateY(0) scale(0.95);
}

/* Widget de chat */
.inmo-chat-widget {
  position: fixed;
  left: 40px;
  bottom: 20px;
  z-index: 2147483647;
  max-width: 380px;
  width: 100%;
  height: 460px;
  border-radius: 12px;
  border: 2px solid #cacaca;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  background: #fff;
}

/* Animación al abrir el chat */
.inmo-chat-widget.inmo-anim-open {
  animation: inmo-chat-pop 0.4s ease-out;
}

@keyframes inmo-chat-pop {
  0% {
    transform: translateY(20px) scale(0.9);
    opacity: 0;
  }
  60% {
    transform: translateY(-4px) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.inmo-hidden {
  display: none !important;
}

.inmo-chat-header {
  padding: 10px 14px;
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inmo-chat-header-text small {
  font-size: 11px;
  opacity: 0.9;
}

.inmo-chat-close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.inmo-chat-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #575757;
}

.inmo-chat-message {
  margin-bottom: 10px;
  display: flex;
}

.inmo-chat-message.user {
  justify-content: flex-end;
}

.inmo-chat-bubble {
  max-width: 80%;
  padding: 8px 10px;
  border-radius: 10px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.inmo-chat-message.user .inmo-chat-bubble {
  background: #0d6efd;
  color: #fff;
  border-bottom-right-radius: 2px;
}

.inmo-chat-message.bot .inmo-chat-bubble {
  background: #e7e6e6;
  color: #6a6666;
  border-bottom-left-radius: 2px;
  border: 1px solid #e0e3eb;
}

/* burbuja typing */
.inmo-typing-bubble {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inmo-typing-dots {
  display: inline-flex;
  align-items: flex-end;
}

.inmo-typing-dots span {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #999;
  margin-left: 3px;
  animation: inmo-typing-bounce 1s infinite ease-in-out;
}

.inmo-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.inmo-typing-dots span:nth-child(3) { animation-delay: 0.30s; }

@keyframes inmo-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%          { transform: translateY(-3px); opacity: 1; }
}

/* tarjetas propiedades */
.inmo-chat-properties {
  margin-top: 6px;
}

.inmo-chat-property-card {
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
  border: 1px solid #e0e3eb;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;

  opacity: 0;
  transform: translateY(4px);
  animation: inmo-card-in 0.3s ease-out forwards;
}

/* ya no usamos nth-child con delays, los delays vienen desde JS */
@keyframes inmo-card-in {
  0%   { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.inmo-chat-property-thumb {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 6px;
}

.inmo-chat-property-title {
  font-weight: 600;
  font-size: 13px;
  color: #222;
}

.inmo-chat-property-meta {
  font-size: 11px;
  color: #555;
}

.inmo-chat-property-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  background: #0d6efd;
  color: #fff;
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
}

.inmo-chat-property-btn:hover {
  background: #0a58ca;
}

.inmo-properties-separator {
  width: 100%;
  height: 20px;
}

/* opcional: estilos para acciones de propiedad */
.inmo-property-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inmo-property-actions button {
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  background: #0d6efd;
  color: #fff;
}

.inmo-property-actions button:hover {
  background: #0a58ca;
}


.inmo-chat-property-meta {
  font-size: 11px;
  color: #555;
}


.inmo-property-number {
  font-size: 11px;
  font-weight: 600;
  color: #555;
}

/* más propiedades */
.inmo-more-buttons {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inmo-more-buttons button {
  border: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.inmo-more-yes {
  background: #0d6efd;
  color: #fff;
}

.inmo-more-no {
  background: #e9f2ff;
  color: #0d6efd;
}

/* lead actions + formulario */
.inmo-chat-lead-actions {
  padding: 8px 12px;
  border-top: 1px solid #eee;
  background: #fafbff;
}

.inmo-chat-lead-actions p {
  margin: 0 0 6px;
  font-size: 13px;
}

.inmo-chat-lead-actions button {
  margin-right: 6px;
  margin-bottom: 4px;
  border: none;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}

#inmo-btn-ajustar {
  background: #e9f2ff;
  color: #0d6efd;
}

#inmo-btn-lead {
  background: #0d6efd;
  color: #fff;
}

.inmo-chat-lead-form {
  padding: 8px 12px;
  border-top: 1px solid #eee;
  background: #fff;
}

.inmo-chat-lead-form p {
  margin: 0 0 6px;
}

.inmo-chat-lead-form input,
.inmo-chat-lead-form textarea {
  width: 100%;
  margin-bottom: 6px;
  padding: 6px 8px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.inmo-chat-lead-form textarea {
  resize: vertical;
  min-height: 60px;
}

.inmo-chat-lead-form button {
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: #0d6efd;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

/* input mensaje */
.inmo-chat-input {
  padding: 8px;
  border-top: 1px solid #ddd;
  display: flex;
  gap: 6px;
  background: #fff;
}

.inmo-chat-input input {
  flex: 1;
  padding: 6px 8px;
  border-radius: 20px;
  border: 1px solid #ccc;
  font-size: 13px;
}

.inmo-chat-input button {
  border: none;
  padding: 6px 12px;
  border-radius: 20px;
  background: #0d6efd;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}
.inmo-lead-cancel-btn {
  margin-left: 6px;
  background: #e9e9e9;
  color: #444;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.inmo-lead-cancel-btn:hover {
  background: #d5d5d5;
}
