#chat-bubble {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0d6efd;
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  z-index: 9999;
}

#chat-box {
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: 340px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #ddd;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
}

.chat-header {
  background: #0d6efd;
  color: #fff;
  padding: 10px;
  font-weight: 600;
  position: relative; /* Necesario para ubicar la X */
}

.chat-messages {
  height: 300px;
  overflow-y: auto;
  padding: 12px;
}

.msg {
  margin-bottom: 10px;
  font-size: 14px;
}

.msg.bot {
  background: #f1f1f1;
  padding: 8px 10px;
  border-radius: 8px;
  display: inline-block;
}

.msg.user {
  background: #0d6efd;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  display: block;
  margin-left: auto;
  width: fit-content;
}

.chat-input {
  display: flex;
  border-top: 1px solid #eee;
}

.chat-input input {
  flex: 1;
  border: none;
  padding: 10px;
}

.chat-input button {
  border: none;
  background: #0d6efd;
  color: #fff;
  padding: 0 15px;
}

/* Botón X para cerrar */
.btn-cerrar {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.btn-cerrar:hover {
  color: #ff4c4c;
}