/* Chat mascot — complements the existing UI; does not replace it. */

.vb-mascot {
  position: relative;
  display: block;
  flex-shrink: 0;
  line-height: 0;
  overflow: hidden;
  background: #0c1424;
}

.vb-mascot picture,
.vb-mascot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  user-select: none;
  pointer-events: none;
}

.vb-mascot--avatar img,
.vb-mascot--full img {
  object-position: 50% 46%;
}

.vb-mascot--banner img {
  object-position: 78% 50%;
}

.vb-mascot__lids {
  position: absolute;
  left: 29%;
  right: 29%;
  top: 40%;
  height: 14%;
  border-radius: 40%;
  background: #070b12;
  opacity: 0;
  transform: scaleY(0.15);
  transform-origin: 50% 40%;
  pointer-events: none;
}

.vb-mascot--avatar .vb-mascot__lids,
.vb-mascot--full .vb-mascot__lids {
  top: 28%;
  left: 33%;
  right: 33%;
  height: 9%;
}

.vb-mascot__antenna {
  position: absolute;
  top: 6%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px 2px rgba(67, 186, 255, 0.7);
  opacity: 0.45;
  pointer-events: none;
  animation: vb-antenna 2.6s ease-in-out infinite;
}

.vb-mascot--avatar .vb-mascot__antenna,
.vb-mascot--full .vb-mascot__antenna {
  top: 10%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
}

.vb-mascot--msg .vb-mascot__lids,
.vb-mascot--msg .vb-mascot__antenna,
.vb-mascot--sm .vb-mascot__lids,
.vb-mascot--sm .vb-mascot__antenna {
  display: none;
}

.vb-mascot--idle .vb-mascot__lids,
.vb-mascot--live .vb-mascot__lids {
  animation: vb-blink 5.8s var(--ease) infinite;
}

.vb-mascot.is-blink .vb-mascot__lids {
  animation: vb-blink-once 0.38s ease;
}

.vb-mascot--thinking {
  animation: vb-think 2.4s ease-in-out infinite;
}

.vb-mascot--thinking .vb-mascot__antenna {
  animation: vb-antenna 1.2s ease-in-out infinite;
}

.vb-mascot--float {
  animation: vb-idle 4.4s ease-in-out infinite;
}

.vb-mascot.is-nudge {
  animation: vb-nudge 0.72s var(--ease);
}

.ai-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-chat-header__brand {
  align-items: center;
}

.vb-mascot-enter {
  animation: vb-fade-in 0.7s var(--ease) both;
}

.vb-mascot-enter.is-visible {
  animation: vb-fade-in 0.7s var(--ease) both;
}

@keyframes vb-antenna {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.82);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.18);
  }
}

@keyframes vb-blink {
  0%,
  91%,
  100% {
    opacity: 0;
    transform: scaleY(0.15);
  }
  93%,
  95.5% {
    opacity: 0.92;
    transform: scaleY(1);
  }
}

@keyframes vb-blink-once {
  0%,
  100% {
    opacity: 0;
    transform: scaleY(0.15);
  }
  40%,
  60% {
    opacity: 0.92;
    transform: scaleY(1);
  }
}

@keyframes vb-idle {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.025);
  }
}

@keyframes vb-think {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes vb-nudge {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  32% {
    transform: translateY(-6px) scale(1.03);
  }
  58% {
    transform: translateY(0) scale(1);
  }
  78% {
    transform: translateY(-3px) scale(1.015);
  }
}

@keyframes vb-wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  28% {
    transform: rotate(-7deg);
  }
  55% {
    transform: rotate(5deg);
  }
  78% {
    transform: rotate(-3deg);
  }
}

@keyframes vb-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— Chat launcher —— */

