/* ==========================================================================
   Havin — Professional Chat Widget UI
   Brand: navy #101b38 · wine #852536 · gold #dab369
   ========================================================================== */
:root {
  --bb-ai-offset-bottom: 42px;
  --bb-ai-offset-side: 12px;
  --bb-ai-dock-size: 76px;
  --bb-ai-z: 10000050;
  --hv-navy: #101b38;
  --hv-navy-2: #1c2b54;
  --hv-wine: #852536;
  --hv-gold: #dab369;
  --hv-gold-2: #b89243;
  --hv-cream: #fcf7ed;
  --hv-radius: 20px;
  --hv-shadow: 0 24px 64px rgba(16, 27, 56, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

/* --- Widget shell --- */
.havin-widget.bb-ai-widget {
  position: fixed;
  inset-inline-start: var(--bb-ai-offset-side);
  bottom: calc(var(--bb-ai-offset-bottom) + env(safe-area-inset-bottom, 0px));
  z-index: var(--bb-ai-z);
  width: var(--bb-ai-dock-size);
  pointer-events: none;
  font-family: var(--font-family, 'Vazirmatn', Tahoma, sans-serif);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* --- Dock --- */
.bb-ai-dock {
  position: relative;
  width: var(--bb-ai-dock-size);
  height: var(--bb-ai-dock-size);
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  animation: hvBob 3.4s ease-in-out infinite;
  transition: transform 0.25s ease;
}

.bb-ai-dock:hover { transform: scale(1.06); }
.havin-widget.is-open .bb-ai-dock { animation-play-state: paused; transform: scale(0.94); }

.bb-ai-dock-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--hv-gold), var(--hv-navy), var(--hv-wine), var(--hv-gold));
  z-index: 0;
}

.bb-ai-dock-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(218, 179, 105, 0.4) 0%, transparent 68%);
  filter: blur(6px);
  pointer-events: none;
}

.bb-ai-dock-media {
  position: absolute;
  inset: 3px;
  z-index: 1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #fff, var(--hv-cream));
  box-shadow: 0 10px 24px rgba(16, 27, 56, 0.25);
}

.havin-dock-stage {
  isolation: isolate;
}

.havin-dock-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  z-index: 1;
  transform: scale(1.04);
  animation: hvFaceFloat 4.2s ease-in-out infinite;
}

.havin-dock-books {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.havin-mini-book {
  position: absolute;
  width: 14px;
  height: 18px;
  border-radius: 2px 3px 3px 2px;
  box-shadow: 0 3px 8px rgba(16, 27, 56, 0.35);
  transform-origin: center bottom;
}

.havin-mini-book::before {
  content: '';
  position: absolute;
  inset: 2px 2px 2px auto;
  width: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.55);
}

