/* ================================
   NLWeb + Bookworm Theme Overrides
   ================================ */

/* Container */
#docs-search-container {
  max-width: 720px;
  margin: 0 auto;
  font-family: inherit;
}

/* Input box */
.nlweb-search-input,
.nlweb-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(0, 0%, 85%);
  background-color: hsl(0, 0%, 100%);
  font-size: 1rem;
  color: hsl(0, 0%, 10%);
}

/* Input focus */
.nlweb-search-input:focus,
.nlweb-input:focus {
  outline: none;
  border-color: hsl(220, 90%, 55%);
  box-shadow: 0 0 0 2px hsla(220, 90%, 55%, 0.2);
}

/* Dropdown panel */
.nlweb-dropdown {
  margin-top: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(0, 0%, 85%);
  background-color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Result items */
.nlweb-result-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(0, 0%, 92%);
  transition: background 0.15s ease;
}

.nlweb-result-item:last-child {
  border-bottom: none;
}

.nlweb-result-item:hover {
  background-color: hsl(220, 90%, 96%);
}

/* Result title */
.nlweb-result-title {
  font-weight: 600;
  color: hsl(220, 90%, 40%);
}

/* Result description */
.nlweb-result-snippet {
  font-size: 0.875rem;
  color: hsl(0, 0%, 40%);
  margin-top: 0.25rem;
}

/* Chat bubble */
.nlweb-chat-bubble {
  border-radius: 0.75rem;
  background-color: hsl(0, 0%, 96%);
  color: hsl(0, 0%, 15%);
}

/* AI answer */
.nlweb-ai-answer {
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Links */
.nlweb-ai-answer a {
  color: hsl(220, 90%, 45%);
  text-decoration: underline;
}

/* Dark mode support (Bookworm respects prefers-color-scheme) */
@media (prefers-color-scheme: dark) {
  .nlweb-search-input,
  .nlweb-input {
    background-color: hsl(0, 0%, 10%);
    border-color: hsl(0, 0%, 25%);
    color: hsl(0, 0%, 90%);
  }

  .nlweb-dropdown {
    background-color: hsl(0, 0%, 12%);
    border-color: hsl(0, 0%, 25%);
  }

  .nlweb-result-item:hover {
    background-color: hsl(220, 90%, 20%);
  }

  .nlweb-result-snippet {
    color: hsl(0, 0%, 65%);
  }
}