/* Botón flotante del asistente */
.chat-button {
  position: fixed !important;
  bottom: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  min-width: 65px !important;
  height: 65px !important;
  padding: 0 20px !important;
  background: linear-gradient(135deg, #3db3c5 0%, #5fc9d6 100%) !important;
  border-radius: 35px !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 20px rgba(61, 179, 197, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  transition: all 0.3s ease !important;
  z-index: 99999 !important;
  color: white !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

.chat-button:hover {
  transform: translateX(-50%) scale(1.05) !important;
  box-shadow: 0 6px 25px rgba(61, 179, 197, 0.6) !important;
}

.chat-button i {
  font-size: 24px !important;
  color: white !important;
}

.chat-button.active {
  background: linear-gradient(135deg, #2a9aa8 0%, #3db3c5 100%) !important;
}

/* Ventana del chat */
.chat-window {
  position: fixed !important;
  bottom: 85px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 380px !important;
  height: 550px !important;
  background: white !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
  display: none !important;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 99998 !important;
  animation: slideUp 0.3s ease !important;
}

.chat-window.active {
  display: flex !important;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.chat-header {
  background: linear-gradient(135deg, #3db3c5 0%, #5fc9d6 100%) !important;
  color: white !important;
  padding: 5px 10px !important; /* Cambiado de 10px a 5px arriba/abajo */
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
}

.chat-header-avatar {
  width: 45px !important;
  height: 45px !important;
  background: white !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  margin-left: 30px !important;
}

.chat-header-info h2 {
  font-size: 18px !important;
  margin-top: 10px !important; /* Reducido de 10px a 5px */
  margin-bottom: 2px !important; /* Reducido de 3px a 2px */
  color: white !important;
}

.chat-header-info p {
  font-size: 16px !important;
  opacity: 0.9 !important;
  color: white !important;
  margin: 0 !important;
}

/* Cuerpo del chat */
.chat-body {
  flex: 1 !important;
  padding: 20px !important;
  overflow-y: auto !important;
  background: #f9f9f9 !important;
}

/* Contenedor de mensajes */
.chat-messages {
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
}

/* Estructura de cada mensaje */
.message {
  display: flex !important;
  gap: 10px !important;
  align-items: flex-start !important;
  animation: fadeIn 0.3s ease !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  flex-direction: row-reverse !important;
}

.message.assistant {
  justify-content: flex-start !important;
  flex-direction: row !important;
}

/* Avatar del mensaje */
.message-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  flex-shrink: 0 !important;
  background: #3db3c5 !important;
  color: white !important;
}

.message.user .message-avatar {
  background: #eaabf5 !important;
}

.message.assistant .message-avatar {
  background: #3db3c5 !important;
}

/* Contenido del mensaje */
.message-content {
  max-width: 70% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

/* Burbuja del mensaje */
.message-bubble {
  padding: 12px 16px !important;
  border-radius: 18px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  word-wrap: break-word !important;
  background-color: white !important;
}

.message.assistant .message-bubble {
  background: white !important;
  color: #333 !important;
  border-bottom-left-radius: 4px !important;
}

.message.user .message-bubble {
  background: linear-gradient(135deg, #3db3c5 0%, #5fc9d6 100%) !important;
  color: white !important;
  border-bottom-right-radius: 4px !important;
}

/* Tiempo del mensaje */
.message-time {
  font-size: 11px !important;
  color: #727171 !important;
  padding: 0 5px !important;
}

.message.user .message-time {
  text-align: right !important;
}

/* Pie del chat */
.chat-footer {
  padding: 15px !important;
  background: white !important;
  border-top: 1px solid #eee !important;
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
}

.chat-input {
  flex: 1 !important;
  padding: 12px 16px !important;
  border: 1px solid #ddd !important;
  border-radius: 25px !important;
  font-size: 14px !important;
  outline: none !important;
  transition: border-color 0.2s ease !important;
}

.chat-input:focus {
  border-color: #3db3c5 !important;
}

.send-button {
  width: 45px !important;
  height: 45px !important;
  background: linear-gradient(135deg, #3db3c5 0%, #5fc9d6 100%) !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s ease !important;
  flex-shrink: 0 !important;
  color: white !important;
}

.send-button:hover {
  transform: scale(1.05) !important;
}

.send-button i {
  font-size: 18px !important;
  color: white !important;
}

.clear-button {
  width: 45px !important;
  height: 45px !important;
  background: #f44336 !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  color: white !important;
}

.clear-button:hover {
  transform: scale(1.05) !important;
  background: #d32f2f !important;
}

.clear-button i {
  font-size: 18px !important;
  color: white !important;
}

/* Indicador de escritura */
.typing-indicator {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 12px 16px !important;
  background: white !important;
  border-radius: 18px !important;
  width: fit-content !important;
}

.typing-indicator span {
  display: block !important;
  width: 8px !important;
  height: 8px !important;
  background: #3db3c5 !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  animation: typing 1.4s infinite !important;
}

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

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

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Mensaje de bienvenida */
.welcome-message {
  display: flex !important;
  gap: 10px !important;
  align-items: flex-start !important;
}

.welcome-message .message-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #3db3c5 !important;
  color: white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  flex-shrink: 0 !important;
}

.welcome-message .message-content {
  background: white !important;
  padding: 12px 16px !important;
  border-radius: 18px !important;
  border-bottom-left-radius: 4px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: #333 !important;
  max-width: 70% !important;
}

/* Responsive */
@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 20px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    height: calc(100vh - 250px) !important;
  }

  .message-content {
    max-width: 75% !important;
  }
}

#buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-left: 20px;  
}

#buttons-grid .btn {
  display: flex;
  flex-direction: row;  
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  text-decoration: none;
  border: 2px solid;
  text-align: left;
  cursor: pointer;
}


#btn-whatsapp {
  background: #fff;
  color: #1e7d3a;
  border-color: #25d366;
}

/* Botón Teléfono */
#btn-phone {
  background: #fff;
  color: #1f4fa3;
  border-color: #3b82f6;
}

/* Botón Ubicación */
#btn-location {
  background: #fff;
  color: #d32f2f;
  border-color: #ef5350;
}

#btn-agenda {
  background: #fff;
  color: #6a5acd;
  border-color: #6a5acd;
}
