.vt-chat,
.vt-chat * {
  box-sizing: border-box;
}

.vt-chat {
  --vt-chat-red: #ff2b2b;
  --vt-chat-red-dark: #c91f1f;
  --vt-chat-ink: #111111;
  --vt-chat-muted: #696969;
  --vt-chat-line: #e7e7e7;
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 10060;
  font-family: "Inter", "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--vt-chat-ink);
}

.vt-chat-launcher {
  min-width: 142px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  float: right;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: #151515;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.25);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.vt-chat-launcher:hover,
.vt-chat-launcher:focus-visible {
  transform: translateY(-2px);
  background: #080808;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.vt-chat-launcher-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--vt-chat-red);
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
}

.vt-chat-unread {
  position: absolute;
  top: -4px;
  right: -2px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--vt-chat-red);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
}

.vt-chat-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: min(390px, calc(100vw - 32px));
  height: min(610px, calc(100vh - 112px));
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.vt-chat.is-open .vt-chat-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.vt-chat.is-open .vt-chat-launcher {
  min-width: 52px;
  width: 52px;
  padding: 0;
}

.vt-chat.is-open .vt-chat-launcher-label,
.vt-chat.is-open .vt-chat-unread {
  display: none;
}

.vt-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 15px;
  border-bottom: 1px solid var(--vt-chat-line);
  background: #101010;
  color: #ffffff;
}

.vt-chat-brand {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff3a3a, #bb1717);
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
}

.vt-chat-heading {
  min-width: 0;
  flex: 1;
}

.vt-chat-heading strong,
.vt-chat-heading span {
  display: block;
}

.vt-chat-heading strong {
  font-size: 14px;
  line-height: 1.25;
}

.vt-chat-heading span {
  margin-top: 3px;
  color: #bdbdbd;
  font-size: 11px;
}

.vt-chat-online {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #4ade80;
}

.vt-chat-close,
.vt-chat-reset {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: inherit;
  cursor: pointer;
  transition: background 160ms ease;
}

.vt-chat-close:hover,
.vt-chat-reset:hover {
  background: rgba(255, 255, 255, 0.16);
}

.vt-chat-reset {
  font-size: 12px;
}

.vt-chat-close {
  font-size: 21px;
}

.vt-chat-log {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 15px 8px;
  background: #f7f7f6;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.vt-chat-message {
  display: flex;
  margin: 0 0 12px;
}

.vt-chat-message.is-user {
  justify-content: flex-end;
}

.vt-chat-bubble {
  max-width: 86%;
  padding: 11px 13px;
  border: 1px solid var(--vt-chat-line);
  border-radius: 15px 15px 15px 5px;
  background: #ffffff;
  color: #222222;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-line;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.05);
}

.vt-chat-message.is-user .vt-chat-bubble {
  border-color: var(--vt-chat-red-dark);
  border-radius: 15px 15px 5px 15px;
  background: var(--vt-chat-red-dark);
  color: #ffffff;
  box-shadow: none;
}

.vt-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
  margin-top: 8px;
}

.vt-chat-action,
.vt-chat-suggestion {
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #ffffff;
  color: #202020;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.vt-chat-action {
  padding: 8px 10px;
}

.vt-chat-suggestion {
  padding: 8px 11px;
  white-space: nowrap;
}

.vt-chat-action:hover,
.vt-chat-suggestion:hover {
  border-color: var(--vt-chat-red);
  color: var(--vt-chat-red-dark);
}

.vt-chat-typing {
  color: var(--vt-chat-muted);
  font-size: 12px;
  font-style: italic;
}

.vt-chat-suggestions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 8px 14px 10px;
  border-top: 1px solid var(--vt-chat-line);
  background: #ffffff;
  scrollbar-width: none;
}

.vt-chat-suggestions::-webkit-scrollbar {
  display: none;
}

.vt-chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--vt-chat-line);
  background: #ffffff;
}

.vt-chat-input {
  width: 100%;
  min-height: 42px;
  max-height: 92px;
  resize: none;
  overflow-y: auto;
  padding: 11px 12px;
  border: 1px solid #d7d7d7;
  border-radius: 13px;
  background: #fafafa;
  color: #111111;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  outline: none;
}

.vt-chat-input:focus {
  border-color: var(--vt-chat-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 43, 43, 0.1);
}

.vt-chat-send {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 13px;
  background: var(--vt-chat-red);
  color: #ffffff;
  font: inherit;
  font-size: 18px;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.vt-chat-send:hover {
  background: var(--vt-chat-red-dark);
  transform: translateY(-1px);
}

.vt-chat-send:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.vt-chat-footer-note {
  display: block;
  padding: 0 12px 9px;
  background: #ffffff;
  color: #8a8a8a;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.02em;
}

@media (max-width: 600px) {
  .vt-chat {
    right: 12px;
    bottom: 12px;
  }

  .vt-chat-launcher {
    min-width: 52px;
    width: 52px;
    padding: 0;
  }

  .vt-chat-launcher-label {
    display: none;
  }

  .vt-chat-panel {
    position: fixed;
    right: 10px;
    bottom: 74px;
    left: 10px;
    width: auto;
    height: min(650px, calc(100dvh - 92px));
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vt-chat-panel,
  .vt-chat-launcher,
  .vt-chat-send {
    transition: none;
  }
}
