.nm-chatbot {
  position: fixed;
  left: max(16px, 3vw);
  bottom: max(16px, 3vw);
  z-index: 120;
  font-family: inherit;
  color: var(--text, #111);
}

.nm-chatbot__toggle {
  appearance: none;
  border: 1px solid var(--line, #e5e7eb);
  background: #111;
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
  transition: transform .12s ease, box-shadow .2s ease;
}
.nm-chatbot__toggle:hover { transform: translateY(-1px); }
.nm-chatbot__toggle:focus-visible { outline: 2px solid var(--focus, #0a84ff); outline-offset: 2px; }

.nm-chatbot__panel {
  position: absolute;
  left: 0;
  bottom: 58px;
  width: min(360px, 94vw);
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  overflow: hidden;
}
.nm-chatbot__panel[hidden] { display: none !important; }

.nm-chatbot__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: #f8fafc;
}
.nm-chatbot__title { margin: 0; font-weight: 800; font-size: 14px; }
.nm-chatbot__subtitle { margin: 2px 0 0; font-size: 12px; color: var(--muted, #6b7280); }
.nm-chatbot__close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #555;
}
.nm-chatbot__close:focus-visible { outline: 2px solid var(--focus, #0a84ff); outline-offset: 2px; }

.nm-chatbot__messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}

.nm-chatbot__message {
  display: flex;
  gap: 8px;
}
.nm-chatbot__message--assistant { justify-content: flex-start; }
.nm-chatbot__message--user { justify-content: flex-end; }

.nm-chatbot__bubble {
  max-width: 78%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.nm-chatbot__message--user .nm-chatbot__bubble {
  background: #111;
  color: #fff;
  border-color: #111;
}

.nm-chatbot__typing {
  padding: 0 12px 8px;
  font-size: 12px;
  color: var(--muted, #6b7280);
}

.nm-chatbot__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line, #e5e7eb);
  background: #fff;
}
.nm-chatbot__input {
  resize: none;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  min-height: 36px;
  font-family: inherit;
}
.nm-chatbot__input:focus { outline: 2px solid var(--focus, #0a84ff); outline-offset: 1px; }
.nm-chatbot__send {
  appearance: none;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}
.nm-chatbot__send:disabled { opacity: .6; cursor: not-allowed; }

.nm-chatbot__note {
  margin: 0;
  padding: 0 12px 12px;
  font-size: 11px;
  color: var(--muted, #6b7280);
}

@media (max-width: 640px) {
  .nm-chatbot {
    left: 12px;
    right: 12px;
  }
  .nm-chatbot__panel {
    left: 0;
    width: min(100%, 96vw);
  }
}
