/* ==========================================================================
   GGC Chatbot Widget Stylesheet (Racing Neon-Green & Deep Black Theme)
   ========================================================================== */

:root {
  --ggc-primary: #00ff66;
  --ggc-primary-hover: #10b981;
  --ggc-primary-glow: rgba(0, 255, 102, 0.4);
  --ggc-bg-dark: #0a0e14;
  --ggc-bg-panel: #111822;
  --ggc-bg-bubble-bot: #1a2332;
  --ggc-border: #233044;
  --ggc-text-main: #f3f4f6;
  --ggc-text-muted: #9ca3af;
  --ggc-accent-racing: #f59e0b;
  --ggc-radius: 16px;
  --ggc-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nova-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  font-family: var(--ggc-font);
  font-size: 14px;
  line-height: 1.5;
  box-sizing: border-box;
}

.nova-widget-container * {
  box-sizing: border-box;
}

/* Floating Action Button (Mascot / Racing Glow) */
.nova-fab-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a, #000000);
  color: var(--ggc-primary);
  border: 2px solid var(--ggc-primary);
  cursor: pointer;
  box-shadow: 0 0 20px var(--ggc-primary-glow), 0 8px 16px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
  outline: none;
  position: relative;
}

.nova-fab-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 28px rgba(0, 255, 102, 0.7), 0 10px 22px rgba(0, 0, 0, 0.8);
}

.nova-fab-btn:active {
  transform: scale(0.95);
}

.nova-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background-color: var(--ggc-primary);
  border: 2.5px solid #0a0e14;
  border-radius: 50%;
  box-shadow: 0 0 8px var(--ggc-primary);
}

.nova-fab-icon-open,
.nova-fab-icon-close {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nova-fab-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.7);
}

.nova-widget-open .nova-fab-icon-open {
  opacity: 0;
  transform: rotate(90deg) scale(0.7);
}

.nova-widget-open .nova-fab-icon-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Chat Modal Window */
.nova-chat-window {
  position: absolute;
  bottom: 78px;
  right: 0;
  width: 390px;
  height: 590px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px);
  background: var(--ggc-bg-panel);
  border: 1px solid var(--ggc-border);
  border-radius: var(--ggc-radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 255, 102, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s;
}

.nova-widget-open .nova-chat-window {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Header */
.nova-chat-header {
  background: linear-gradient(135deg, #090d14, #141d2b);
  color: #ffffff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ggc-border);
  position: relative;
}

.nova-chat-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ggc-primary), transparent);
}

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

.nova-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #000000;
  border: 1.5px solid var(--ggc-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 10px var(--ggc-primary-glow);
  flex-shrink: 0;
}

.nova-header-titles {
  display: flex;
  flex-direction: column;
}

.nova-bot-name {
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.nova-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ggc-primary);
}

.nova-status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--ggc-primary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--ggc-primary);
}

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

.nova-header-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ggc-text-main);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.nova-header-btn:hover {
  background: rgba(0, 255, 102, 0.15);
  color: var(--ggc-primary);
  border-color: var(--ggc-primary);
}

/* Messages List */
.nova-chat-messages {
  flex: 1;
  padding: 18px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--ggc-bg-dark);
  scroll-behavior: smooth;
}

/* Welcome Card */
.nova-welcome-card {
  background: var(--ggc-bg-panel);
  border: 1px solid var(--ggc-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-align: left;
}

.nova-welcome-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ggc-primary);
  margin-bottom: 6px;
}

