.chatbox {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 340px;
  max-width: calc(100vw - 40px);
  z-index: 1050;
  font-family: var(--nv-font, "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  transition: box-shadow .25s ease, opacity .2s ease, transform .2s ease;
}

.chatbox:hover {
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.4);
}

.chatbox .chat-header {
  background: linear-gradient(135deg, #15803d, #22c55e);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chatbox .chat-header div:first-child {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.chatbox .chat-header small {
  font-size: 11px;
  opacity: .9;
}

.chatbox .chat-header i {
  background: rgba(255, 255, 255, .18);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
}

.chatbox .chat-body {
  background: radial-gradient(circle at top left, #f9fafb, #e9f5ee);
  border: 1px solid rgba(15, 23, 42, .04);
  border-top: 0;
}

.chatbox .chat-messages {
  height: 260px;
  overflow-y: auto;
  padding: 12px 14px 10px;
}

.chatbox .msg {
  margin-bottom: 10px;
  display: flex;
}

.chatbox .msg.user {
  justify-content: flex-end;
}

.chatbox .msg.bot {
  justify-content: flex-start;
}

.chatbox .bubble {
  max-width: 85%;
  padding: 8px 11px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.chatbox .msg.user .bubble {
  background: linear-gradient(135deg, #15803d, #22c55e);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chatbox .msg.bot .bubble {
  background: #ffffff;
  color: #111827;
  border: 1px solid rgba(15, 23, 42, .06);
  border-bottom-left-radius: 4px;
}

.chatbox .chat-input {
  display: flex;
  gap: 8px;
  padding: 10px 10px 12px;
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid rgba(15, 23, 42, .06);
}

.chatbox .chat-input input {
  flex: 1;
  border-radius: 999px;
  border-color: rgba(148, 163, 184, .8);
  font-size: 13px;
}

.chatbox .chat-input input:focus {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, .4);
  border-color: #16a34a;
}

.chatbox #chatSend.btn {
  border-radius: 999px;
  padding-inline: 18px;
  font-weight: 600;
  font-size: 13px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: #16a34a;
}

.chatbox #chatSend.btn:hover {
  filter: brightness(1.03);
}

.chatbox.collapsed .chat-body {
  display: none;
}

@media (max-width: 576px) {
  .chatbox {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }
}

