


/* ==========================
   CHATBOT FLOTANTE PRO
========================== */

.chatbot-container{
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  font-family: "Poppins", sans-serif;
}

/* BOTÓN FLOTANTE */
.chatbot-btn{
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d4350, #5fa6c6);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0px 15px 40px rgba(0,0,0,0.25);
  transition: 0.3s ease;
}

.chatbot-btn:hover{
  transform: scale(1.08);
}

.chatbot-btn img{
  width: 62px;
  height: 62px;
}


/* CAJA */
.chatbot-box{
  width: 350px;
  height: 480px;
  border-radius: 25px;
  background: #f4f7fb;
  position: absolute;
  bottom: 90px;
  right: 0;

  overflow: visible; /* 🔥 CAMBIAR ESTO */
  display: none;
  flex-direction: column;

  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  animation: aparecerBot 0.4s ease;
}

/* ANIMACIÓN */
@keyframes fadeInUp{
  from{
    opacity: 0;
    transform: translateY(25px);
  }
  to{
    opacity: 1;
    transform: translateY(0px);
  }
}

/* HEADER */
.chatbot-header{
  background: linear-gradient(135deg, #0d4350, #5fa6c6);
  padding: 15px;
  color: white;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bot-info{
  display: flex;
  gap: 30px;
  align-items: center;
}

.bot-info img{
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: white;
  padding: 5px;
}

.bot-info h4{
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.bot-info span{
  font-size: 12px;
  opacity: 0.9;
}

.chatbot-close{
  background: transparent;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

/* MENSAJES */
.chatbot-messages{
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f8fafc;
}

.bot-message{
  background: white;
  padding: 10px 12px;
  border-radius: 15px;
  margin-bottom: 12px;
  font-size: 13px;
  box-shadow: 0px 8px 20px rgba(0,0,0,0.08);
}

.user-message{
  background: #0d4350;
  color: white;
  padding: 10px 12px;
  border-radius: 15px;
  margin-bottom: 12px;
  font-size: 13px;
  text-align: right;
  margin-left: auto;
  width: fit-content;
  max-width: 80%;
}

.chat-options{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 15px;
}

.chat-options button{
  flex: 1 1 45%;
  display: flex;
  align-items: center;
  gap: 8px;

  background: rgba(13,67,80,0.08);
  border: 1px solid rgba(13,67,80,0.15);
  padding: 10px 12px;
  border-radius: 14px;

  font-size: 12px;
  font-weight: 600;
  color: #0d4350;

  cursor: pointer;
  transition: 0.25s ease;
}

.chat-options button i{
  font-size: 15px;
  color: #146377;
}

.chat-options button:hover{
  background: rgba(95,166,198,0.25);
  transform: translateY(-2px);
  box-shadow: 0px 10px 25px rgba(0,0,0,0.08);
}

/* INPUT */
.chatbot-input{
  display: flex;
  padding: 12px;
  background: white;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.chatbot-input input{
  flex: 1;
  border: none;
  outline: none;
  padding: 10px;
  border-radius: 12px;
  background: #f1f5f9;
  font-size: 13px;
}

.chatbot-input button{
  margin-left: 10px;
  border: none;
  background: #0d4350;
  color: white;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: 0.3s ease;
}

.chatbot-input button:hover{
  background: #146377;
}

/* RESPONSIVE */
@media(max-width: 500px){
  .chatbot-box{
    width: 90vw;
    height: 430px;
    right: 0;
  }
}


/* NOTIFICACIÓN */
.chatbot-notification{
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff3b3b;
  color: white;
  font-size: 12px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0px 8px 20px rgba(0,0,0,0.25);
}

/* EFECTO REBOTE DEL BOT */
.chatbot-btn{
  position: relative;
  animation: bounceBot 2s infinite;
}

@keyframes bounceBot{
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

/* MENSAJE ESCRIBIENDO */
.typing{
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  background: white;
  border-radius: 15px;
  margin-bottom: 12px;
  width: fit-content;
  box-shadow: 0px 8px 20px rgba(0,0,0,0.08);
}

.typing span{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  animation: typingDots 1s infinite;
}

.typing span:nth-child(2){ animation-delay: 0.2s; }
.typing span:nth-child(3){ animation-delay: 0.4s; }

@keyframes typingDots{
  0%, 100% { opacity: 0.3; transform: translateY(0px); }
  50% { opacity: 1; transform: translateY(-4px); }
}



/* ANIMACIÓN APARICIÓN */
@keyframes aparecerBot{
  from{
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  to{
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bot-character{
  position: absolute;
  left: -120px;
  bottom: 10px;
  z-index: 99999;
  pointer-events: none;

  opacity: 0;
  transform: translateX(-80px) scale(0.7);
  transition: all 0.6s ease;
}

.bot-character.show-bot{
  opacity: 1;
  transform: translateX(0px) scale(1);
}

.bot-character img{
  width: 190px;
  height: auto;
}

/* TEXTO BLANCO DESTACADO */
.bot-info h4{
  color: white;
  font-size: 16px;
  font-weight: bold;
}

.bot-info span{
  color: #e0f2fe;
  font-size: 13px;
}

/* PUNTO VERDE */
.dot{
  width: 8px;
  height: 8px;
  background: #00ff7b;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}


/* BOTONES */
.chat-options button{
  background: #eaf1f5;
  border: none;
  padding: 12px;
  border-radius: 15px;
  font-weight: 600;
  cursor: pointer;
}

.chat-options button:hover{
  background: #d6e6ee;
}


@media(max-width: 768px){
  .bot-character{
    display: none; /* ocultar borrego en celular */
  }
}

/* ==========================
   RESPONSIVE CHATBOT
========================== */

@media (max-width: 768px){

  .chatbot-container{
    bottom: 15px;
    right: 15px;
  }

  /* BOTÓN MÁS PEQUEÑO */
  .chatbot-btn{
    width: 60px;
    height: 60px;
  }

  .chatbot-btn img{
    width: 50px;
    height: 50px;
  }

  /* CHAT COMO VENTANA GRANDE */
  .chatbot-box{
    width: 92vw;
    height: 75vh;
    right: 0;
    bottom: 80px;
    border-radius: 20px;
  }

  /* HEADER MÁS COMPACTO */
  .chatbot-header{
    padding: 12px;
  }

  .bot-info{
    gap: 12px;
  }

  .bot-info img{
    width: 55px;
    height: 55px;
  }

  .bot-info h4{
    font-size: 14px;
  }

  .bot-info span{
    font-size: 12px;
  }

  /* MENSAJES MÁS CÓMODOS */
  .chatbot-messages{
    padding: 12px;
  }

  .bot-message,
  .user-message{
    font-size: 13px;
  }

  /* BOTONES OPCIONES */
  .chat-options{
    gap: 8px;
  }

  .chat-options button{
    flex: 1 1 45%;
    font-size: 12px;
    padding: 10px;
    border-radius: 14px;
  }

  /* INPUT */
  .chatbot-input{
    padding: 10px;
  }

  .chatbot-input input{
    font-size: 13px;
    padding: 10px;
  }

  .chatbot-input button{
    padding: 10px 14px;
    font-size: 14px;
  }

  /* OCULTAR BORREGUITO GRANDE EN CELULAR */
  .bot-character{
    display: none !important;
  }
}