/* Tinh Hoa Biolife - Guided Chatbox (fast MVP) */
:root { --bl-chat: #f2694f; --bl-chat-dark: #d9533a; }
#bl-chat-launcher {
  position: fixed; right: 18px; bottom: 18px; z-index: 999998;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--bl-chat); color: #fff; border: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(242,105,79,.45);
  font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
#bl-chat-launcher:hover { background: var(--bl-chat-dark); }
#bl-chat-launcher .bl-chat-badge {
  position: absolute; top: -2px; right: -2px; width: 16px; height: 16px;
  border-radius: 50%; background: #e4212a; border: 2px solid #fff;
}
#bl-chat-win {
  position: fixed; right: 18px; bottom: 88px; z-index: 999998;
  width: 384px; max-width: calc(100vw - 24px); height: 560px; max-height: calc(100vh - 120px);
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  display: none; flex-direction: column;
  font-family: inherit;
}
#bl-chat-win.bl-open { display: flex; }
.bl-chat-head {
  background: var(--bl-chat); color: #fff; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.bl-chat-head .bl-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #fff;
  color: var(--bl-chat); font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bl-chat-head .bl-title { flex: 1; min-width: 0; }
.bl-chat-head .bl-title b { display: block; font-size: 14px; }
.bl-chat-head .bl-title span { font-size: 12px; opacity: .9; }
.bl-chat-head button {
  background: transparent; border: none; color: #fff; cursor: pointer;
  font-size: 16px; padding: 4px 6px;
}
#bl-chat-body { flex: 1; overflow-y: auto; padding: 12px; background: #f7f7f8; }
.bl-msg { margin-bottom: 10px; display: flex; }
.bl-msg.bot { justify-content: flex-start; }
.bl-msg.user { justify-content: flex-end; }
.bl-bubble {
  max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.5;
}
.bl-msg.bot .bl-bubble { background: #fff; color: #333; border: 1px solid #eee; border-top-left-radius: 4px; }
.bl-msg.user .bl-bubble { background: var(--bl-chat); color: #fff; border-top-right-radius: 4px; }
.bl-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.bl-opt {
  border: 1px solid var(--bl-chat); color: var(--bl-chat); background: #fff;
  border-radius: 18px; padding: 7px 14px; font-size: 13px; cursor: pointer;
}
.bl-opt:hover, .bl-opt:disabled { background: var(--bl-chat); color: #fff; }
.bl-opt:disabled { opacity: .6; cursor: default; }
.bl-pcard {
  background: #fff; border: 1px solid #eee; border-radius: 10px;
  padding: 10px; margin-bottom: 10px; display: flex; gap: 10px;
}
.bl-pcard img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.bl-pcard .bl-pinfo { flex: 1; min-width: 0; }
.bl-pcard .bl-pname { font-size: 13px; font-weight: 600; color: #333; margin-bottom: 2px; }
.bl-pcard .bl-pprice { font-size: 13px; font-weight: 700; color: var(--bl-chat); margin-bottom: 2px; }
.bl-pcard .bl-preason { font-size: 12px; color: #666; margin-bottom: 6px; }
.bl-pcard .bl-pactions { display: flex; gap: 6px; }
.bl-pcard .bl-pactions a, .bl-pcard .bl-pactions button {
  font-size: 12px; padding: 5px 10px; border-radius: 14px; cursor: pointer; text-decoration: none;
}
.bl-btn-view { border: 1px solid #ddd; color: #555; background: #fff; }
.bl-btn-add { border: 1px solid var(--bl-chat); color: #fff; background: var(--bl-chat); border: none; }
.bl-btn-buy { border: none; color: #fff; background: #e4212a; font-weight: 600; }
.bl-lead-form input {
  width: 100%; border: 1px solid #ddd; border-radius: 8px;
  padding: 8px 10px; font-size: 13px; margin-bottom: 8px;
}
.bl-lead-form button {
  width: 100%; background: var(--bl-chat); color: #fff; border: none;
  border-radius: 8px; padding: 9px; font-size: 13.5px; cursor: pointer; font-weight: 600;
}
.bl-lead-err { color: #e4212a; font-size: 12px; margin-bottom: 8px; }
.bl-disclaimer { font-size: 11.5px; color: #999; margin: 6px 0 10px; }
.bl-chat-foot { padding: 8px 12px; border-top: 1px solid #eee; display: flex; gap: 8px; }
.bl-chat-foot button {
  flex: 1; border: 1px solid #eee; background: #fafafa; border-radius: 8px;
  font-size: 12.5px; padding: 7px 4px; cursor: pointer; color: #555;
}
.bl-typing { font-size: 12px; color: #999; padding: 2px 4px 8px; }
@media (max-width: 575px) {
  #bl-chat-win {
    right: 0; left: 0; bottom: 0; width: 100%; max-width: 100%;
    height: 92vh; max-height: 92vh; border-radius: 16px 16px 0 0;
  }
  #bl-chat-launcher { right: 14px; bottom: 14px; }
  /* Gộp cụm floating mobile: ẩn vòng hotline, dồn nút Zalo lên trên nút chat (góc phải) */
  .hotline-phone-ring-wrap { display: none !important; }
  .float-icon-hotline { left: auto !important; right: 18px !important; bottom: 88px !important; }
}
