/* ============================================================
   NOVA - Enterprise Senior Technical Consultant & AI Advisor
   Bonita Technologica Modular Component
   ============================================================ */

#nova-widget-root {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999999;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
}

/* --- Floating Teaser Banner --- */
.nova-teaser {
  position: absolute;
  bottom: 0;
  right: 76px;
  background: rgba(26, 26, 26, 0.96);
  border: 1px solid rgba(212, 175, 55, 0.4);
  backdrop-filter: blur(12px);
  padding: 10px 16px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  animation: novaSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes novaSlideIn {
  from { opacity: 0; transform: translateX(15px); }
  to { opacity: 1; transform: translateX(0); }
}

.nova-status-dot {
  width: 9px;
  height: 9px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: novaPulse 2s infinite;
}

@keyframes novaPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.nova-teaser-content {
  display: flex;
  flex-direction: column;
}

.nova-teaser-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #d4af37;
  letter-spacing: -0.01em;
}

.nova-teaser-sub {
  font-size: 0.72rem;
  color: #ffffff;
  font-weight: 500;
}

.nova-teaser-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.2s ease;
}

.nova-teaser-close:hover {
  color: #ffffff;
}

/* --- Launcher Circle with Animated Head & Moving Eyes --- */
.nova-launcher {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 2px solid #d4af37;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  position: relative;
}

.nova-launcher:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 18px 42px rgba(212, 175, 55, 0.3);
}

.nova-avatar-head {
  width: 38px;
  height: 38px;
  background: radial-gradient(circle, #2d2d2d 0%, #111111 100%);
  border: 1.5px solid #d4af37;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: novaFloat 3.5s ease-in-out infinite;
}

@keyframes novaFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(1.5deg); }
}

.nova-eyes {
  display: flex;
  gap: 7px;
  position: relative;
}

.nova-eye {
  width: 6px;
  height: 9px;
  background: #d4af37;
  border-radius: 50%;
  animation: novaBlink 4s infinite;
  transition: transform 0.1s ease-out;
}

@keyframes novaBlink {
  0%, 95%, 98% { transform: scaleY(1); }
  96.5% { transform: scaleY(0.1); }
}

/* --- Main Interactive Chat Window --- */
.nova-window {
  position: absolute;
  bottom: 78px;
  right: 0;
  width: 390px;
  max-width: calc(100vw - 40px);
  height: 580px;
  max-height: calc(100vh - 120px);
  background: #faf8f3;
  border: 1px solid rgba(26, 26, 26, 0.18);
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.95);
  transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.nova-window.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Chat Header */
.nova-header {
  background: #1a1a1a;
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #d4af37;
}

.nova-header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nova-header-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 2px;
}

.nova-header-status {
  font-size: 0.73rem;
  color: #d4af37;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nova-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nova-reset-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nova-reset-btn:hover {
  color: #d4af37;
}

.nova-close-window {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.nova-close-window:hover {
  color: #d4af37;
}

/* Chat Body Scroll Area */
.nova-body {
  flex: 1;
  padding: 20px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(180deg, #faf8f3 0%, #f3efe6 100%);
  scroll-behavior: smooth;
}

.nova-body::-webkit-scrollbar {
  width: 5px;
}
.nova-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

/* Chat Messages */
.nova-msg {
  max-width: 85%;
  padding: 13px 17px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.5;
  word-break: break-word;
  animation: msgPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes msgPop {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.nova-msg.bot {
  background: #ffffff;
  color: #1a1a1a;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(26, 26, 26, 0.08);
}

.nova-msg.user {
  background: #1a1a1a;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.nova-msg.bot strong {
  color: #1a1a1a;
}

.nova-msg.bot.nova-fallback {
  max-width: 92%;
  background: #fff5cf;
  border: 1px solid #d4af37;
  box-shadow: 0 5px 18px rgba(212, 175, 55, 0.2);
}

.nova-fallback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #1a1a1a;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.nova-fallback-link:hover,
.nova-fallback-link:focus-visible {
  background: #d4af37;
  color: #1a1a1a;
}

.nova-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.nova-fallback-actions .nova-fallback-link {
  margin-top: 0;
}

.nova-fallback-actions .nova-chip-btn {
  white-space: normal;
}

.nova-fallback-sources {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(26, 26, 26, 0.14);
}

.nova-fallback-sources a,
.nova-response-link {
  color: #80630b;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nova-fallback-sources p {
  margin: 0 0 5px;
  color: #514a37;
  font-size: 0.84em;
}

.nova-fallback-sources a:focus-visible,
.nova-response-link:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

.nova-enquiry-card {
  max-width: 92%;
  width: 100%;
}

.nova-enquiry-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.bt-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.bt-turnstile {
  margin: 0 0 8px;
}

.nova-enquiry-form label {
  display: grid;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 700;
}

.nova-enquiry-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(26, 26, 26, 0.22);
  border-radius: 10px;
  font: inherit;
}

.nova-enquiry-form input:focus {
  outline: 2px solid #d4af37;
  outline-offset: 1px;
}

.nova-enquiry-form p {
  margin: 0;
  font-size: 0.78rem;
}

.nova-enquiry-form button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.nova-enquiry-status {
  color: #8a261d;
}

/* Quick Action Chips */
.nova-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.nova-chip-btn {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid #d4af37;
  color: #1a1a1a;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nova-chip-btn:hover {
  background: #d4af37;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Input Form Container */
.nova-footer {
  padding: 14px 16px;
  background: #ffffff;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
}

.nova-input-form {
  display: flex;
  gap: 10px;
}

.nova-input-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(26, 26, 26, 0.2);
  border-radius: 14px;
  outline: none;
  font-size: 0.92rem;
  background: #fdfbf7;
  color: #1a1a1a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nova-input-form input:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.nova-send-button {
  background: #1a1a1a;
  color: #d4af37;
  border: 1px solid #1a1a1a;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nova-send-button:hover {
  background: #d4af37;
  color: #ffffff;
  border-color: #d4af37;
}

.nova-brand-footer {
  text-align: center;
  font-size: 0.68rem;
  color: #888888;
  margin-top: 8px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.nova-brand-footer strong {
  color: #1a1a1a;
}