.havin-mini-book--a {
  right: 10%;
  top: 18%;
  background: linear-gradient(160deg, #0284c7, #0b1d3a);
  animation: hvBookOrbitA 3.6s ease-in-out infinite;
}

.havin-mini-book--b {
  left: 8%;
  bottom: 22%;
  width: 12px;
  height: 16px;
  background: linear-gradient(160deg, #dab369, #852536);
  animation: hvBookOrbitB 4.1s ease-in-out infinite;
}

.havin-mini-book--c {
  left: 42%;
  top: 8%;
  width: 11px;
  height: 14px;
  background: linear-gradient(160deg, #38bdf8, #0369a1);
  animation: hvBookOrbitC 3.2s ease-in-out infinite;
}

.havin-page-flip {
  position: absolute;
  width: 18px;
  height: 22px;
  right: 22%;
  bottom: 14%;
  background: linear-gradient(90deg, #f8fafc 0%, #e2e8f0 48%, #fff 52%, #f1f5f9 100%);
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(11, 29, 58, 0.28);
  transform-origin: left center;
  animation: hvPageFlip 2.8s ease-in-out infinite;
}

.havin-sparkle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, #dab369 0%, transparent 70%);
  box-shadow: 0 0 8px rgba(218, 179, 105, 0.9);
  animation: hvSpark 2.4s ease-in-out infinite;
}

.havin-sparkle--1 { top: 16%; left: 28%; animation-delay: 0s; }
.havin-sparkle--2 { top: 30%; right: 18%; animation-delay: 0.6s; }
.havin-sparkle--3 { bottom: 28%; left: 20%; animation-delay: 1.1s; }

@keyframes hvFaceFloat {
  0%, 100% { transform: scale(1.04) translateY(0); }
  50% { transform: scale(1.07) translateY(-1px); }
}

@keyframes hvBookOrbitA {
  0%, 100% { transform: translateY(0) rotate(-8deg); opacity: 0.95; }
  50% { transform: translateY(-7px) rotate(10deg); opacity: 1; }
}

@keyframes hvBookOrbitB {
  0%, 100% { transform: translateY(0) rotate(12deg); }
  50% { transform: translateY(-6px) rotate(-6deg); }
}

@keyframes hvBookOrbitC {
  0%, 100% { transform: translateY(0) rotate(-4deg) scale(0.95); }
  50% { transform: translateY(-8px) rotate(8deg) scale(1.05); }
}

@keyframes hvPageFlip {
  0%, 100% { transform: perspective(80px) rotateY(0deg); }
  45% { transform: perspective(80px) rotateY(-68deg); }
  55% { transform: perspective(80px) rotateY(-68deg); }
}

@keyframes hvSpark {
  0%, 100% { opacity: 0.15; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1.25); }
}

.havin-widget.is-open .havin-dock-face,
.havin-widget.is-open .havin-mini-book,
.havin-widget.is-open .havin-page-flip,
.havin-widget.is-open .havin-sparkle {
  animation-play-state: paused;
}

.bb-ai-dock-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.22);
}

.bb-ai-dock-badge {
  position: absolute;
  inset-inline-end: -2px;
  bottom: 2px;
  z-index: 4;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 2px 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--hv-navy), var(--hv-navy-2));
  color: var(--hv-gold);
  border: 1.5px solid rgba(218, 179, 105, 0.75);
}

.bb-ai-dock-label {
  pointer-events: none;
  font-size: 9px;
  font-weight: 800;
  color: var(--hv-navy);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(218, 179, 105, 0.45);
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(16, 27, 56, 0.08);
  white-space: nowrap;
}

/* --- Chat panel --- */
.havin-chat {
  position: absolute;
  inset-inline-start: 0;
  bottom: calc(var(--bb-ai-dock-size) + 28px);
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  border-radius: var(--hv-radius);
  background: #fff;
  box-shadow: var(--hv-shadow);
  pointer-events: auto;
  overflow: hidden;
  animation: hvPanelIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.havin-chat[hidden] { display: none !important; }

.havin-chat::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(218, 179, 105, 0.6), rgba(16, 27, 56, 0.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* --- Header --- */
.havin-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--hv-navy) 0%, var(--hv-navy-2) 55%, #243666 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.havin-chat-head::after {
  content: '';
  position: absolute;
  inset-inline-end: -30px;
  top: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(218, 179, 105, 0.2), transparent 70%);
  pointer-events: none;
}

.havin-chat-head__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.havin-chat-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(218, 179, 105, 0.65);
  background: var(--hv-cream);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--hv-navy);
}

.havin-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.havin-chat-avatar__dot {
  position: absolute;
  inset-inline-end: 1px;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--hv-navy);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

.havin-chat-head-info strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: var(--hv-gold);
  line-height: 1.3;
}

.havin-chat-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  opacity: 0.9;
  margin-top: 2px;
}

.havin-chat-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: hvPulse 2s ease infinite;
}

.havin-chat-sub {
  display: block;
  font-size: 10px;
  opacity: 0.7;
  margin-top: 1px;
}

.havin-chat-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
  z-index: 1;
}

.havin-chat-close:hover { background: rgba(255, 255, 255, 0.2); }

/* --- Identify --- */
.havin-identify {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.havin-identify-hero {
  text-align: center;
  margin-bottom: 20px;
}

.havin-identify-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--hv-gold), var(--hv-gold-2));
  color: var(--hv-navy);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(218, 179, 105, 0.35);
}

