/* ================================
   CHATBOT CONTENEDOR ACTUALIZADO
================================ */
.chatbot {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 330px;
  height: 460px; /* 👈 ALTURA FIJA */
  background: #0b0b0b;
  border: 1px solid rgba(0,255,136,0.35);
  border-radius: 20px;
  padding: 26px 16px 16px;
  z-index: 30;
  box-shadow: 0 0 25px rgba(0,255,136,0.25);
  display: flex;
  flex-direction: column;
  transition: all 0.35s ease;
}/* ================================
   ÁREA DE MENSAJES (BURBUJAS)
================================ */
.chatbot-mensajes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,255,136,0.3) transparent;
}

.chatbot-mensajes::-webkit-scrollbar {
  width: 4px;
}
.chatbot-mensajes::-webkit-scrollbar-thumb {
  background: rgba(0,255,136,0.3);
  border-radius: 4px;
}

/* ================================
   BURBUJAS
================================ */
.burbuja {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  animation: aparecer 0.25s ease;
}

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

/* Bot — izquierda */
.burbuja-bot {
  background: #161616;
  border: 1px solid rgba(0,255,136,0.2);
  color: #cfcfcf;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

/* Usuario — derecha */
.burbuja-usuario {
  background: linear-gradient(135deg, #00ff88, #00cc66);
  color: #000;
  font-weight: 600;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Cargando — puntos animados */
.burbuja-cargando {
  background: #161616;
  border: 1px solid rgba(0,255,136,0.2);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  padding: 12px 18px;
}

.puntos span {
  display: inline-block;
  animation: parpadeo 1.2s infinite;
  font-size: 18px;
  color: #00ff88;
  line-height: 1;
}
.puntos span:nth-child(2) { animation-delay: 0.2s; }
.puntos span:nth-child(3) { animation-delay: 0.4s; }

@keyframes parpadeo {
  0%, 80%, 100% { opacity: 0.2; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-4px); }
}

/* ================================
   BOTONES RÁPIDOS
================================ */
.chatbot-acciones {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chatbot-btn-rapido {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,255,136,0.3);
  background: transparent;
  color: #00ff88;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.chatbot-btn-rapido:hover {
  background: rgba(0,255,136,0.1);
  border-color: rgba(0,255,136,0.6);
}

/* ================================
   INPUT + BOTÓN ENVIAR
================================ */
.chatbot-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chatbot-input-row input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,255,136,0.25);
  background: #111;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.chatbot-input-row input:focus {
  border-color: rgba(0,255,136,0.6);
}

.chatbot-input-row input::placeholder {
  color: rgba(255,255,255,0.3);
}

#chatbot-enviar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #00ff88, #00cc66);
  color: #000;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

#chatbot-enviar:hover {
  transform: scale(1.1);
}

/* ================================
   MODAL FORMULARIO
================================ */
.chatbot-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.chatbot-modal.activo {
  display: flex;
}

.modal-contenido {
  background: #0e0e0e;
  border: 1px solid rgba(0,255,136,0.35);
  border-radius: 20px;
  padding: 32px;
  width: 90%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 0 30px rgba(0,255,136,0.2);
  animation: aparecer 0.3s ease;
}

.modal-contenido h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
  color: #fff;
}

#modal-cerrar {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
}

#modal-cerrar:hover {
  color: #00ff88;
}

/* Campos del formulario */
#modal-form label {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
  margin-top: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#modal-form input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,255,136,0.25);
  background: #161616;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

#modal-form input:focus {
  border-color: rgba(0,255,136,0.6);
}

.modal-submit {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, #00ff88, #00cc66);
  color: #000;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.modal-submit:hover {
  opacity: 0.9;
}

/* WhatsApp */
.modal-btn-wa {
  display: block;
  text-align: center;
  padding: 13px;
  border-radius: 12px;
  background: #25d366;
  color: #000;
  font-weight: 700;
  text-decoration: none;
  margin-top: 8px;
  transition: opacity 0.2s;
}

.modal-btn-wa:hover {
  opacity: 0.88;
}

/* Lista servicios */
.modal-servicios {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-servicios li {
  background: #161616;
  border: 1px solid rgba(0,255,136,0.18);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: #cfcfcf;
}

@media (max-width: 600px) {
  .chatbot {
    width: 95%;
    right: 2.5%;
    bottom: 10px;
    height: 80vh;
  }
}

/* ================================
   HEADER
================================ */

.chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,255,136,0.15);
}

.chatbot-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-avatar-mini {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(0,255,136,0.4);
}

.chatbot-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chatbot-info h4 {
  font-size: 14px;
  margin: 0;
  color: #fff;
}

.chatbot-info span {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}

.chatbot-controls {
  display: flex;
  gap: 6px;
}

.chatbot-controls button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: rgba(0,255,136,0.1);
  color: #00ff88;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.chatbot-controls button:hover {
  background: rgba(0,255,136,0.25);
}

.chatbot.minimizado {
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px rgba(0,255,136,0.3); }
  50% { box-shadow: 0 0 25px rgba(0,255,136,0.8); }
  100% { box-shadow: 0 0 10px rgba(0,255,136,0.3); }
}

.chatbot-burbuja {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(0,255,136,0.6);
  background: #0b0b0b;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 31;
  box-shadow: 0 0 18px rgba(0,255,136,0.5);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  padding: 0;
  overflow: hidden;
  animation: pulseGlow 2s infinite;
}

.chatbot-burbuja img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chatbot-burbuja:hover {
  box-shadow: 0 0 28px rgba(0,255,136,0.9);
  transform: scale(1.08);
}