/* общий сброс */
body { margin: 0; font-family: Arial, sans-serif; }
.mbw-hidden { display: none !important; }

#mbw-bot-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 300px;
  background: transparent;
  border-radius: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 0;
}

#mbw-chat-window {
  display: flex;
  flex-direction: column;
  padding: 10px;
  margin: 0;
  background: transparent;
  border-radius: 12px;
  overflow: visible; /* <- добавлено */
}



/* Сообщения бота */
.mbw-user-reply {
  background-color: #8B6A3F;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 20px;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  align-self: flex-start;
  max-width: 90%;
  word-wrap: break-word;
  margin: 0;
}

.mbw-chat-button {
  display: inline-block;      /* ширина по содержимому */
  background-color: rgba(255, 253, 162, 0.8);
  color: #333;
  padding: 7px 12px;          /* немного больше отступы для красоты */
  border-radius: 15px;
  font-size: 15px;
  cursor: pointer;
  border: none;
  text-align: center;
  margin: 2px 0;
  white-space: nowrap;        /* чтобы текст не переносился */
}

/* если кнопки в колонке flex */
#mbw-chat-window {
  display: flex;
  flex-direction: column;
  gap: 4px;                   /* расстояние между кнопками */
  align-items: flex-start;     /* чтобы кнопки не растягивались */
}


#mbw-chat-window .mbw-chat-button + .mbw-chat-button {
  margin-top: 2px !important;
}

#mbw-chat-window .mbw-user-reply + .mbw-chat-button {
  margin-top: 2px !important;
}


/* Hover эффект */
.mbw-chat-button:hover {
  background-color: rgba(255,255,255,1);
  border: 2px solid #2479e9;  /* окантовка */
  
}

#mbw-open-bot {
  position: fixed;               /* фиксируем кнопку на экране */
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: url('https://alco-center.biz/assets/templates/alkocenter/img/Anna.JPG') no-repeat center center;
  background-size: cover;
  cursor: pointer;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;             /* чтобы бейдж отображался за границами кнопки */
}

/* бейдж уведомления (всегда видим) */
#mbw-open-bot::after {
  content: "1";                  /* цифра уведомления */
  position: absolute;
  bottom: -2px;                  /* немного ниже кнопки */
  right: -2px;                   /* справа */
  width: 18px;
  height: 18px;
  background-color: red;
  color: white;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
  z-index: 1001;
}





#mbw-close-bot {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 255, 255, 0);
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: rgb(0, 0, 0); 
}

.mbw-user-reply {
  display: flex;             /* аватар и текст в ряд */
  align-items: flex-start;   /* выравнивание по верхнему краю */
  background-color: #2479e9;
  color: #fff;
  padding: 12px 12px 12px 0; /* убираем левый padding, чтобы аватар влез */
  border-radius: 20px;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  max-width: 90%;
  word-wrap: break-word;
  margin: 5px 0;
}

.mbw-user-reply .mbw-avatar {
  width: 40px;               /* размер аватара */
  height: 40px;
  border-radius: 50%;        /* круглая форма */
  margin: 0 10px 0 10px;     /* отступ справа и слева */
  object-fit: cover;
}

.mbw-user-reply .mbw-message-text {
  display: inline-block;
}
