.vcHbot {
  --vc-hbot-primary: #0b4f9f;
  --vc-hbot-primary-strong: #083b76;
  --vc-hbot-accent: #24a7e8;
  --vc-hbot-accent-soft: #dff4ff;
  --vc-hbot-ink: #10233c;
  --vc-hbot-muted: #63748b;
  --vc-hbot-border: rgba(16, 35, 60, 0.12);
  --vc-hbot-surface: #ffffff;
  --vc-hbot-shell: #f3f7fc;
  --vc-hbot-glow: rgba(36, 167, 232, 0.28);
  --vc-hbot-edge-gap: 24px;
  --vc-hbot-panel-gap: 14px;
  --vc-hbot-launcher-size: 132px;
  position: fixed;
  right: var(--vc-hbot-edge-gap);
  bottom: var(--vc-hbot-edge-gap);
  z-index: 10020;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: "Poppins", "Segoe UI", sans-serif;
  pointer-events: none;
}

.vcHbotPanel,
.vcHbotLauncher {
  pointer-events: auto;
}

.vcHbotPanel {
  position: relative;
  isolation: isolate;
  width: min(390px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - ((var(--vc-hbot-edge-gap) * 2) + var(--vc-hbot-panel-gap) + var(--vc-hbot-launcher-size)));
  max-height: calc(100dvh - ((var(--vc-hbot-edge-gap) * 2) + var(--vc-hbot-panel-gap) + var(--vc-hbot-launcher-size)));
  margin-bottom: var(--vc-hbot-panel-gap);
  border: 1px solid rgba(11, 79, 159, 0.14);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94));
  box-shadow: 0 30px 80px rgba(11, 31, 64, 0.22);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  z-index: 1;
}

.vcHbotPanel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 140px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.34), transparent 48%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 38%);
  pointer-events: none;
  z-index: 0;
}

.vcHbotHead {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 14px;
  padding: 18px 18px 16px;
  color: #fff;
  background: linear-gradient(135deg, #0a4b97 0%, #1273bf 52%, #2caee8 100%);
  overflow: hidden;
}

.vcHbotHead::before {
  content: "";
  position: absolute;
  inset: auto -10% -50% 20%;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.vcHbotHeadMain {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 12px;
  min-width: 0;
}

.vcHbotAvatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex: 0 0 auto;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 12px 28px rgba(10, 55, 114, 0.28);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.vcHbotAvatarGlow {
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 68%);
  opacity: 0.9;
  filter: blur(12px);
  animation: vcHbotPulse 3.2s ease-in-out infinite;
  pointer-events: none;
}

.vcHbotAvatarImage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vcHbotAvatarImage--bot {
  transform: scale(1.06);
}

.vcHbotAvatar--bot,
.vcHbotLauncherIcon--bot {
  padding: 0;
}

.vcHbotHeadText {
  flex: 1 1 auto;
  min-width: 0;
}

.vcHbotHeadEyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.vcHbotLiveDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #8bff9c;
  box-shadow: 0 0 0 6px rgba(139, 255, 156, 0.18);
}

