/* Estilos del botón flotante */
.chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0C4593;
  border: none;
  padding: 15px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Estilos del contenedor del chat */
.chat-container {
  width: 350px;
  background: #112240;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: fixed;
  bottom: 80px;
  right: 20px;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

/* Cabecera */
.chat-header {
  background: #0C4593;
  color: #fff;
  text-align: center;
  padding: 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Botón de cerrar */
.close-button {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #fff;
}

/* Caja de mensajes */
.chat-box {
  padding: 15px;
  height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Estilos de los mensajes */
.message {
  margin: 5px 0;
  padding: 10px;
  border-radius: 5px;
  max-width: 75%;
}

.sent {
  background: #0C4593;
  color: #fff;
  align-self: flex-end;
}

.received {
  background: #1c3b56;
  align-self: flex-start;
  color: #fff;
}

/* Estilo del mensaje de carga */
.loading {
  background: transparent;
  color: #aaa;
  font-style: italic;
  align-self: flex-start;
  animation: blink 1.5s infinite;
}

/* Animación de parpadeo para el mensaje de carga */
@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Estilos del input */
.chat-input-container {
  display: flex;
  padding: 10px;
  background: #112240;
  border-top: 1px solid #0C4593;
}

.chat-input {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 5px;
  outline: none;
  background: #233554;
  color: #fff;
}

.send-button {
  background: #007D9E;
  border: none;
  padding: 10px 15px;
  margin-left: 10px;
  cursor: pointer;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
}

.send-button:hover {
  background: #0294bc;
}

.send-button:disabled {
  background: #555;
  cursor: not-allowed;
}
