/* ========== BOT: Estilos aislados ========== */

#bot-btn {
  position: fixed;
  bottom: 30px;
  left: 20px;
  width: 100px;
  height: 100px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000;
}

#bot-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  transition: transform 0.3s ease;
}

#bot-btn:hover img {
  transform: scale(1.1);
}

#chat-container {
  position: fixed;
  bottom: 120px;
  left: 20px;
  max-height: 60vh;
  overflow: hidden;
  width: 340px;
  background: rgba(13, 13, 13, 0.98);
  color: #ffffff;
  border: 2px solid #0A84FF;
  border-radius: 16px;
  font-family: 'Inter', sans-serif;
  padding: 16px;
  box-shadow: 0 0 40px rgba(10, 132, 255, 0.4);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

#chat-container.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#chat-log {
  height: 200px;
  overflow-y: auto;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  font-size: 14px;
  line-height: 1.4em;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #fff;
}

#chat-input {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #0A84FF;
  background: #111;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

#chat-input::first-letter {
  text-transform: uppercase;
}

#chat-input::placeholder {
  color: #888;
}

#chat-log > div {
  padding: 10px 14px;
  border-radius: 8px;
  max-width: 80%;
  line-height: 1.4;
  word-wrap: break-word;
}

#chat-log .usuario {
  align-self: flex-end;
  background-color: #0A84FF;
  color: #000;
  text-align: right;
  margin-left: auto;
  border-right: 4px solid #fff;
}

#chat-log .bot {
  align-self: flex-start;
  background-color: #222;
  color: #fff;
  text-align: left;
  margin-right: auto;
  border-left: 4px solid #0FF;
}

#chat-input:focus {
  outline: none;
  border-color: #0FF;
}

/* Responsive */
@media screen and (max-width: 768px) {
  #bot-btn {
    bottom: 50px;
    right: 16px;
    left: auto;
    width: 70px;
    height: 70px;
  }

  #bot-btn img {
    width: 100%;
    height: 100%;
  }

  #chat-container {
    width: 90vw;
    max-width: 95vw;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(20px);
    bottom: 120px;
    font-size: 14px;
    padding: 12px;
    border-radius: 12px;
  }

  #chat-container.visible {
    transform: translateX(-50%) translateY(0);
  }

  #chat-log {
    height: 180px;
    font-size: 13px;
    padding-bottom: 8px;
  }

  #chat-input {
    font-size: 13px;
    padding: 8px;
  }

  #chat-log > div {
    font-size: 13px;
    max-width: 100%;
    word-break: break-word;
  }
}
