/* ==========================================================================
   Havin — Professional Chat Widget UI
   Brand: navy #101b38 · wine #852536 · gold #dab369
   ========================================================================== */
:root {
  --bb-ai-offset-bottom: 32px;
  --bb-ai-offset-side: 14px;
  --bb-ai-dock-size: 56px;
  --bb-ai-z: 10000050;
  --hv-navy: #101b38;
  --hv-navy-2: #1c2b54;
  --hv-wine: #852536;
  --hv-gold: #f59e0b;
  --hv-gold-bright: #facc15;
  --hv-gold-2: #d97706;
  --hv-cream: #fffbeb;
  --hv-radius: 20px;
  --hv-shadow: 0 16px 40px rgba(234, 179, 8, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.8) 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: 5px;
}

/* --- 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.08); }
.havin-widget.is-open .bb-ai-dock { animation-play-state: paused; transform: scale(0.92); }

.bb-ai-dock-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #fef08a, #facc15, #f59e0b, #d97706, #ffffff, #facc15, #fef08a);
  z-index: 0;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.55);
}

.bb-ai-dock-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 224, 71, 0.65) 0%, rgba(245, 158, 11, 0.25) 48%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.bb-ai-dock-media {
  position: absolute;
  inset: 2px;
  z-index: 1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff, #fef9c3);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.28);
}

.havin-dock-stage {
  isolation: isolate;
  background: radial-gradient(circle at 45% 35%, #ffffff 0%, #fffbeb 22%, #fef08a 55%, #facc15 85%, #eab308 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(254, 240, 138, 0.9);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.95), inset 0 -2px 6px rgba(202, 138, 4, 0.3);
}

.havin-logo-halo {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(254, 240, 138, 0.5) 45%, transparent 70%);
  filter: blur(6px);
  animation: nofnikaAuraPulse 3.5s ease-in-out infinite;
  pointer-events: none;
}

.havin-logo-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.havin-dock-face.havin-animated-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
  z-index: 2;
  filter: drop-shadow(0 2px 5px rgba(113, 63, 18, 0.35)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.75));
  animation: nofnikaLogoFloat 4.2s ease-in-out infinite, nofnikaLogoGlow 3s ease-in-out infinite alternate;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
}

.bb-ai-dock:hover .havin-dock-face.havin-animated-logo {
  transform: scale(1.1) translateY(-1.5px);
  filter: drop-shadow(0 4px 10px rgba(113, 63, 18, 0.45)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.95));
}

/* Light shimmer reflection across logo */
.havin-logo-shine {
  position: absolute;
  inset: 0;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: linear-gradient(
    135deg,
    transparent 35%,
    rgba(255, 255, 255, 0.85) 48%,
    rgba(254, 240, 138, 0.9) 52%,
    transparent 65%
  );
  transform: rotate(25deg) translateY(-100%);
  animation: nofnikaShineSweep 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
  z-index: 3;
}

/* Concentric AI Energy Radar Rings */
.havin-sonar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(250, 204, 21, 0.9);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
  pointer-events: none;
  z-index: 1;
}

.havin-sonar-1 {
  animation: nofnikaSonar 3.2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.havin-sonar-2 {
  animation: nofnikaSonar 3.2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
  animation-delay: 1.6s;
}

@keyframes nofnikaLogoFloat {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  30% {
    transform: translateY(-2px) scale(1.03) rotate(-1.5deg);
  }
  70% {
    transform: translateY(1.5px) scale(0.98) rotate(1.5deg);
  }
}

@keyframes nofnikaLogoGlow {
  0% {
    filter: drop-shadow(0 2px 5px rgba(113, 63, 18, 0.35)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
  }
  100% {
    filter: drop-shadow(0 4px 8px rgba(113, 63, 18, 0.5)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.9));
  }
}

@keyframes nofnikaAuraPulse {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.95;
  }
}

@keyframes nofnikaShineSweep {
  0% {
    transform: rotate(25deg) translateY(-140%);
  }
  20%, 100% {
    transform: rotate(25deg) translateY(140%);
  }
}

@keyframes nofnikaSonar {
  0% {
    transform: scale(0.7);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.havin-widget.is-open .havin-dock-face,
.havin-widget.is-open .havin-logo-shine,
.havin-widget.is-open .havin-sonar-ring,
.havin-widget.is-open .havin-logo-halo {
  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: 52px; }
  .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: 48px; }
  .havin-chat { height: min(520px, calc(100vh - 110px)); }
}

@media (prefers-reduced-motion: reduce) {
  .bb-ai-dock, .havin-chat, .havin-msg,
  .havin-dock-face, .havin-logo-shine, .havin-sonar-ring, .havin-logo-halo { animation: none; }
}
