/* BOTÓN */
#chatButton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #3B68F6;
    color: white;
    font-size: 22px;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999999;
}

/* Tooltip */
.chatbot-tooltip {
  position: absolute;
  bottom: 70px;
  right: 0;
  background-color: #333;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  width: 180px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease;
  pointer-events: none;
  white-space: pre-line;
}

.chatbot-tooltip.show {
    opacity: 1;
}

/* Flechita */
.chatbot-tooltip::after {
  content: "|";
  position: absolute;
  bottom: -6px;
  right: 15px;
  border-width: 6px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
  animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Mostrar al hacer hover */
#chatButton:hover .chatbot-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* CONTENEDOR */
#chatContainer {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 320px;
    height: 420px;
    background: white;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 999999;
}

/* HEADER */
#chatHeader {
    background: #3B68F6;
    color: white;
    padding: 12px;
    font-weight: bold;
}

/* MENSAJES */
#chatMessages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
}

/* INPUT */
#chatInputContainer {
    display: flex;
    border-top: 1px solid #ddd;
}

#chatInput {
    flex: 1;
    border: none;
    padding: 10px;
}

#sendBtn {
    background: #3B68F6;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
}

/* MENSAJES */
.user {
    text-align: right;
    margin: 5px 0;
}

.bot {
    text-align: left;
    margin: 5px 0;
}

.bubble {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 80%;
}

.user .bubble {
    background: #3B68F6;
    color: white;
}

.bot .bubble {
    background: #f1f1f1;
}
