/* ND AI Lead Chatbot */
#nd-chat-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99998;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #FF0033;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(255,0,51,.45);
  transition: transform .3s, box-shadow .3s;
}
#nd-chat-btn:hover { transform: scale(1.1); box-shadow: 0 6px 32px rgba(255,0,51,.6); }
#nd-chat-btn svg { width: 28px; height: 28px; fill: #fff; }
#nd-chat-btn .nd-chat-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #fff;
  color: #FF0033;
  font-size: 10px;
  font-weight: 800;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: nd-pulse 2s infinite;
}
@keyframes nd-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.25)} }

#nd-chat-window {
  position: fixed;
  bottom: 100px;
  right: 28px;
  z-index: 99999;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  max-height: 80vh;
}
#nd-chat-window.nd-open { display: flex; animation: nd-slideup .3s ease; }
@keyframes nd-slideup { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

.nd-chat-header {
  background: linear-gradient(135deg, #FF0033, #cc0029);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nd-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.nd-chat-name { font-size: 15px; font-weight: 700; color: #fff; }
.nd-chat-status { font-size: 12px; color: rgba(255,255,255,.75); display: flex; align-items: center; gap: 5px; }
.nd-chat-dot { width: 7px; height: 7px; background: #4ade80; border-radius: 50%; animation: nd-pulse 2s infinite; }
#nd-chat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
#nd-chat-close:hover { color: #fff; }

.nd-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.nd-msg {
  max-width: 85%;
  font-size: 14px;
  line-height: 1.6;
  animation: nd-msgin .25s ease;
}
@keyframes nd-msgin { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
.nd-msg-bot { align-self: flex-start; }
.nd-msg-user { align-self: flex-end; }
.nd-msg-bot .nd-bubble {
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.08);
  color: #e0e0e0;
  padding: 10px 14px;
  border-radius: 4px 14px 14px 14px;
}
.nd-msg-user .nd-bubble {
  background: #FF0033;
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px 4px 14px 14px;
}
.nd-msg-time { font-size: 10px; color: #555; margin-top: 4px; }
.nd-msg-bot .nd-msg-time { text-align: left; }
.nd-msg-user .nd-msg-time { text-align: right; }

.nd-chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}
.nd-opt-btn {
  background: transparent;
  border: 1px solid rgba(255,0,51,.4);
  color: #FF0033;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.nd-opt-btn:hover { background: rgba(255,0,51,.1); border-color: #FF0033; }

.nd-chat-input-wrap {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 12px 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
#nd-chat-input {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  padding: 9px 13px;
  outline: none;
  font-family: inherit;
  transition: border-color .2s;
}
#nd-chat-input:focus { border-color: rgba(255,0,51,.5); }
#nd-chat-input::placeholder { color: #555; }
#nd-chat-send {
  background: #FF0033;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
#nd-chat-send:hover { background: #cc0029; }
#nd-chat-send svg { width: 18px; height: 18px; fill: #fff; }

.nd-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px 14px 14px 14px;
  width: fit-content;
}
.nd-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #555;
  animation: nd-bounce .8s infinite;
}
.nd-typing span:nth-child(2) { animation-delay: .15s; }
.nd-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes nd-bounce { 0%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-6px);background:#FF0033} }

.nd-chat-form {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.nd-chat-form input {
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  padding: 10px 13px;
  outline: none;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .2s;
}
.nd-chat-form input:focus { border-color: rgba(255,0,51,.5); }
.nd-chat-form input::placeholder { color: #555; }
.nd-form-submit {
  background: #FF0033;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.nd-form-submit:hover { background: #cc0029; }
.nd-form-submit:disabled { background: #555; cursor: not-allowed; }
.nd-privacy { font-size: 11px; color: #444; text-align: center; }

@media (max-width: 480px) {
  #nd-chat-window { bottom: 80px; right: 12px; width: calc(100vw - 24px); }
  #nd-chat-btn { bottom: 18px; right: 16px; width: 54px; height: 54px; }
}