.ai-chat-toggle {
  width: 64px;
  height: 64px;
  padding: 0;
  background: #0c1424;
  border: 2px solid rgba(67, 186, 255, 0.42);
  box-shadow:
    0 12px 36px rgba(67, 186, 255, 0.28),
    0 4px 14px rgba(0, 0, 0, 0.28);
  overflow: visible;
  transition:
    transform 0.25s var(--ease),
    opacity 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.ai-chat-toggle:hover {
  transform: scale(1.06);
  box-shadow:
    0 16px 40px rgba(67, 186, 255, 0.38),
    0 4px 14px rgba(0, 0, 0, 0.3);
}

.ai-chat-toggle:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.ai-chat-toggle::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  z-index: 2;
}

.ai-chat-toggle__glow {
  background: radial-gradient(circle, rgba(67, 186, 255, 0.5), transparent 70%);
}

.ai-chat-toggle__float {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  animation: vb-idle 4.4s ease-in-out infinite;
}

.ai-chat-toggle .vb-mascot {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.ai-chat-toggle.is-nudge .ai-chat-toggle__float {
  animation: vb-nudge 0.72s var(--ease);
}

.ai-chat-toggle.is-waving .ai-chat-toggle__float {
  animation: vb-wave 0.7s var(--ease);
}

.ai-chat-toggle.is-open {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.86);
}

/* —— Chat header / messages —— */

.ai-chat-avatar.vb-mascot,
.ai-chat-header .vb-mascot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(67, 186, 255, 0.32);
  box-shadow: 0 0 14px rgba(67, 186, 255, 0.18);
}

.ai-message__avatar.vb-mascot,
.vb-mascot--msg {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(67, 186, 255, 0.28);
  color: inherit;
  font-size: 0;
  background: #0c1424;
}

.ai-chat-header__status-copy {
  margin: 2px 0 0;
  font-size: 12px;
  color: #b7c5d9;
}

/* —— Welcome / empty state —— */

.ai-chat-welcome {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 8px 4px 6px;
  animation: vb-fade-in 0.55s var(--ease) both;
}

.ai-chat-welcome[hidden],
.ai-chat-thread[hidden] {
  display: none;
}

.ai-chat-messages:has(#ai-chat-welcome:not([hidden])) {
  justify-content: center;
}

.ai-chat-welcome .vb-mascot {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid rgba(67, 186, 255, 0.28);
  box-shadow: 0 8px 24px rgba(67, 186, 255, 0.16);
}

.ai-chat-welcome__kicker {
  margin: 0 0 4px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-chat-welcome__title {
  margin: 0 0 8px;
  font-family: Outfit, sans-serif;
  font-size: 1.15rem;
  font-weight: 650;
  color: #fff;
  letter-spacing: -0.02em;
}

.ai-chat-welcome__copy {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #b7c5d9;
}

.ai-chat-welcome__cta {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 650;
  font-size: 0.86rem;
  color: #fff;
  background: linear-gradient(145deg, var(--ai-gradient-start) 0%, var(--ai-accent) 78%);
  cursor: pointer;
}

.ai-chat-welcome__cta:hover {
  filter: brightness(1.06);
}

.ai-chat-welcome__cta:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.ai-chat-panel.is-closing {
  opacity: 0;
  visibility: visible;
  transform: translateY(24px) scale(0.78);
  pointer-events: none;
}

/* —— Typing indicator —— */

.ai-chat-typing {
  align-items: center;
  min-height: 40px;
}

.ai-chat-typing .vb-mascot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(67, 186, 255, 0.28);
}

.ai-chat-typing__text {
  margin: 0;
  font-size: 0.78rem;
  color: #b7c5d9;
}

.ai-chat-typing__bubble {
  display: none;
}

/* —— Page: hero —— */

.hero-mascot {
  align-self: end;
  justify-self: center;
  width: min(200px, 100%);
  margin-bottom: -28px;
  pointer-events: none;
}

.hero-mascot .vb-mascot {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.hero-grid {
  grid-template-columns: 1.15fr minmax(112px, 0.3fr) 0.75fr;
}

/* —— Page: FAQ / support callout —— */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 40px;
  align-items: start;
}

