/* =====================================================================
   Air Divine — Divu কথা বলার সময় মুখ নাড়ানো + 🔊 বাটন (r28)
   ===================================================================== */

/* মুখ: অডিওর শব্দ যত জোরে, মুখ তত খোলে (--dv-mouth 0..1) */
.bot-avatar.dv-talking .mouth-idle {
  opacity: 1 !important;
  animation: none !important;
  transform-box: fill-box !important;
  transform-origin: 50% 20% !important;
  transform: scale(calc(1 - var(--dv-mouth, 0) * .18), calc(1 + var(--dv-mouth, 0) * 2.2)) !important;
  transition: transform .06s linear;
}
.bot-avatar.dv-talking .mouth-grin,
.bot-avatar.dv-talking .mouth-laugh,
.bot-avatar.dv-talking .tongue { opacity: 0 !important; }

/* ব্রাউজারের ভয়েসে শব্দ মাপা যায় না — তখন ছন্দে মুখ নাড়ে */
.bot-avatar.dv-talking.dv-synth .mouth-idle { animation: dvTalk .32s ease-in-out infinite alternate !important; transform: none; }
@keyframes dvTalk {
  0% { transform: scale(1, 1); }
  45% { transform: scale(.9, 2.3); }
  100% { transform: scale(.96, 1.4); }
}

/* কথা বলার সময় চারপাশে নরম ঢেউ */
.bot-avatar.dv-talking .bot-halo { animation: dvHalo 1.1s ease-out infinite !important; }
@keyframes dvHalo {
  0% { box-shadow: 0 0 0 0 rgba(209, 161, 61, .35); }
  100% { box-shadow: 0 0 0 22px rgba(209, 161, 61, 0); }
}
.aiw .aiw__face.dv-talking { box-shadow: 0 0 0 1px #e3d6bd, 0 0 0 calc(3px + var(--dv-mouth, 0) * 6px) rgba(209, 161, 61, .28); transition: box-shadow .08s linear; }

/* ---------- 🔊 বাটন ---------- */
.dvv-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-grid; place-items: center; flex: none;
  border: 1px solid #e8dcc4; background: #fff; color: #730522;
  cursor: pointer; padding: 0;
  box-shadow: 0 4px 14px -8px rgba(46, 2, 16, .45);
  transition: transform .15s, background .2s, color .2s, border-color .2s;
}
.dvv-btn:hover { transform: translateY(-1px); background: #fbf4e4; }
.dvv-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dvv-btn svg path:first-child { fill: currentColor; stroke: none; }
.dvv-btn.is-off { color: #a3969a; background: #f7f3f4; }
.dvv-btn.is-live { background: #730522; color: #fff; border-color: #730522; }
.dvv-btn.is-live .w1 { animation: dvWave 1s ease-in-out infinite; }
.dvv-btn.is-live .w2 { animation: dvWave 1s .18s ease-in-out infinite; }
@keyframes dvWave { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* হিরোতে: Divu-র বাবলের পাশে */
.dvv-host { position: relative; }
.dvv-btn--hero { position: absolute; right: -46px; top: 50%; margin-top: -17px; z-index: 5; width: 34px; height: 34px; }
@media (max-width: 640px) { .dvv-btn--hero { right: auto; left: 100%; margin-left: 8px; } }
.dvv-btn--hero svg { width: 17px; height: 17px; }

/* AI উইন্ডোর হেডারে, বন্ধ বাটনের পাশে */
.aiw .aiw__brand .dvv-btn--ai { margin-left: 6px; width: 34px; height: 34px; align-self: center; }
.aiw .aiw__brand .dvv-btn--ai svg { width: 17px; height: 17px; }

/* ছোট নোটিস */
.dvv-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10000;
  background: #2e0210; color: #fff8ea; padding: 11px 18px; border-radius: 12px;
  font: 500 14px/1.4 "Hind Siliguri", system-ui, sans-serif; max-width: calc(100vw - 32px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5);
  animation: dvToast .25s ease-out;
}
.dvv-toast.is-out { opacity: 0; transition: opacity .4s; }
@keyframes dvToast { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (prefers-reduced-motion: reduce) {
  .bot-avatar.dv-talking .bot-halo { animation: none !important; }
}