.havin-identify-hero h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 900;
  color: var(--hv-navy);
}

.havin-identify-hero p {
  margin: 0;
  font-size: 12px;
  line-height: 1.75;
  color: #64748b;
}

.havin-identify-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.havin-field--full { grid-column: 1 / -1; }

.havin-field span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
}

.havin-field span i { color: var(--hv-wine); font-size: 10px; }

.havin-field input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.havin-field input:focus {
  outline: none;
  border-color: var(--hv-gold);
  box-shadow: 0 0 0 3px rgba(218, 179, 105, 0.25);
}

.havin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}

.havin-btn--primary {
  background: linear-gradient(135deg, var(--hv-navy), var(--hv-navy-2));
  color: var(--hv-gold);
  box-shadow: 0 8px 20px rgba(16, 27, 56, 0.25);
}

.havin-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(16, 27, 56, 0.3);
}

.havin-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.havin-identify.is-loading .havin-btn--primary {
  pointer-events: none;
}

.havin-identify-error {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12px;
  line-height: 1.5;
}

.havin-identify-error[hidden] { display: none; }

/* --- Messages --- */
.havin-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(218, 179, 105, 0.06), transparent 40%),
    linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  scroll-behavior: smooth;
}

.havin-messages[hidden] { display: none !important; }

.havin-msg {
  display: flex;
  gap: 8px;
  max-width: 92%;
  animation: hvMsgIn 0.28s ease;
}

.havin-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.havin-msg--assistant { align-self: flex-start; }

.havin-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  margin-top: 2px;
}

.havin-msg--assistant .havin-msg-avatar {
  background: linear-gradient(135deg, var(--hv-gold), var(--hv-gold-2));
  color: var(--hv-navy);
  border: 1px solid rgba(218, 179, 105, 0.5);
}

.havin-msg--user .havin-msg-avatar {
  background: var(--hv-navy);
  color: var(--hv-gold);
}

.havin-msg-body { min-width: 0; }

.havin-msg-bubble {
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.havin-msg-bubble--html {
  white-space: normal;
}

.havin-msg-bubble--html p {
  margin: 0 0 0.55em;
}

.havin-msg-bubble--html p:last-child {
  margin-bottom: 0;
}

.havin-msg-bubble--html ul,
.havin-msg-bubble--html ol {
  margin: 0.35em 0 0.55em;
  padding-inline-start: 1.15em;
}

.havin-msg-bubble--html li {
  margin: 0.2em 0;
}

.havin-msg-bubble--html strong {
  color: var(--hv-navy);
  font-weight: 800;
}

.havin-msg-bubble--html .havin-tip,
.havin-msg-bubble--html p.havin-tip {
  margin-top: 0.55em;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(218, 179, 105, 0.14);
  border: 1px solid rgba(218, 179, 105, 0.35);
  color: #5b4a24;
  font-size: 12px;
}

.havin-msg-bubble--html .havin-ok {
  color: #166534;
}

.havin-msg-bubble--html .havin-warn {
  color: var(--hv-wine);
}

.havin-msg-bubble--html .havin-hl {
  color: var(--hv-wine);
  font-weight: 800;
}

.havin-suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.havin-suggest-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(218, 179, 105, 0.55);
  background: linear-gradient(135deg, #fff, var(--hv-cream));
  color: var(--hv-navy);
  border-radius: 999px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.havin-suggest-chip:hover {
  transform: translateY(-1px);
  border-color: var(--hv-gold);
  box-shadow: 0 6px 14px rgba(16, 27, 56, 0.1);
}

.havin-msg--user .havin-msg-bubble {
  background: linear-gradient(135deg, var(--hv-navy), var(--hv-navy-2));
  color: #fff;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 14px rgba(16, 27, 56, 0.2);
}

.havin-msg--assistant .havin-msg-bubble {
  background: #fff;
  color: #334155;
  border: 1px solid rgba(218, 179, 105, 0.35);
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 10px rgba(16, 27, 56, 0.06);
}

.havin-msg-time {
  font-size: 9px;
  color: #94a3b8;
  margin-top: 4px;
  padding-inline: 4px;
}

/* --- Product cards --- */
.havin-products {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.havin-product-card {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--hv-cream), #fff);
  border: 1px solid rgba(218, 179, 105, 0.45);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.havin-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 27, 56, 0.12);
}

.havin-product-card img {
  width: 62px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.havin-product-card strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--hv-navy);
  line-height: 1.55;
}

