/* Estilos del chat */
#custom-chat {
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 5px 10px -5px rgba(0, 0, 0, 0.04);
  visibility: hidden;
  transition: all 0.3s ease;
}

.dark #custom-chat {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 5px 10px -5px rgba(0, 0, 0, 0.2);
}

#custom-chat.chat-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

/* Estilos de los mensajes */
.message {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
  animation: messageIn 0.3s ease forwards;
}

.message-user {
  margin-left: auto;
  background-color: #1EAEDB;
  color: white;
  border-bottom-right-radius: 0.25rem;
}

.dark .message-user {
  background-color: #66D9EF;
}

.message-bot {
  margin-right: auto;
  background-color: #f3f4f6;
  color: #1f2937;
  border-bottom-left-radius: 0.25rem;
}

.dark .message-bot {
  background-color: #3c3d37;
  color: #F8F8F2;
}

/* Área de mensajes - Scrollbar */
#chat-messages {
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 217, 239, 0.5) transparent;
}

#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
  background-color: rgba(102, 217, 239, 0.5);
  border-radius: 3px;
}

/* Animaciones */
@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  width: fit-content;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}