#agente-btn {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #007bff;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.3);
  z-index: 1000;
}

#agente-btn:hover {
  box-shadow: 
    0 0 8px #00f,
    0 0 16px #00f,
    0 0 24px #00f,
    0 0 40px #007bff;
  transform: scale(1.05);
}

#agente-window {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 320px;
  height: 450px;
  border: 1px solid #ccc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  background: #fff;
  min-width: 250px;
  min-height: 300px;
  resize: both;          /* 👈 permite redimensionar */
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  font-size: 13px !important;
}

#agente-header {
  cursor: move;          /* 👈 arrastrar desde header */
  background: #f1f1f1;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
}

#agente-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: #f8f9fa;
}

.message {
  margin: 5px 0;
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 95%;
  word-wrap: break-word;
}

.user-msg {
  background: #007bff;
  color: white;
  align-self: flex-end;
}

.bot-msg {
  background: #e9ecef;
  color: black;
  align-self: flex-start;
}

#agente-input-area {
  padding: 8px;
  border-top: 1px solid #ddd;
  display: flex;
  align-items: center;
  background: white;
}

#agente-input {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 6px 12px;
  margin-right: 8px;
  resize: none;          
  overflow: hidden;      
}

#fileInput {
  display: none;
}

#agente-messages.dragover {
  border: 2px dashed #007bff;
  background: #e6f0ff;
}

.message.image-only.user-msg {
  background: transparent !important;
  padding: 0;
  border-radius: 0;
  max-width: 60%;
  align-self: flex-end;
}

.message.image-only.bot-msg {
  background: transparent !important;
  padding: 0;
  border-radius: 0;
  max-width: 60%;
  align-self: flex-start;
}

img.chat-img {
  width: 100%;
  border-radius: 8px;
  margin: 5px 0;
  display: block;
  border: 1px solid #ddd;
}

.typing-dots {
  display: inline-block;
}
.typing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  background: #999;
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

.drag-over {
  border: 2px dashed #00aaff;
}
.chat-img {
  max-width: 120px;
  border-radius: 6px;
  margin: 4px 0;
}

.message.user-msg img.chat-img {
  display: block;
  max-width: 150px;
  border-radius: 8px;
  background: none;
  box-shadow: none;
  border: none !important;
  padding: 0;
  margin: 4px 0;
}

.message.user-msg:has(img.chat-img) {
  background: none !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}
