.vgt-chat {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  font-family: var(--vgt-font, "Figtree", "Segoe UI", sans-serif);
}

.vgt-chat__launcher {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #e0b25a 0%, #c48a2c 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(154, 123, 47, 0.35);
  cursor: pointer;
}

.vgt-chat__launcher:hover {
  filter: brightness(1.05);
}

.vgt-chat__panel {
  position: absolute;
  right: 0;
  bottom: 4.35rem;
  display: flex;
  flex-direction: column;
  width: min(22.5rem, calc(100vw - 2rem));
  height: min(30rem, calc(100vh - 7rem));
  overflow: hidden;
  border: 1px solid #efe6d6;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(20, 18, 16, 0.18);
  transform-origin: right bottom;
  opacity: 0;
  transform: translateY(14px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.vgt-chat.is-open .vgt-chat__panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.vgt-chat__panel[hidden] {
  display: none;
}

.vgt-chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  background: #1b2433;
  color: #fff;
}

.vgt-chat__head strong {
  display: block;
  font-size: 0.95rem;
}

.vgt-chat__head span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  color: #d7deea;
  font-size: 0.75rem;
}

.vgt-chat__head i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #3dce7a;
}

.vgt-chat__close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.vgt-chat__log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.9rem;
  overflow: auto;
  background: #f7f5f2;
}

.vgt-chat__bubble {
  max-width: 85%;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.vgt-chat__bubble.is-bot {
  align-self: flex-start;
  background: #fff;
  color: #1b2433;
}

.vgt-chat__bubble.is-user {
  align-self: flex-end;
  background: #1b2433;
  color: #fff;
}

.vgt-chat__bubble.is-typing::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.85em;
  margin-left: 1px;
  background: currentColor;
  vertical-align: text-bottom;
  animation: vgt-chat-caret 0.85s steps(1) infinite;
}

@keyframes vgt-chat-caret {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vgt-chat__panel,
  .vgt-chat.is-open .vgt-chat__panel {
    transition: none;
    transform: none;
  }

  .vgt-chat__bubble.is-typing::after {
    animation: none;
  }
}

.vgt-chat__form {
  display: flex;
  gap: 0.45rem;
  padding: 0.7rem;
  border-top: 1px solid #efe6d6;
  background: #fff;
}

.vgt-chat__form input {
  flex: 1;
  min-width: 0;
  height: 2.4rem;
  padding: 0 0.75rem;
  border: 1px solid #e7e2d8;
  border-radius: 999px;
  font: inherit;
  font-size: 0.86rem;
}

.vgt-chat__form button {
  height: 2.4rem;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 999px;
  background: #c9963a;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 640px) {
  .vgt-chat {
    right: 0.85rem;
    bottom: 0.85rem;
  }
}
