/* Bingo Trợ giảng AI on flyer.vn/home-v6/ (02/11/2026). Ported 1:1 from the Bingo on giaovien.phongthiao.com
   (partner-web-demo BingoHelper/bingoHelper.module.css + Onboarding/BingoGuide/bingoGuide.module.css): porthole with the
   blue talking Rive Bingo, figure-8 hover with a star tail, fly-in once per session, gradient-ring bubble and panel.
   Landing-page differences: docks bottom-LEFT (Messenger / Zalo / phone / to-top own the bottom-right), and the panel
   lists the page's products instead of the app's screens. Every class starts with fb- (the page has its own CSS). */

.fb-root {
  position: fixed;
  left: 28px;
  bottom: 28px;
  z-index: 68; /* under the sticky header's menus (80) and the float buttons (69) */
  font-family: inherit;
  --bh-main: #955dcb;
  --bh-dark: #6b3e9a;
  --bh-darker: #4a2870;
  --bh-light: #d5c1ee;
  --bh-lighter: #f6ebff;
  --bh-on: #fff;
  --bh-ink: #5a3385;
  --bh-tint: #ede0f8;
  --bh-shadow: rgba(74, 40, 112, 0.26);
  --bh-on-soft: rgba(255, 255, 255, 0.16);
}
@media (max-width: 767px) {
  .fb-root { left: 12px; bottom: 16px; }
}
.fb-root *, .fb-root *::before, .fb-root *::after { box-sizing: border-box; }
.fb-root button, .fb-root input { font-family: inherit; }   /* not `font: inherit`: it would beat the sizes below */

