/* Nova widget styles — moved verbatim from the Webflow custom-code embed. */

/* ── RESET SCOPE ── */
#nova-root * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* ── FLOATING BUTTON ── */
#nova-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 9998;
  width: 56px; height: 56px; border-radius: 50%;
  background: #ff6b35;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(255,107,53,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
#nova-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(255,107,53,0.55); }
#nova-fab .icon-chat { color: white; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; line-height: 1; }
#nova-fab svg { width: 24px; height: 24px; fill: white; transition: opacity 0.2s; }
#nova-fab .icon-close { display: none; }
#nova-fab.open .icon-chat { display: none; }
#nova-fab.open .icon-close { display: block; }

/* ── PANEL ── */
#nova-panel {
  position: fixed; bottom: 96px; right: 28px; z-index: 9999;
  width: 360px; height: 520px;
  background: #0f1117;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  display: flex; flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#nova-panel.open {
  opacity: 1; pointer-events: all;
  transform: translateY(0) scale(1);
}

/* ── HEADER ── */
#nova-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: #161920;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
#nova-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,107,53,0.15);
  border: 1px solid rgba(255,107,53,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0; color: #fff;
}
#nova-header-text { flex: 1; }
#nova-header-name { font-size: 0.875rem; font-weight: 700; color: #fff; line-height: 1.2; }
#nova-header-sub {
  font-size: 0.7rem; color: rgba(255,255,255,0.45); display: flex;
  align-items: center; gap: 4px; margin-top: 1px;
}
.nova-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
  animation: nova-pulse 2s infinite;
}
@keyframes nova-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── MESSAGES ── */
#nova-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
#nova-messages::-webkit-scrollbar { width: 4px; }
#nova-messages::-webkit-scrollbar-track { background: transparent; }
#nova-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.nova-msg { display: flex; gap: 8px; align-items: flex-end; }
.nova-msg.user { flex-direction: row-reverse; }

.nova-msg-av {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff;
  background: rgba(255,107,53,0.12); border: 1px solid rgba(255,107,53,0.25);
}
.nova-msg.user .nova-msg-av { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }

.nova-bubble {
  max-width: 78%; padding: 10px 13px;
  font-size: 0.825rem; line-height: 1.6; color: rgba(255,255,255,0.88);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px 12px 12px 3px;
}
.nova-msg.user .nova-bubble {
  background: rgba(255,107,53,0.15);
  border-color: rgba(255,107,53,0.25);
  border-radius: 12px 12px 3px 12px;
  color: #fff;
}

/* ── TYPING ── */
.nova-typing { display: flex; gap: 4px; align-items: center; padding: 4px 2px; }
.nova-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.35);
  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)} 30%{transform:translateY(-5px)} }

/* ── SUGGESTED QUESTIONS ── */
#nova-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; flex-shrink: 0; }
.nova-sq {
  font-size: 0.7rem; padding: 5px 10px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.45);
  background: transparent; cursor: pointer; font-family: inherit;
  transition: all 0.18s; white-space: nowrap;
}
.nova-sq:hover { border-color: #ff6b35; color: #ff6b35; }

/* ── INPUT AREA ── */
#nova-input-area {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0; background: #0f1117;
}
#nova-input-row { display: flex; gap: 8px; align-items: flex-end; }
#nova-input {
  flex: 1; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  color: #fff; font-size: 0.825rem; padding: 9px 12px;
  resize: none; outline: none; line-height: 1.5;
  font-family: inherit; max-height: 100px; overflow-y: auto;
  transition: border-color 0.2s;
}
#nova-input:focus { border-color: rgba(255,107,53,0.5); }
#nova-input::placeholder { color: rgba(255,255,255,0.25); }
#nova-send {
  width: 34px; height: 34px; border-radius: 8px; border: none;
  background: #ff6b35; color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.2s, transform 0.15s;
}
#nova-send:hover { background: #e55a2b; transform: scale(1.05); }
#nova-send:disabled { background: rgba(255,255,255,0.1); cursor: not-allowed; transform: none; }
#nova-send svg { width: 15px; height: 15px; fill: white; }
#nova-disclaimer {
  text-align: center; font-size: 0.63rem;
  color: rgba(255,255,255,0.75); margin-top: 8px;
  line-height: 1.4; padding: 0 2px;
}

/* ── MOBILE ── */
@media (max-width: 480px) {
  #nova-panel { width: calc(100vw - 24px); right: 12px; bottom: 88px; height: 70vh; }
  #nova-fab { bottom: 20px; right: 16px; }
}