.vcHbotHeadTitle {
  margin: 9px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.vcHbotHeadMeta {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  line-height: 1.45;
}

.vcHbotClose,
.vcHbotTool,
.vcHbotReplyClear,
.vcHbotMessageReplyBtn {
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.vcHbotClose {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  flex: 0 0 auto;
  align-self: flex-start;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.vcHbotClose:hover,
.vcHbotReplyClear:hover,
.vcHbotMessageReplyBtn:hover,
.vcHbotTool:hover,
.vcHbotSend:hover:not(:disabled) {
  transform: translateY(-1px);
}

.vcHbotClose svg,
.vcHbotTool svg,
.vcHbotReplyClear svg,
.vcHbotSend svg,
.vcHbotMessageReplyBtn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vcHbotBody {
  background: var(--vc-hbot-shell);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
}

.vcHbotMessages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 190px;
  padding: 18px 16px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.vcHbotEmpty {
  padding: 22px 18px;
  border: 1px dashed rgba(11, 79, 159, 0.18);
  border-radius: 22px;
  color: var(--vc-hbot-muted);
  font-size: 14px;
  line-height: 1.7;
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.vcHbotMessageRow {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vcHbotMessageRow.is-user {
  align-items: flex-end;
}

.vcHbotMessageRow.is-bot,
.vcHbotMessageRow.is-admin {
  align-items: flex-start;
}

.vcHbotBubble {
  position: relative;
  width: fit-content;
  max-width: min(84%, 300px);
  padding: 13px 14px 12px;
  border-radius: 22px;
  box-shadow: 0 12px 24px rgba(11, 31, 64, 0.08);
}

.vcHbotBubble.is-user {
  color: #fff;
  border-bottom-right-radius: 8px;
  background: #0d61bc;
}

.vcHbotBubble.is-user .vcHbotBubbleLabel,
.vcHbotBubble.is-user .vcHbotBubbleText,
.vcHbotBubble.is-user .vcHbotBubbleTime,
.vcHbotBubble.is-user .vcHbotMessageReplyBtn {
  color: #fff;
}

.vcHbotBubble.is-user .vcHbotBubbleTime {
  opacity: 0.88;
}

.vcHbotBubble.is-user .vcHbotMessageReplyBtn {
  opacity: 0.92;
}

.vcHbotBubble.is-user .vcHbotMessageReplyBtn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.vcHbotBubble.is-bot {
  color: var(--vc-hbot-ink);
  border-bottom-left-radius: 8px;
  border: 1px solid rgba(16, 35, 60, 0.08);
  background: #fff;
}

.vcHbotBubble.is-admin {
  color: #0d2f58;
  border-bottom-left-radius: 8px;
  border: 1px solid rgba(36, 167, 232, 0.22);
  background: #e9f6ff;
}

.vcHbotBubbleHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.vcHbotBubbleLabel {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.84;
}

.vcHbotMessageReplyBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: inherit;
  opacity: 0.68;
}

.vcHbotMessageReplyBtn:hover {
  opacity: 1;
  background: rgba(16, 35, 60, 0.08);
}

.vcHbotBubbleReply {
  margin-bottom: 9px;
  padding: 9px 10px;
  border-radius: 14px;
  border-left: 3px solid rgba(36, 167, 232, 0.9);
  background: rgba(255, 255, 255, 0.58);
}

.vcHbotBubble.is-user .vcHbotBubbleReply {
  border-left-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.14);
}

.vcHbotBubbleReplyLabel {
  display: block;
  color: var(--vc-hbot-primary-strong);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.vcHbotBubbleReplyText {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  color: inherit;
  opacity: 0.86;
}

.vcHbotBubble.is-user .vcHbotBubbleReplyLabel,
.vcHbotBubble.is-user .vcHbotBubbleReplyText {
  color: #fff;
  opacity: 1;
}

.vcHbotBubbleText {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.7;
}

.vcHbotBubbleAttachments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.vcHbotAttachment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.68);
}

.vcHbotAttachmentThumb {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(11, 79, 159, 0.1);
}

.vcHbotAttachmentThumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vcHbotAttachmentIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex: 0 0 auto;
  color: var(--vc-hbot-primary-strong);
  background: rgba(11, 79, 159, 0.12);
}

.vcHbotAttachmentIcon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.vcHbotAttachmentMeta {
  min-width: 0;
}

.vcHbotAttachmentName {
  display: block;
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}

.vcHbotAttachmentSize {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.75;
}

.vcHbotBubbleTime {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.7;
}

.vcHbotComposer {
  flex: 0 0 auto;
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(11, 79, 159, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), #ffffff);
  position: relative;
  z-index: 2;
}

.vcHbotReplyBar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: #eef6ff;
  border: 1px solid rgba(11, 79, 159, 0.12);
}

.vcHbotReplyCopy {
  min-width: 0;
}

.vcHbotReplyLabel {
  display: block;
  color: var(--vc-hbot-primary-strong);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.vcHbotReplyText {
  display: block;
  margin-top: 2px;
  color: var(--vc-hbot-ink);
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vcHbotReplyClear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: var(--vc-hbot-muted);
}

.vcHbotAttachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.vcHbotAttachmentChip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f2f6fb;
  border: 1px solid rgba(16, 35, 60, 0.1);
}