/* ── the round porthole with the talking Rive Bingo (bingoGuide.module.css A) ── */
.fb-porthole {
  position: relative; display: block; width: 100%; height: 100%;
  border-radius: 9999px; padding: 5px;
  background: linear-gradient(160deg, #ffd56b 0%, #ff8fb1 45%, #8b5cf6 100%);
  box-shadow: 0 8px 0 rgba(43, 17, 102, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.85), 0 0 30px rgba(168, 120, 255, 0.5);
}
.fb-glass {
  position: relative; display: block; width: 100%; height: 100%;
  border-radius: 9999px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fff4fb 0%, #e9dcff 55%, #b99bff 100%);
}
.fb-glass canvas {
  pointer-events: none; position: absolute; inset: 0; width: 100% !important; height: 100% !important;
  transform: translateY(7%) scale(0.95);
}
.fb-talking { animation: fbTalkGlow 0.9s ease-in-out infinite; }
@keyframes fbTalkGlow {
  50% { box-shadow: 0 8px 0 rgba(43, 17, 102, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.95), 0 0 48px rgba(255, 196, 92, 0.85); }
}
.fb-still { display: block; width: 100%; height: 100%; object-fit: contain; transform: translateY(6%); }

/* ── the Bingo button: hover in a small figure 8 with a star tail ── */
.fb-btn {
  display: block; position: relative; z-index: 1; width: 80px; height: 80px;
  padding: 0; border: 0; background: transparent; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
@media (max-width: 767px) { .fb-btn { width: 58px; height: 58px; } .fb-btn .fb-porthole { padding: 3px; } }
.fb-btn:focus-visible { outline: 3px solid #ffd56b; outline-offset: 4px; border-radius: 9999px; }
.fb-dragging .fb-btn { cursor: grabbing; }
.fb-dragging .fb-hover { animation-play-state: paused; }
.fb-hopper, .fb-hover, .fb-dockbox { position: relative; display: block; width: 100%; height: 100%; }
.fb-hover { animation: fbHover 3.4s ease-in-out infinite; }
@keyframes fbHover {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(5px, -7px) rotate(4deg); }
  50% { transform: translate(0, -11px) rotate(0deg); }
  75% { transform: translate(-5px, -6px) rotate(-4deg); }
}
.fb-tail {
  position: absolute; right: 72%; top: 58%; width: 46px; height: 14px; pointer-events: none;
  background:
    radial-gradient(circle at 85% 50%, #fff 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 55% 30%, #ffe28a 0 2px, transparent 3px),
    radial-gradient(circle at 25% 70%, #ffc6e0 0 1.8px, transparent 2.8px);
  animation: fbTail 0.9s linear infinite;
}
@keyframes fbTail { from { transform: translateX(0); opacity: 0.95; } to { transform: translateX(-22px); opacity: 0; } }
.fb-hop { animation: fbHop 0.55s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes fbHop { 40% { transform: translateY(-18px) scale(1.06, 0.94); } 70% { transform: translateY(0) scale(0.96, 1.04); } }

/* first time in the session: the whole Bingo (cape) flies in across the page, then dives into the porthole.
   05/11 anh Tùng "bay từ góc 11am ra": he comes out of the top-left corner, swoops right over the hero and down to the
   bottom-left dock (was: from the right). The pink image faces right, so no flip. */
.fb-flyer {
  position: absolute; left: 50%; top: 50%; width: 150%; max-width: none; pointer-events: none; z-index: 2;
  animation: fbFlyAcross 1.9s cubic-bezier(0.22, 0.75, 0.25, 1) forwards;
  filter: drop-shadow(0 18px 18px rgba(30, 10, 80, 0.35));
}
@keyframes fbFlyAcross {   /* --x0/--y0 = the header logo, set by bingo.js fly(); the fallbacks = the top-left corner */
  0% { transform: translate(calc(-50% + var(--x0, -14vw)), calc(-50% + var(--y0, -96vh))) rotate(12deg) scale(0.36); opacity: 0; }
  6% { opacity: 1; }
  45% { transform: translate(calc(-50% + var(--x1, 22vw)), calc(-50% + var(--y1, -60vh))) rotate(14deg) scale(0.92); }
  80% { transform: translate(calc(-50% + var(--x2, 5vw)), calc(-50% + var(--y2, -14vh))) rotate(-6deg) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(0deg) scale(0.55); opacity: 0; }
}
.fb-trail {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffe28a 45%, rgba(255, 170, 90, 0) 70%);
  opacity: 0; pointer-events: none; z-index: 1;
  animation: fbTrail 1.9s cubic-bezier(0.22, 0.75, 0.25, 1) forwards;
}
@keyframes fbTrail {
  0% { transform: translate(var(--x0, -14vw), var(--y0, -96vh)) scale(0.4); opacity: 0; }
  20% { opacity: 0.9; }
  45% { transform: translate(var(--x1, 22vw), var(--y1, -60vh)) scale(1.2); opacity: 0.8; }
  85% { transform: translate(0, 0) scale(0.6); opacity: 0.4; }
  100% { transform: translate(0, 0) scale(0); opacity: 0; }
}
.fb-waiting .fb-dockbox { visibility: hidden; }
.fb-dock { animation: fbDock 0.6s cubic-bezier(0.3, 1.7, 0.45, 1) both; }
@keyframes fbDock { 0% { transform: scale(0.2); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.fb-burst {
  position: absolute; inset: -18%; border-radius: 50%; border: 4px solid rgba(255, 226, 138, 0.9); pointer-events: none;
  animation: fbBurst 0.7s ease-out forwards;
}
@keyframes fbBurst { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* "Tắt": flies up and away */
.fb-leaving .fb-hover { animation: fbLeave 0.65s cubic-bezier(0.5, 0, 0.75, 0) forwards; }
@keyframes fbLeave {   /* back into the header logo (--lx/--ly from bingo.js turnOff) */
  88% { opacity: 1; }
  to { transform: translate(var(--lx, -30vw), var(--ly, -60vh)) rotate(-25deg) scale(0.35); opacity: 0; }
}

/* ── bubble (hello, section line) and panel; open toward the side with room ── */
.fb-tip {
  position: absolute; bottom: calc(100% + 10px); left: 0; width: min(300px, calc(100vw - 32px));
  animation: fbPop 0.35s cubic-bezier(0.3, 1.5, 0.5, 1) both; transform-origin: bottom left;
}
.fb-panel {
  position: absolute; bottom: calc(100% + 12px); left: 0; width: 360px;
  max-height: min(560px, calc(100vh - 160px)); display: flex; flex-direction: column; z-index: 3;
  animation: fbPop 0.3s cubic-bezier(0.3, 1.4, 0.5, 1) both; transform-origin: bottom left;
}
.fb-r .fb-tip, .fb-r .fb-panel { left: auto; right: 0; transform-origin: bottom right; }
.fb-below .fb-tip, .fb-below .fb-panel { bottom: auto; top: calc(100% + 12px); }
@keyframes fbPop { from { transform: scale(0.85) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 767px) {
  .fb-panel { position: fixed; left: 8px !important; right: 8px !important; top: auto !important; bottom: 8px !important; width: auto; max-height: min(72vh, 560px); }
}

/* gradient ring (yellow–pink–purple, like the porthole) */
.fb-ring {
  border: 2.5px solid transparent;
  background: linear-gradient(var(--bh-lighter), var(--bh-lighter)) padding-box,
              linear-gradient(135deg, #ffd56b 0%, #ff8fb1 45%, #8b5cf6 100%) border-box;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 18px 44px var(--bh-shadow), 0 0 26px rgba(168, 120, 255, 0.32);
}
.fb-ring-white {
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #ffd56b 0%, #ff8fb1 45%, #8b5cf6 100%) border-box;
}
.fb-bubble {
  display: block; width: 100%; margin: 0; padding: 10px 12px; border-radius: 18px; cursor: pointer; text-align: left;
  font-size: 13.5px; font-weight: 600; line-height: 1.45; color: #212b36;
}
.fb-bubble-title { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 700; color: var(--bh-ink); }
.fb-bubble-coach { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #eaddfb; font-size: 12.5px; font-weight: 700; color: var(--bh-ink); }
.fb-listen {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; padding: 3px 10px; border-radius: 9999px;
  background: var(--bh-main); color: #fff; font-size: 12px; font-weight: 700;
}

/* first time: show that Bingo can be clicked */
.fb-coach {
  width: max-content; max-width: min(260px, calc(100vw - 32px)); padding: 8px 12px; border-radius: 14px; color: #212b36;
  font-size: 13.5px; font-weight: 700; line-height: 1.4; text-align: left; cursor: pointer;
  animation: fbPop 0.35s cubic-bezier(0.3, 1.5, 0.5, 1) both, fbNudge 2.4s 0.6s ease-in-out infinite;
}
@keyframes fbNudge { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-5px); } 90% { transform: translateY(0); } }
.fb-ripple {
  position: absolute; inset: -10px; border: 3px solid #ffc83d; border-radius: 9999px; pointer-events: none;
  animation: fbRipple 1.8s ease-out infinite;
}
.fb-ripple + .fb-ripple { animation-delay: 0.9s; }
@keyframes fbRipple { from { transform: scale(0.85); opacity: 0.9; } to { transform: scale(1.35); opacity: 0; } }
.fb-hand {
  position: absolute; right: -14px; bottom: -16px; z-index: 4; font-size: 32px; line-height: 1; pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25)); animation: fbTap 1.2s ease-in-out infinite;
}
@keyframes fbTap { 0%, 100% { transform: translate(0, 0) rotate(24deg) scaleX(-1); } 50% { transform: translate(-7px, -9px) rotate(24deg) scaleX(-1) scale(0.9); } }

/* "Tắt" under Bingo on hover (mouse only), as on giaovien */
.fb-offpill {
  position: absolute; left: 50%; top: calc(100% + 6px); z-index: 2; transform: translateX(-50%);
  padding: 3px 12px; border: 0; border-radius: 9999px; background: #212b36; color: #fff;
  font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0s linear 0.25s;
}
.fb-root:hover .fb-offpill, .fb-offpill:focus-visible { opacity: 1; visibility: visible; transition: opacity 0.15s, visibility 0s; }
.fb-offpill:focus-visible { outline: 3px solid #ffd56b; outline-offset: 2px; }
@media (hover: none) { .fb-offpill { display: none; } }
.fb-open .fb-offpill { display: none; }
.fb-root.fb-open { z-index: 75; }   /* open panel above the float buttons (69) and the sticky header (60) */
@media (max-width: 767px) { .fb-offpill { display: none; } }

/* ── panel ── */
.fb-face { position: absolute; left: 50%; top: -34px; z-index: 5; width: 76px; height: 76px; transform: translateX(-50%); pointer-events: none; }
.fb-face .fb-porthole { padding: 4px; }
/* 05/11 anh Tùng "trên mobile phone đang bị thiếu mất avatar Bingo": the face sits on the phone's bottom sheet too (smaller) */
@media (max-width: 767px) {   /* top-left of the sheet, like a chat avatar next to his name (centred, it hid the flag on a 320 px phone) */
  .fb-face { left: 8px; top: -32px; width: 60px; height: 60px; transform: none; }
}
.fb-sheet { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-radius: 22px; }
.fb-bar {
  position: relative; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 12px; user-select: none;
  background: linear-gradient(to right, var(--bh-dark), var(--bh-main)); color: var(--bh-on);
}
.fb-bar-title { margin-right: auto; min-width: 0; max-width: calc(50% - 34px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 800; line-height: 1.2; }
@media (max-width: 767px) { .fb-bar-title { max-width: none; margin-left: 58px; } .fb-in-call .fb-bar-title { margin-left: 0; } }   /* clear of the face */
.fb-ic {
  display: flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 9999px; background: transparent; color: var(--bh-on); opacity: 0.9; cursor: pointer; font-size: 18px; line-height: 1;
}
.fb-ic:hover { background: var(--bh-on-soft); }
.fb-ic:focus-visible { outline: 2px solid #ffd56b; outline-offset: 1px; }
.fb-body { display: flex; flex: 1; flex-direction: column; gap: 8px; min-height: 0; padding: 12px; overflow-y: auto; }
.fb-here { padding: 12px; border: 1px solid var(--bh-light); border-radius: 16px; background: #fff; }
.fb-here p { margin: 0; }
.fb-here-where { font-size: 13px; line-height: 1.35; color: #454f5b; }
.fb-here-where b { color: var(--bh-ink); }
.fb-here-tip { margin-top: 6px !important; font-size: 13.5px; line-height: 1.5; color: #212b36; }
.fb-here-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fb-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--bh-light); border-radius: 9999px;
  background: var(--bh-lighter); color: var(--bh-ink); font-size: 12px; font-weight: 700; line-height: 1.5; cursor: pointer; text-decoration: none;
}
.fb-pill:hover { background: var(--bh-tint); }
.fb-msg { max-width: 88%; padding: 8px 12px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; }
.fb-msg-bingo { align-self: flex-start; border-bottom-left-radius: 6px; background: #fff; color: #212b36; box-shadow: 0 1px 0 var(--bh-shadow); }
.fb-msg-user { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--bh-main); color: var(--bh-on); }
.fb-msg .fb-go {
  display: block; margin-top: 6px; padding: 4px 12px; border: 0; border-radius: 9999px; background: var(--bh-main); color: var(--bh-on);
  font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; width: max-content;
}
.fb-typing { display: inline-flex; gap: 4px; }
.fb-typing i { width: 7px; height: 7px; border-radius: 50%; background: #c4a6e3; animation: fbDot 1s infinite; }
.fb-typing i:nth-child(2) { animation-delay: 0.15s; }
.fb-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes fbDot { 50% { transform: translateY(-4px); opacity: 0.5; } }
.fb-see { margin: 0; padding: 8px 12px 0; background: #fff; font-size: 12.5px; font-weight: 600; color: #637381; }
.fb-chips {
  display: flex; gap: 6px; padding: 6px 24px 0 12px; overflow-x: auto; background: #fff;
  scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.fb-chips::-webkit-scrollbar { display: none; }
.fb-chip {
  flex: none; padding: 4px 10px; border: 1px solid var(--bh-light); border-radius: 9999px; background: #fff; color: var(--bh-ink);
  font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.fb-chip:hover, .fb-chip.on { background: var(--bh-tint); }
.fb-form { display: flex; align-items: center; gap: 8px; padding: 8px 12px 12px; background: #fff; }
.fb-input {
  flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--bh-light); border-radius: 9999px; background: #fff;
  font: inherit; font-size: 14px; color: #212b36; outline: none;
}
.fb-input:focus { border-color: var(--bh-main); }
.fb-send {
  display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0;
  border-radius: 9999px; background: var(--bh-main); color: var(--bh-on); cursor: pointer;
}
.fb-send:disabled { opacity: 0.4; cursor: default; }

/* resize handle on the panel corner away from Bingo (giaovien .panelGrip) */
.fb-pgrip {
  position: absolute; z-index: 6; top: -9px; right: -9px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: 1.5px solid #e1d5f5; border-radius: 9999px; background: #fff; color: #6a309b;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.18); touch-action: none; cursor: nesw-resize;
}
.fb-pgrip:hover { background: #f6f2fa; }
.fb-pgrip:focus-visible { outline: 3px solid #ffd56b; outline-offset: 1px; }
.fb-r .fb-pgrip { right: auto; left: -9px; cursor: nwse-resize; }
.fb-below .fb-pgrip { top: auto; bottom: -9px; cursor: nwse-resize; }
.fb-r.fb-below .fb-pgrip { cursor: nesw-resize; }
.fb-sized .fb-sheet { flex: 1; }
@media (max-width: 767px) { .fb-pgrip { display: none; } }

/* "Đã tắt Bingo · Hoàn tác" */
.fb-note {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px;
  background: #212b36; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  animation: fbPop 0.3s ease both;
}
.fb-note button { padding: 0; border: 0; background: none; color: #ffd56b; font: inherit; font-weight: 800; cursor: pointer; }

/* ── 05/11: "Gọi Bingo · Đặt lịch tư vấn · Thanh toán" ── */
.fb-acts { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 6px; padding: 8px 10px; background: #fff; border-bottom: 1px solid #f0e6fb; }
.fb-act {
  display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; padding: 6px 8px;
  border: 1px solid var(--bh-light); border-radius: 12px; background: var(--bh-lighter); color: var(--bh-ink);
  font-size: 12.5px; font-weight: 800; line-height: 1.2; text-align: center; cursor: pointer;
}
.fb-act:hover { background: var(--bh-tint); }
.fb-act:focus-visible, .fb-cbtn:focus-visible, .fb-call-face:focus-visible { outline: 3px solid #ffd56b; outline-offset: 2px; }
.fb-act-call { border: 0; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 4px 12px rgba(22, 163, 74, 0.32); }
.fb-act-call:hover { background: linear-gradient(135deg, #16a34a, #15803d); }
/* 05/11: no ElevenLabs voice on the Worker → no call button (Bingo never speaks in another voice) */
.fb-acts.fb-novoice { grid-template-columns: 1fr 1fr; }
.fb-acts.fb-novoice .fb-act-call { display: none; }
.fb-act-call svg { flex: none; animation: fbRing 2.4s ease-in-out infinite; }
@keyframes fbRing { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-16deg); } 82% { transform: rotate(14deg); } 88% { transform: rotate(-10deg); } 94% { transform: rotate(6deg); } }
@media (max-width: 380px) { .fb-act { font-size: 11.5px; padding: 6px 4px; } }

/* cards under an answer: plans → official checkout, QR, Zalo / consult form, hotlines */
.fb-card { margin-top: 8px; padding: 10px; border: 1px solid var(--bh-light); border-radius: 14px; background: var(--bh-lighter); }
.fb-card-t { margin-bottom: 6px; font-size: 13px; font-weight: 800; color: var(--bh-ink); }
.fb-plans { display: grid; gap: 6px; }
.fb-plan {
  position: relative; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; padding: 8px 10px;
  border: 1px solid var(--bh-light); border-radius: 12px; background: #fff; color: #212b36; text-decoration: none;
}
.fb-plan:hover { border-color: var(--bh-main); }
.fb-plan b { font-size: 13px; color: var(--bh-ink); }
.fb-plan-p { font-size: 15px; font-weight: 800; color: #212b36; text-align: right; }
.fb-plan-s { grid-column: 1 / -1; font-size: 11.5px; color: #637381; }
.fb-plan-go { grid-column: 1 / -1; justify-self: start; margin-top: 4px; padding: 2px 10px; border-radius: 9999px; background: var(--bh-main); color: #fff; font-size: 11.5px; font-weight: 800; }
.fb-plan-best { border-color: #f5b83d; box-shadow: 0 0 0 2px rgba(245, 184, 61, 0.25); }
.fb-plan-best::after {
  content: 'Tiết kiệm nhất'; position: absolute; top: -8px; right: 10px; padding: 1px 8px; border-radius: 9999px;
  background: #f5b83d; color: #3d2600; font-size: 10.5px; font-weight: 800;
}
.fb-steps { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.5; color: #454f5b; }
.fb-steps li + li { margin-top: 2px; }
.fb-card-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fb-card .fb-pill { background: #fff; }
.fb-card .fb-pill-main { border-color: transparent; background: var(--bh-main); color: #fff; }
.fb-card .fb-pill-main:hover { background: var(--bh-dark); }
.fb-card-b2b { display: block; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--bh-ink); text-decoration: underline; text-underline-offset: 2px; }
.fb-msg-bingo:has(.fb-card) { max-width: 96%; }

/* the call screen (replaces the action row, "Bạn đang xem" and the chips; the transcript stays below) */
.fb-call { display: none; }
.fb-in-call .fb-call {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 12px 10px;
  background: radial-gradient(circle at 50% 30%, #fff 0%, var(--bh-lighter) 70%); border-bottom: 1px solid #f0e6fb;
}
.fb-in-call .fb-acts, .fb-in-call .fb-here, .fb-in-call .fb-see, .fb-in-call .fb-chips, .fb-in-call .fb-form,
.fb-in-call .fb-face, .fb-in-call .fb-ic[data-a="mute"] { display: none; }
.fb-in-call .fb-body { background: #faf7fe; min-height: 90px; }
.fb-call-face { position: relative; width: 108px; height: 108px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.fb-call-face::before {
  content: ''; position: absolute; inset: -8px; border-radius: 50%; background: rgba(34, 197, 94, 0.28);
  transform: scale(calc(0.9 + var(--lvl, 0) * 0.35)); opacity: 0; transition: transform 0.08s linear, opacity 0.2s;
}
.fb-call[data-state="listening"] .fb-call-face::before { opacity: 1; }
.fb-call-face .fb-porthole { position: relative; }
@media (max-width: 767px) { .fb-call-face { width: 92px; height: 92px; } .fb-in-call .fb-call { padding-top: 12px; } }
.fb-call-status { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 20px; margin: 0; font-size: 13.5px; font-weight: 700; color: var(--bh-ink); text-align: center; }
.fb-live { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); animation: fbLive 1.4s infinite; }
@keyframes fbLive { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.fb-in-call .fb-bar-title { max-width: none; }
.fb-call-ctl { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; width: 100%; }
.fb-call-ctl [data-c="mic"] { justify-self: end; }
.fb-call-ctl [data-c="cut"] { justify-self: start; }
.fb-cbtn {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--bh-light); border-radius: 50%; background: #fff; color: var(--bh-ink); cursor: pointer;
}
.fb-cbtn[aria-pressed="true"] { border-color: #fecaca; background: #fee2e2; color: #b91c1c; }
.fb-cbtn-end { width: 54px; height: 54px; border: 0; background: #ef4444; color: #fff; box-shadow: 0 6px 16px rgba(239, 68, 68, 0.38); }
.fb-cbtn-end:hover { background: #dc2626; }
.fb-cbtn-cut { width: auto; padding: 0 14px; border-radius: 9999px; font-size: 12.5px; font-weight: 800; visibility: hidden; }
.fb-call[data-state="speaking"] .fb-cbtn-cut { visibility: visible; }
.fb-call-note { margin: 0; font-size: 11px; line-height: 1.4; color: #919eab; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .fb-act-call svg, .fb-live { animation: none; }
  .fb-hover, .fb-tail, .fb-typing i, .fb-coach, .fb-ripple, .fb-hand, .fb-talking { animation: none; }
  .fb-flyer, .fb-trail, .fb-hop, .fb-tip, .fb-panel, .fb-dock, .fb-burst { animation-duration: 0.01s; }
}

/* ── 05/11 (2) ── one button left in the row (Gọi Bingo; Đặt lịch tư vấn / Thanh toán off, bingo.js GUIDE) */
.fb-acts.fb-solo { grid-template-columns: 1fr; }
.fb-acts.fb-solo.fb-novoice { display: none; }
/* drag the open panel by Bingo's face or the title bar (desktop; phones get the bottom sheet) */
@media (min-width: 768px) {
  .fb-face { pointer-events: auto; cursor: grab; touch-action: none; }
  .fb-bar { cursor: grab; touch-action: none; }
  .fb-dragging .fb-face, .fb-dragging .fb-bar { cursor: grabbing; }
}
/* Bingo's language: a flag button in the bar, the menu = the site's language menu (flag, native name, check) */
.fb-langbox { position: relative; flex: none; }
.fb-lang { padding: 0; }
.fb-lang img, .fb-langopt img { display: block; width: 18px; height: 13.5px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85); flex: none; }
.fb-langopt img { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }
.fb-langmenu {
  position: absolute; top: calc(100% + 8px); right: -40px; z-index: 10; min-width: 184px; max-height: min(330px, 60vh); margin: 0; padding: 6px;
  overflow-y: auto; list-style: none; border-radius: 14px; background: #fff; box-shadow: 0 14px 34px rgba(33, 43, 54, 0.2), 0 0 0 1px rgba(33, 43, 54, 0.06);
  animation: fbPop 0.18s ease-out both; transform-origin: top right; cursor: default;
}
.fb-langopt {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent;
  color: #212b36; font: inherit; font-size: 14px; font-weight: 500; line-height: 1.3; text-align: left; cursor: pointer;
}
.fb-langopt:hover, .fb-langopt:focus-visible { background: var(--bh-tint); outline: none; }
.fb-langopt.on { font-weight: 700; }
.fb-langopt svg { margin-left: auto; color: var(--bh-main); flex: none; }
.fb-in-call .fb-langbox { display: none; }
@media (max-width: 767px) { .fb-langmenu { right: -72px; } }
/* longer titles in other languages ("Bingo AI Teaching Assistant"): two lines in the bar instead of "Bingo AI Teachin…" */
.fb-bar-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.15; }

/* ── 05/11 (3) phone UX (anh Tùng: "trên mobile chưa có nút tắt, và hơi to") ── */
/* × on every bubble / hint: closes it, Bingo stays quiet for the visit (bingo.js hush) */
.fb-x {
  position: absolute; top: -9px; right: -9px; z-index: 2; display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0; border: 2px solid #fff; border-radius: 9999px; background: #454f5b; color: #fff;
  cursor: pointer; box-shadow: 0 3px 8px rgba(33, 43, 54, 0.3); animation: fbPop 0.35s 0.15s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
.fb-x::before { content: ''; position: absolute; inset: -9px; }   /* 44 px to tap */
.fb-x:hover { background: #212b36; }
.fb-x:focus-visible { outline: 3px solid #ffd56b; outline-offset: 2px; }
.fb-tip-fit { width: max-content; max-width: min(260px, calc(100vw - 32px)); }
.fb-tip-fit .fb-coach { max-width: none; }
/* drag Bingo onto the × at the bottom = off (chat-head pattern) */
.fb-root.fb-dragging { z-index: 77; }
.fb-drop {
  position: fixed; left: 50%; bottom: 26px; z-index: 76; display: flex; flex-direction: column; align-items: center; gap: 8px;
  transform: translateX(-50%); pointer-events: none; font-family: inherit; animation: fbDropIn 0.2s ease-out both;
}
.fb-drop-label { padding: 4px 11px; border-radius: 9999px; background: rgba(33, 43, 54, 0.85); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.fb-drop-x {
  display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 9999px; background: rgba(33, 43, 54, 0.82); color: #fff; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}
.fb-drop.fb-hot .fb-drop-x { transform: scale(1.25); background: #e5484d; }
@keyframes fbDropIn { from { opacity: 0; transform: translate(-50%, 18px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 767px) {
  .fb-btn { width: 50px; height: 50px; }
  /* compact bubble: no title, 3 lines, clear of the float buttons on the right */
  .fb-tip { width: min(250px, calc(100vw - 108px)); bottom: calc(100% + 8px); }
  .fb-bubble { padding: 8px 12px; border-radius: 16px; font-size: 12.5px; line-height: 1.42; }
  .fb-bubble-title, .fb-bubble-coach { display: none; }
  .fb-bubble-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .fb-coach { padding: 7px 11px; font-size: 12.5px; }
  .fb-hand { font-size: 26px; right: -10px; bottom: -12px; }
}
@media (prefers-reduced-motion: reduce) { .fb-x, .fb-drop { animation: none; } }

/* ── 05/11 (5) sound on phones: until the first tap anywhere, a pulsing speaker on Bingo says "tap to hear me" ── */
.fb-sound {
  position: absolute; top: -4px; right: -6px; z-index: 3; display: none; align-items: center; justify-content: center;
  width: 24px; height: 24px; border: 2px solid #fff; border-radius: 9999px; background: #e5484d; color: #fff;
  box-shadow: 0 3px 8px rgba(33, 43, 54, 0.3); pointer-events: none; animation: fbSnd 1.4s ease-in-out infinite;
}
.fb-sound svg { width: 13px; height: 13px; }
.fb-locked .fb-sound { display: flex; }
.fb-open .fb-sound, .fb-dragging .fb-sound { display: none; }
@keyframes fbSnd { 50% { transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .fb-sound { animation: none; } }
/* the scroll flight moves the whole Bingo (root) and leans the button: no transition, the spring is in bingo.js */
.fb-btn { transform-origin: 50% 60%; }

/* ── 05/11 (7) the header logo is the pink Bingo: hidden while he is out on the page, pops back when he is turned off ── */
.brand img { transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.fb-out .brand img { opacity: 0; transform: scale(0.4) rotate(-14deg); }
@media (prefers-reduced-motion: reduce) { .brand img { transition: none; } }
