.pvc-vetty-float {
  position: fixed;
  right: 20px;
  bottom: 92px;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  background: linear-gradient(135deg, #ffa500, #29a2fe);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28), 0 0 0 0 rgba(41, 162, 254, .28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  cursor: pointer;
  z-index: 10000;
  isolation: isolate;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  animation: pvcVettyFloatPulse 3s ease-in-out infinite;
}

.pvc-vetty-float:hover,
.pvc-vetty-float:focus-visible {
  transform: translateY(-3px) scale(1.06) rotate(-2deg);
  filter: saturate(1.08);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .34), 0 0 0 10px rgba(255, 165, 0, .12);
}

.pvc-vetty-float.is-opening {
  animation: pvcVettyOpenPop .52s ease both;
}

.pvc-vetty-float:focus-visible,
.pvc-vetty-close:focus-visible,
.pvc-vetty-send:focus-visible,
.pvc-vetty-suggestion:focus-visible,
.pvc-vetty-handoff:focus-visible {
  outline: 3px solid rgba(255, 165, 0, .72);
  outline-offset: 3px;
}

.pvc-vetty-float img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  pointer-events: none;
  display: block;
  transform-origin: 50% 80%;
  animation: pvcVettyMascotFloat 4.6s ease-in-out infinite;
}

.pvc-vetty-float::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .8), transparent 18%),
    conic-gradient(from 120deg, rgba(255, 165, 0, .5), rgba(41, 162, 254, .45), rgba(55, 214, 122, .35), rgba(255, 165, 0, .5));
  opacity: .42;
  filter: blur(10px);
  z-index: -1;
  animation: pvcVettyHalo 4.8s linear infinite;
}

.pvc-vetty-float::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #37d67a;
  box-shadow: 0 0 0 0 rgba(55, 214, 122, .58);
  animation: pvcVettyOnline 1.8s ease-out infinite;
}

.pvc-vetty-panel {
  position: fixed;
  right: 20px;
  bottom: 164px;
  width: 380px;
  max-width: calc(100vw - 40px);
  max-height: min(640px, calc(100dvh - 190px));
  z-index: 10001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: rgba(15, 19, 32, .96);
  color: var(--text, #e9edf1);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .38);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease;
  animation: pvcVettyPanelIn .22s ease both;
}

.pvc-vetty-panel[hidden] {
  display: none;
}

.pvc-vetty-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(135deg, rgba(255, 165, 0, .16), rgba(41, 162, 254, .12));
}

.pvc-vetty-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  object-fit: contain;
  flex: 0 0 auto;
  animation: pvcVettyAvatarBlink 5.5s ease-in-out infinite;
}

.pvc-vetty-title {
  min-width: 0;
  flex: 1;
}

.pvc-vetty-title strong,
.pvc-vetty-title span {
  display: block;
}

.pvc-vetty-title strong {
  font-size: 1rem;
  line-height: 1.2;
}

