.nv-chat-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #4051b5;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, background .15s;
}
.nv-chat-btn:hover {
  transform: scale(1.08);
  background: #3545a0;
}
.nv-chat-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.nv-chat-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 360px;
  max-height: min(480px, calc(100vh - 120px));
  background: var(--md-default-bg-color, #fff);
  border: 1px solid var(--md-default-fg-color--lightest, #ddd);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--md-text-font-family, "Inter", sans-serif);
}
.nv-chat-panel.open { display: flex; }

.nv-chat-header {
  padding: 14px 16px;
  background: #4051b5;
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nv-chat-header svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.nv-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  max-height: 320px;
}

.nv-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: .8rem;
  line-height: 1.4;
  word-wrap: break-word;
}
.nv-msg.bot {
  align-self: flex-start;
  background: var(--md-code-bg-color, #f5f5f5);
  color: var(--md-default-fg-color, #333);
  border-bottom-left-radius: 4px;
}
.nv-msg.user {
  align-self: flex-end;
  background: #4051b5;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.nv-msg.typing {
  font-style: italic;
  opacity: .6;
}

.nv-chat-input {
  display: flex;
  border-top: 1px solid var(--md-default-fg-color--lightest, #ddd);
  padding: 8px;
  gap: 8px;
}
.nv-chat-input input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--md-default-fg-color--lightest, #ccc);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: .88rem;
  background: var(--md-default-bg-color, #fff);
  color: var(--md-default-fg-color, #333);
  outline: none;
  font-family: inherit;
}
.nv-chat-input input:focus {
  border-color: #4051b5;
}
.nv-chat-input button {
  background: #4051b5;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: .85rem;
  flex-shrink: 0;
  transition: background .15s;
}
.nv-chat-input button:hover {
  background: #3545a0;
}
.nv-chat-input button:disabled {
  opacity: .5;
  cursor: not-allowed;
}