.vcHbotAttachmentChipName {
  max-width: 200px;
  color: var(--vc-hbot-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vcHbotAttachmentChipRemove {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--vc-hbot-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.vcHbotInputShell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "input input"
    "tools send";
  gap: 10px 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(16, 35, 60, 0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.vcHbotTools {
  grid-area: tools;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.vcHbotTool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: var(--vc-hbot-primary-strong);
}

.vcHbotTool:hover,
.vcHbotTool.is-active {
  background: rgba(11, 79, 159, 0.08);
  box-shadow: inset 0 0 0 1px rgba(11, 79, 159, 0.08);
}

.vcHbotInput {
  grid-area: input;
  width: 100%;
  min-height: 54px;
  max-height: 132px;
  padding: 4px 8px 2px 8px;
  margin: 0;
  border: 0;
  resize: none;
  outline: none;
  color: var(--vc-hbot-ink);
  background: transparent;
  font-size: 14px;
  line-height: 1.5;
}

.vcHbotInput::placeholder {
  color: #8795a8;
}

.vcHbotSend {
  grid-area: send;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #0a4b97 0%, #1a86d7 100%);
  box-shadow: 0 14px 28px rgba(10, 75, 151, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.vcHbotSend:disabled {
  cursor: default;
  opacity: 0.55;
  box-shadow: none;
}

.vcHbotEmojiPicker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 20px;
  background: #f8fbff;
  border: 1px solid rgba(16, 35, 60, 0.08);
}

.vcHbotEmojiBtn {
  border: 0;
  border-radius: 12px;
  padding: 8px 0;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.vcHbotState {
  display: none;
}

.vcHbotFootnote {
  display: none;
}

.vcHbotLauncher {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 132px;
  height: 132px;
  padding: 0 0 8px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  background: transparent;
  box-shadow: 0 24px 48px rgba(7, 39, 90, 0.2);
  transition: transform 220ms ease, box-shadow 220ms ease;
  overflow: visible;
}

.vcHbotLauncher::before {
  content: "";
  position: absolute;
  inset: 18px 10px 6px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(190, 228, 249, 0.9), rgba(126, 193, 234, 0.9));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7);
  z-index: 0;
  pointer-events: none;
}

.vcHbotLauncher::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 6px;
  height: 20px;
  border-radius: 50%;
  background: rgba(15, 79, 140, 0.14);
  filter: blur(10px);
  z-index: 1;
  pointer-events: none;
}

.vcHbotLauncher:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 56px rgba(7, 39, 90, 0.26);
}

.vcHbotLauncherIcon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  flex: 0 0 auto;
  overflow: visible;
  background: linear-gradient(180deg, #ffffff, #f4fbff);
  border: 4px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 10px rgba(195, 230, 250, 0.76), 0 18px 36px rgba(8, 43, 89, 0.2);
  z-index: 2;
}

.vcHbotLauncherIcon::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 36%, #ffffff 0%, #fbfeff 52%, #ebf7ff 100%);
  box-shadow: inset 0 -8px 18px rgba(171, 220, 246, 0.3);
  z-index: 0;
}

.vcHbotLauncher .vcHbotAvatarGlow {
  inset: 0;
  background: radial-gradient(circle, rgba(114, 211, 255, 0.38) 0%, rgba(114, 211, 255, 0) 72%);
  filter: blur(10px);
  z-index: 1;
}

.vcHbotLauncher .vcHbotAvatarImage--bot {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 168%;
  height: 168%;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(-50%);
  z-index: 2;
}

.vcHbotLauncherPing {
  position: absolute;
  top: 28px;
  right: 14px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ff5a6b;
  box-shadow: 0 0 0 6px rgba(255, 90, 107, 0.16);
  z-index: 3;
}

@keyframes vcHbotPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes vcHbotSweep {
  0%,
  16% {
    transform: translateX(-130%);
  }

  32%,
  100% {
    transform: translateX(130%);
  }
}

@media (max-width: 767px) {
  .vcHbot {
    --vc-hbot-edge-gap: 12px;
    --vc-hbot-panel-gap: 0px;
    --vc-hbot-launcher-size: 0px;
    left: 12px;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    align-items: stretch;
    z-index: 10030;
  }

  .vcHbotPanel {
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 124px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 124px - env(safe-area-inset-bottom));
    margin-bottom: 0;
    border-radius: 24px;
  }

  .vcHbotHead {
    gap: 12px;
    padding: 14px 14px 13px;
  }

  .vcHbotHeadMain {
    gap: 10px;
  }

  .vcHbotAvatar {
    width: 44px;
    height: 44px;
  }

  .vcHbotHeadEyebrow {
    padding: 4px 9px;
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .vcHbotHeadTitle {
    margin-top: 7px;
    font-size: 16px;
  }

  .vcHbotHeadMeta {
    font-size: 12px;
    line-height: 1.4;
  }

  .vcHbotClose {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .vcHbotLauncher {
    display: none;
  }

  .vcHbotMessages {
    min-height: 240px;
    padding: 14px 14px 12px;
  }

  .vcHbotComposer {
    padding: 10px 12px 14px;
  }

  .vcHbotInputShell {
    gap: 8px 10px;
    padding: 10px 12px;
  }

  .vcHbotInput {
    min-height: 44px;
  }

  .vcHbotBubble {
    max-width: 92%;
  }
}