.faq-layout .faq-wrap {
  max-width: none;
}

.vb-help-card {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  background: var(--navy);
  color: #c9d6e6;
  padding: 22px 20px 20px;
  text-align: center;
}

.vb-help-card .vb-mascot {
  width: 96px;
  height: 96px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 1px solid rgba(67, 186, 255, 0.28);
}

.vb-help-card h3 {
  color: #fff;
  margin-bottom: 6px;
}

.vb-help-card p {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: #b7c5d6;
}

.vb-speech {
  position: relative;
  margin: 12px 0 16px;
  padding: 12px 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(67, 186, 255, 0.28);
  border-radius: 12px;
}

.vb-speech::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--navy);
  border-left: 1px solid rgba(67, 186, 255, 0.28);
  border-top: 1px solid rgba(67, 186, 255, 0.28);
  transform: rotate(45deg);
}

.vb-speech strong {
  display: block;
  color: #fff;
  font-family: var(--display);
  font-size: 0.95rem;
}

.vb-help-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  margin: 14px 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vb-help-links a,
.vb-help-links button {
  color: var(--cyan);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.vb-help-links a:hover,
.vb-help-links button:hover {
  color: #fff;
}

.vb-help-card .btn {
  width: 100%;
}

/* —— Page: CTA —— */

.cta-mascot {
  width: 108px;
  margin: 0 auto 14px;
}

.cta-mascot .vb-mascot {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 1px solid rgba(67, 186, 255, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.cta-note {
  margin: 0 auto 8px;
  max-width: 28em;
  color: rgba(213, 224, 238, 0.88);
  font-size: 0.95rem;
}

/* —— Page: footer —— */

.footer-grid {
  grid-template-columns: repeat(4, 1fr);
}

.footer-ai {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c9d6e6;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.footer-ai:hover,
.footer-ai:focus-visible {
  color: var(--cyan);
}

.footer-ai:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.footer-ai .vb-mascot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(67, 186, 255, 0.28);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-mascot {
    width: 128px;
    margin: 4px 0 8px;
    justify-self: start;
    pointer-events: none;
  }

  .faq-layout {
    grid-template-columns: 1fr;
  }

  .vb-help-card {
    position: static;
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 8px 16px;
    text-align: left;
    align-items: center;
  }

  .vb-help-card .vb-mascot {
    grid-row: span 4;
    width: 88px;
    height: 88px;
    margin: 0;
  }

  .vb-speech::before {
    left: 18px;
    margin-left: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .hero-mascot {
    width: 84px;
    margin: 0 0 12px;
  }

  .ai-chat-welcome {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .ai-chat-welcome .vb-mascot {
    width: 84px;
    height: 84px;
  }

  .cta-mascot,
  .cta-mascot .vb-mascot {
    width: 84px;
    height: 84px;
  }

  .vb-help-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .vb-help-card .vb-mascot {
    grid-row: auto;
  }

  .vb-speech {
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ai-chat-toggle {
    width: 60px;
    height: 60px;
    right: 16px;
    bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vb-mascot__antenna,
  .vb-mascot--idle .vb-mascot__lids,
  .vb-mascot--live .vb-mascot__lids,
  .vb-mascot.is-blink .vb-mascot__lids,
  .vb-mascot--thinking,
  .vb-mascot--float,
  .vb-mascot-enter,
  .vb-mascot-enter.is-visible,
  .ai-chat-toggle__float,
  .ai-chat-toggle.is-nudge .ai-chat-toggle__float,
  .ai-chat-toggle.is-waving .ai-chat-toggle__float,
  .ai-chat-welcome,
  .ai-chat-toggle__glow,
  .ai-chat-status__dot {
    animation: none;
  }

  .vb-mascot-enter {
    opacity: 1;
    transform: none;
  }

  .ai-chat-toggle:hover {
    transform: none;
  }

  .ai-chat-panel.is-closing {
    transform: none;
  }
}
