/* ── Nova Chat Widget ─────────────────────────────── */

#nova-chat-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #E09F4F;
  border: none;
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(224,159,79,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

#nova-chat-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(224,159,79,0.55);
}

#nova-chat-btn::before {
  content: '';
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(224,159,79,0.5);
  animation: nova-pulse 2s ease-out infinite;
}

@keyframes nova-pulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(1.7); opacity: 0; }
}

#nova-chat-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 380px;
  height: 520px;
  background: #0D1420;
  border: 1px solid #1a2535;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s ease;
}

#nova-chat-panel.nova-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.nova-header {
  background: #080D14;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #1a2535;
  flex-shrink: 0;
}

.nova-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E09F4F, #c47e2e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nova-header-info {
  flex: 1;
}

.nova-header-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.nova-header-status {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  gap: 5px;
}

.nova-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}

.nova-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  line-height: 1;
  transition: color 0.15s;
}

.nova-close-btn:hover { color: #fff; }

/* Messages */
.nova-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.nova-messages::-webkit-scrollbar { width: 4px; }
.nova-messages::-webkit-scrollbar-track { background: transparent; }
.nova-messages::-webkit-scrollbar-thumb { background: #1a2535; border-radius: 2px; }

.nova-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 12px;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

.nova-msg--nova {
  background: #141c2e;
  color: rgba(255,255,255,0.9);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.nova-msg--user {
  background: rgba(224,159,79,0.12);
  border: 1px solid rgba(224,159,79,0.25);
  color: rgba(255,255,255,0.9);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.nova-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 14px;
  background: #141c2e;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  width: fit-content;
}

.nova-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  animation: nova-bounce 1.2s infinite;
}

.nova-typing span:nth-child(2) { animation-delay: 0.2s; }
.nova-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes nova-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* Input */
.nova-input-row {
  padding: 12px;
  border-top: 1px solid #1a2535;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  background: #0D1420;
}

.nova-input {
  flex: 1;
  background: #0a0f1a;
  border: 1px solid #1a2535;
  border-radius: 8px;
  padding: 9px 12px;
  color: #fff;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.nova-input::placeholder { color: rgba(255,255,255,0.25); }
.nova-input:focus { border-color: rgba(224,159,79,0.5); }

.nova-send-btn {
  background: #E09F4F;
  border: none;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}

.nova-send-btn:hover { background: #c47e2e; }
.nova-send-btn:active { transform: scale(0.93); }
.nova-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Lead captured success state */
.nova-success {
  padding: 20px 16px;
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
}

.nova-success-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.nova-success strong {
  display: block;
  color: #E09F4F;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  margin-bottom: 6px;
}

/* Mobile */
@media (max-width: 480px) {
  #nova-chat-panel {
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
    border: none;
  }

  #nova-chat-btn {
    bottom: 16px;
    right: 16px;
  }
}