.nova-welcome-text {
  font-size: 13px;
  color: var(--ggc-text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.nova-faq-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nova-faq-pill {
  background: rgba(0, 255, 102, 0.08);
  color: #a7f3d0;
  border: 1px solid rgba(0, 255, 102, 0.25);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.nova-faq-pill:hover {
  background: var(--ggc-primary);
  color: #000000;
  font-weight: 600;
  transform: translateY(-1px);
  box-shadow: 0 0 10px var(--ggc-primary-glow);
}

/* Message Bubbles */
.nova-msg-group {
  display: flex;
  flex-direction: column;
  max-width: 86%;
}

.nova-msg-group.user {
  align-self: flex-end;
  align-items: flex-end;
}

.nova-msg-group.bot {
  align-self: flex-start;
  align-items: flex-start;
}

.nova-bubble {
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
}

.nova-msg-group.user .nova-bubble {
  background: linear-gradient(135deg, #059669, #00ff66);
  color: #000000;
  font-weight: 500;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 255, 102, 0.25);
}

.nova-msg-group.bot .nova-bubble {
  background: var(--ggc-bg-bubble-bot);
  color: var(--ggc-text-main);
  border: 1px solid var(--ggc-border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nova-bubble p {
  margin: 0 0 8px 0;
}
.nova-bubble p:last-child {
  margin-bottom: 0;
}

.nova-bubble ul, .nova-bubble ol {
  margin: 6px 0 6px 18px;
  padding: 0;
}

.nova-bubble li {
  margin-bottom: 4px;
}

.nova-bubble strong {
  font-weight: 700;
  color: #ffffff;
}

.nova-msg-group.user .nova-bubble strong {
  color: #000000;
}

.nova-bubble a {
  color: var(--ggc-primary);
  text-decoration: underline;
}

.nova-msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--ggc-text-muted);
}

.nova-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: #a7f3d0;
  margin-top: 5px;
}

/* Typing Indicator */
.nova-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: var(--ggc-bg-bubble-bot);
  border: 1px solid var(--ggc-border);
  border-radius: 14px;
  width: fit-content;
  border-bottom-left-radius: 4px;
}

.nova-dot {
  width: 6px;
  height: 6px;
  background: var(--ggc-primary);
  border-radius: 50%;
  animation: ggcBounce 1.3s infinite ease-in-out;
}

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

@keyframes ggcBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.2); opacity: 1; }
}

/* Input Area */
.nova-chat-footer {
  background: var(--ggc-bg-panel);
  border-top: 1px solid var(--ggc-border);
  padding: 12px 14px;
}

.nova-input-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--ggc-bg-dark);
  border: 1px solid var(--ggc-border);
  border-radius: 22px;
  padding: 6px 10px 6px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nova-input-form:focus-within {
  border-color: var(--ggc-primary);
  box-shadow: 0 0 10px var(--ggc-primary-glow);
}

.nova-chat-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.4;
  resize: none;
  max-height: 90px;
  padding: 4px 0;
  outline: none;
  color: #ffffff;
}

.nova-chat-input::placeholder {
  color: #6b7280;
}

.nova-send-btn {
  background: var(--ggc-primary);
  color: #000000;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
  font-weight: 700;
}

.nova-send-btn:disabled {
  background: #374151;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}

.nova-send-btn:not(:disabled):hover {
  background: #22c55e;
  transform: scale(1.08);
  box-shadow: 0 0 10px var(--ggc-primary);
}

.nova-footer-brand {
  text-align: center;
  font-size: 11px;
  color: var(--ggc-text-muted);
  margin-top: 6px;
}

@media (max-width: 480px) {
  .nova-widget-container {
    bottom: 16px;
    right: 16px;
  }
  .nova-chat-window {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
}

:root{--ggc-primary:#baff27;--ggc-primary-hover:#d0ff75;--ggc-primary-glow:#baff2733;--ggc-bg-dark:#090b09;--ggc-bg-panel:#121611;--ggc-bg-bubble-bot:#1c2317;--ggc-border:#30372b}
#header-chat{background:transparent;border:1px solid var(--green);color:var(--green);font-size:12px;font-weight:700;padding:4px 12px;cursor:pointer;border-radius:3px}nav{align-items:center}.nova-chat-window[hidden]{display:none}.nova-chat-input{min-width:0}.nova-chat-header{background:#121611}.nova-msg-group.user .nova-bubble{background:#baff27}.nova-faq-pill{color:#d4f6a2;border-color:#baff2755}.nova-chat-messages{min-height:0}.nova-fab-icon-open{width:48px;height:48px;background:url('../assets/ggc-racing-frog.png') center/cover;border-radius:50%;font-size:0!important}.nova-widget-container button:focus-visible,.nova-chat-input:focus-visible{outline:2px solid #baff27;outline-offset:3px}@media(max-width:480px){.nova-chat-window{height:100dvh;max-height:100dvh}}@media(prefers-reduced-motion:reduce){.nova-widget-container *{animation:none!important;transition:none!important;scroll-behavior:auto}}