.havin-product-card em {
  display: block;
  font-style: normal;
  font-size: 10px;
  color: var(--hv-wine);
  margin-top: 3px;
}

.havin-product-card .havin-price {
  font-size: 12px;
  font-weight: 900;
  color: var(--hv-navy);
  margin-top: 5px;
}

.havin-product-card .havin-product-cta {
  font-size: 10px;
  font-weight: 800;
  color: var(--hv-gold);
  background: var(--hv-navy);
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

/* --- Coupon --- */
.havin-coupon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(133, 37, 54, 0.08), rgba(133, 37, 54, 0.04));
  border: 1.5px dashed var(--hv-wine);
  font-size: 12px;
  font-weight: 800;
  color: var(--hv-wine);
}

.havin-coupon code {
  background: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.05em;
}

.havin-coupon button {
  border: none;
  background: var(--hv-wine);
  color: #fff;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

/* --- Quick actions --- */
.havin-quick {
  display: flex;
  gap: 8px;
  padding: 0 14px 10px;
  flex-wrap: wrap;
}

.havin-quick[hidden] { display: none !important; }

.havin-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(218, 179, 105, 0.5);
  background: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: var(--hv-navy);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.havin-quick-btn i { color: var(--hv-wine); font-size: 10px; }
.havin-quick-btn:hover {
  background: var(--hv-cream);
  border-color: var(--hv-gold);
}

/* --- Compose --- */
.havin-compose {
  padding: 12px 14px 14px;
  background: #fff;
  border-top: 1px solid #f1f5f9;
}

.havin-compose[hidden] { display: none !important; }

.havin-compose__inner {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 4px 4px 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.havin-compose__inner:focus-within {
  border-color: rgba(218, 179, 105, 0.6);
  box-shadow: 0 0 0 3px rgba(218, 179, 105, 0.15);
  background: #fff;
}

.havin-compose__inner input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.havin-send {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--hv-navy), var(--hv-navy-2));
  color: var(--hv-gold);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s;
}

.havin-send:hover { transform: scale(1.05); }

/* --- Typing --- */
.havin-typing {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid rgba(218, 179, 105, 0.3);
  border-radius: 16px;
  border-bottom-right-radius: 4px;
  max-width: 88%;
}

.havin-typing .havin-msg-avatar {
  width: 28px;
  height: 28px;
  margin-top: 0;
}

.havin-typing[hidden] { display: none !important; }

.havin-typing-dots {
  display: flex;
  gap: 4px;
}

.havin-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hv-gold);
  animation: hvDot 1.2s ease infinite;
}

.havin-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.havin-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

.havin-typing-label {
  font-size: 11px;
  color: #94a3b8;
}

/* --- Animations --- */
@keyframes hvBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes hvPanelIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hvMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hvPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes hvDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 992px) {
  :root { --bb-ai-dock-size: 68px; }
  .havin-widget.bb-ai-widget { --bb-ai-offset-bottom: 96px; }
  .havin-chat { width: min(360px, calc(100vw - 20px)); }
  body.single-product .havin-widget,
  body.dz-app-product .havin-widget { --bb-ai-offset-bottom: 188px; }
}

@media (max-width: 576px) {
  :root { --bb-ai-dock-size: 64px; }
  .havin-chat { height: min(520px, calc(100vh - 110px)); }
}

@media (prefers-reduced-motion: reduce) {
  .bb-ai-dock, .havin-chat, .havin-msg,
  .havin-dock-face, .havin-mini-book, .havin-page-flip, .havin-sparkle { animation: none; }
}