.pvc-vetty-title span {
  color: var(--muted, #a6adbb);
  font-size: .8rem;
  margin-top: 2px;
}

.pvc-vetty-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  color: currentColor;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.pvc-vetty-messages {
  flex: 1 1 auto;
  min-height: 180px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.pvc-vetty-intro,
.pvc-vetty-message {
  max-width: 88%;
}

.pvc-vetty-intro {
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px 14px 14px 4px;
  background: rgba(255, 255, 255, .06);
  padding: 12px 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.pvc-vetty-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: pvcVettyMessageIn .18s ease both;
}

.pvc-vetty-message--user {
  align-self: flex-end;
  align-items: flex-end;
}

.pvc-vetty-message--assistant,
.pvc-vetty-message--error {
  align-self: flex-start;
  align-items: flex-start;
}

.pvc-vetty-label {
  color: var(--muted, #a6adbb);
  font-size: .72rem;
  padding: 0 4px;
}

.pvc-vetty-bubble {
  border-radius: 14px;
  padding: 11px 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pvc-vetty-message--user .pvc-vetty-bubble {
  border-bottom-right-radius: 4px;
  background: linear-gradient(135deg, #ffa500, #ffb84d);
  color: #111827;
}

.pvc-vetty-message--assistant .pvc-vetty-bubble {
  border: 1px solid rgba(255, 255, 255, .1);
  border-bottom-left-radius: 4px;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.pvc-vetty-message--error .pvc-vetty-bubble {
  border: 1px solid rgba(248, 113, 113, .35);
  border-bottom-left-radius: 4px;
  background: rgba(127, 29, 29, .35);
}

.pvc-vetty-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 20px;
}

.pvc-vetty-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
  animation: pvcVettyTyping 1s infinite ease-in-out;
}

.pvc-vetty-typing span:nth-child(2) {
  animation-delay: .12s;
}

.pvc-vetty-typing span:nth-child(3) {
  animation-delay: .24s;
}

.pvc-vetty-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}

.pvc-vetty-suggestion {
  border: 1px solid rgba(255, 165, 0, .32);
  border-radius: 999px;
  background: rgba(255, 165, 0, .1);
  color: var(--text, #e9edf1);
  cursor: pointer;
  padding: 7px 10px;
  font-size: .78rem;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.pvc-vetty-suggestion:hover,
.pvc-vetty-suggestion:focus-visible {
  background: rgba(255, 165, 0, .18);
  border-color: rgba(255, 165, 0, .62);
  transform: translateY(-1px);
}

.pvc-vetty-handoff {
  align-self: flex-start;
  border-radius: 999px;
  background: #25d366;
  color: #07140c;
  font-weight: 800;
  text-decoration: none;
  padding: 9px 12px;
  margin-top: 4px;
}

.pvc-vetty-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
}

.pvc-vetty-input {
  flex: 1;
  min-width: 0;
  max-height: 120px;
  resize: none;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  color: currentColor;
  padding: 10px 11px;
  font: inherit;
}

.pvc-vetty-input::placeholder {
  color: var(--muted, #a6adbb);
}

.pvc-vetty-input:focus {
  outline: 2px solid rgba(41, 162, 254, .55);
  outline-offset: 2px;
}

.pvc-vetty-send {
  min-width: 82px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, #ffa500, #ffb14a);
  color: #0b0d12;
  cursor: pointer;
  font-weight: 900;
  padding: 0 14px;
  box-shadow: 0 10px 22px rgba(255, 165, 0, .22);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.pvc-vetty-send:hover:not(:disabled),
.pvc-vetty-send:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 13px 28px rgba(255, 165, 0, .3);
}

.pvc-vetty-send:disabled,
.pvc-vetty-input:disabled,
.pvc-vetty-suggestion:disabled {
  cursor: wait;
  opacity: .68;
}

.pvc-vetty-note {
  padding: 0 14px 12px;
  color: var(--muted, #a6adbb);
  font-size: .72rem;
  line-height: 1.35;
}

html[data-theme="light"] .pvc-vetty-panel {
  border-color: rgba(15, 23, 42, .12);
  background: rgba(255, 255, 255, .98);
  color: #111827;
  box-shadow: 0 22px 70px rgba(15, 23, 42, .22);
}

html[data-theme="light"] .pvc-vetty-header,
html[data-theme="light"] .pvc-vetty-form {
  border-color: rgba(15, 23, 42, .1);
}

html[data-theme="light"] .pvc-vetty-close,
html[data-theme="light"] .pvc-vetty-intro,
html[data-theme="light"] .pvc-vetty-message--assistant .pvc-vetty-bubble,
html[data-theme="light"] .pvc-vetty-input {
  border-color: rgba(15, 23, 42, .12);
  background: rgba(15, 23, 42, .045);
}

html[data-theme="light"] .pvc-vetty-suggestion {
  color: #111827;
}

@keyframes pvcVettyTyping {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: .4;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@keyframes pvcVettyFloatPulse {
  0%, 100% {
    box-shadow: 0 10px 26px rgba(0, 0, 0, .28), 0 0 0 0 rgba(41, 162, 254, .22);
  }
  55% {
    box-shadow: 0 14px 34px rgba(0, 0, 0, .3), 0 0 0 13px rgba(41, 162, 254, 0);
  }
}

@keyframes pvcVettyMascotFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  45% {
    transform: translateY(-3px) rotate(-2deg);
  }
  70% {
    transform: translateY(1px) rotate(1deg);
  }
}

@keyframes pvcVettyHalo {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pvcVettyOnline {
  70%, 100% {
    box-shadow: 0 0 0 9px rgba(55, 214, 122, 0);
  }
}

@keyframes pvcVettyOpenPop {
  0% {
    transform: scale(.94);
  }
  48% {
    transform: translateY(-4px) scale(1.12) rotate(-5deg);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes pvcVettyPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pvcVettyMessageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pvcVettyAvatarBlink {
  0%, 88%, 100% {
    transform: scale(1);
  }
  92% {
    transform: scale(.94, 1.04);
  }
}

@media (max-width: 640px) {
  .pvc-vetty-float {
    right: 16px;
    bottom: 88px;
    width: 56px;
    height: 56px;
  }

  .pvc-vetty-float img {
    width: 47px;
    height: 47px;
  }

  .pvc-vetty-panel {
    right: 12px;
    left: 12px;
    bottom: 152px;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 170px);
    border-radius: 16px;
  }

  .pvc-vetty-messages {
    min-height: 160px;
    padding: 14px;
  }

  .pvc-vetty-intro,
  .pvc-vetty-message {
    max-width: 94%;
  }

  .pvc-vetty-form {
    padding: 10px;
  }

  .pvc-vetty-send {
    min-width: 72px;
    padding: 0 11px;
  }
}

@media (max-height: 620px) {
  .pvc-vetty-panel {
    max-height: calc(100dvh - 120px);
    bottom: 132px;
  }

  .pvc-vetty-messages {
    min-height: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pvc-vetty-float,
  .pvc-vetty-panel,
  .pvc-vetty-float img,
  .pvc-vetty-float::before,
  .pvc-vetty-float::after,
  .pvc-vetty-message,
  .pvc-vetty-avatar,
  .pvc-vetty-typing span {
    animation: none;
    transition: none;
  }
}
