/* ============================================================
   BIBLE Q&A — Plugin Stylesheet
   Sections:
     1. Search form + results
     2. Author / Source / Citation
     3. Single question page (aggressive overrides for Twenty Twenty-One)
     4. Topic archive page
     5. Author / Source archive additions
     6. Breadcrumbs
     7. Autocomplete dropdown
     8. Search UX — hint and empty states
   ============================================================ */


/* ============================================================
   1. SEARCH FORM + RESULTS
   ============================================================ */

.bqa-search-wrap {
  max-width: 700px;
  margin: 1.5rem auto;
  font-family: inherit;
}

.bqa-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

.bqa-input:focus {
  border-color: #4a7c59;
}

.bqa-results {
  margin-top: 0.75rem;
}

.bqa-result {
  display: block;
  padding: 12px 16px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.bqa-result:hover {
  background: #f7faf8;
}

.bqa-result h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #2c5f3f;
}

.bqa-result p {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}

.bqa-loading,
.bqa-empty {
  color: #888;
  font-style: italic;
  padding: 0.5rem 0;
}

.bqa-error {
  color: #b32d2e;
}


/* ============================================================
   2. AUTHOR / SOURCE / CITATION
   ============================================================ */

.bqa-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1em 0 1.5em;
  padding: 12px;
  background: #f7faf8;
  border-radius: 8px;
}

.bqa-author-avatar {
  border-radius: 50%;
  flex-shrink: 0;
}

.bqa-author-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 1em 0 1.5em;
  padding: 12px 16px;
  background: #f4f8f5;
  border-left: 3px solid #4a7c59;
  border-radius: 6px;
  font-size: 0.95em;
  line-height: 1.55;
  color: #444;
}

.bqa-author-name {
  color: #333;
}

.bqa-author-name strong {
  color: #2c5f3f;
}

html body .bqa-single-wrap .bqa-author-avatar-inline {
  border-radius: 50% !important;
  vertical-align: middle !important;
  margin-right: 8px !important;
  display: inline-block !important;
}

html body .bqa-single-wrap .bqa-author-info--source-only {
  background: #f4f8f5 !important;
  border-left: 3px solid #4a7c59 !important;
  padding: 12px 16px !important;
  margin: 1rem 0 !important;
  border-radius: 6px !important;
  font-size: 0.95em !important;
  color: #444 !important;
}

.bqa-author-bio {
  color: #666;
  font-size: 0.9em;
}

.bqa-source-line {
  color: #555;
  font-size: 0.95em;
}

.bqa-source-line em {
  font-style: italic;
  color: #2c5f3f;
}

.bqa-source-line a {
  color: #4a7c59;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bqa-citation {
  margin: 1.5em 0;
  padding: 12px 16px;
  border-left: 3px solid #4a7c59;
  background: #f7faf8;
  font-size: 0.95em;
  color: #333;
}

.bqa-citation em {
  font-style: italic;
}


/* ============================================================
   3. SINGLE QUESTION PAGE
   Aggressive overrides to beat Twenty Twenty-One's
   global resets (max-width unset, margin/padding zeroed).
   ============================================================ */

/* Main wrapper */
html body main#bqa-single.bqa-single-wrap,
html body .bqa-single-wrap {
  max-width: 760px !important;
  margin: 2rem auto 4rem !important;
  padding: 0 1.25rem !important;
  display: block !important;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif !important;
  color: #1f2933 !important;
  font-size: 17px !important;
  line-height: 1.7 !important;
  background: transparent !important;
}

/* Neutralize theme's "max-width: unset" on all children */
html body .bqa-single-wrap,
html body .bqa-single-wrap *,
html body .bqa-single-wrap *::before,
html body .bqa-single-wrap *::after {
  max-width: none;
}

/* Re-apply width where needed */
html body .bqa-single-wrap .bqa-question,
html body .bqa-single-wrap .bqa-answer,
html body .bqa-single-wrap .bqa-author-info,
html body .bqa-single-wrap .bqa-related,
html body .bqa-single-wrap .bqa-single-footer,
html body .bqa-single-wrap .bqa-terms {
  max-width: 100% !important;
}

/* Question heading */
html body .bqa-single-wrap h1.bqa-question {
  font-size: clamp(1.6rem, 3vw, 2.1rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #1a2b22 !important;
  letter-spacing: -0.01em !important;
  margin: 0 0 1rem !important;
  padding: 0 !important;
  clear: none !important;
}

/* Answer body */
html body .bqa-single-wrap .bqa-answer {
  margin: 2rem 0 !important;
  padding: 0 !important;
  font-size: 1.02em !important;
  line-height: 1.75 !important;
  color: #222 !important;
}

html body .bqa-single-wrap .bqa-answer p {
  margin: 0 0 1.2em !important;
  padding: 0 !important;
}

html body .bqa-single-wrap .bqa-answer p:last-child {
  margin-bottom: 0 !important;
}

html body .bqa-single-wrap .bqa-answer strong {
  color: #1a2b22 !important;
  font-weight: 600 !important;
}

html body .bqa-single-wrap .bqa-answer em,
html body .bqa-single-wrap .bqa-answer i {
  font-style: italic !important;
}

html body .bqa-single-wrap .bqa-answer blockquote {
  margin: 1.5em 0 !important;
  padding: 0.5em 0 0.5em 1.25em !important;
  border-left: 3px solid #cbd8cf !important;
  color: #555 !important;
  font-style: italic !important;
  background: transparent !important;
}

html body .bqa-single-wrap .bqa-answer ul,
html body .bqa-single-wrap .bqa-answer ol {
  margin: 0 0 1.2em 1.4em !important;
  padding: 0 !important;
  list-style-position: outside !important;
}

html body .bqa-single-wrap .bqa-answer ul {
  list-style-type: disc !important;
}

html body .bqa-single-wrap .bqa-answer ol {
  list-style-type: decimal !important;
}

html body .bqa-single-wrap .bqa-answer li {
  margin: 0 0 0.4em !important;
  padding: 0 !important;
  display: list-item !important;
}

html body .bqa-single-wrap .bqa-answer a {
  color: #4a7c59 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

/* Scripture refs */
html body .bqa-single-wrap .bqa-scripture-refs {
  margin: 0.75rem 0 !important;
  font-size: 0.95em !important;
  color: #444 !important;
}

html body .bqa-single-wrap .bqa-label {
  font-weight: 600 !important;
  color: #2c5f3f !important;
  margin-right: 4px !important;
}

/* Terms chips */
html body .bqa-single-wrap .bqa-terms {
  list-style: none !important;
  padding: 0 !important;
  margin: 0.75rem 0 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

html body .bqa-single-wrap .bqa-terms li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  display: inline-block !important;
}

html body .bqa-single-wrap .bqa-terms a {
  display: inline-block !important;
  padding: 4px 10px !important;
  background: #e8f1eb !important;
  color: #2c5f3f !important;
  font-size: 0.85em !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  border: none !important;
}

html body .bqa-single-wrap .bqa-terms a:hover {
  background: #d5e6da !important;
}

/* Footer meta */
html body .bqa-single-wrap .bqa-single-footer {
  margin-top: 2.5rem !important;
  margin-bottom: 0 !important;
  padding-top: 1rem !important;
  border-top: 1px solid #e5ebe6 !important;
}

html body .bqa-single-wrap .bqa-meta {
  font-size: 0.85em !important;
  color: #7a8a80 !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body .bqa-single-wrap .bqa-sep {
  margin: 0 8px !important;
  color: #c0ccc4 !important;
}

/* Related questions */
html body .bqa-single-wrap .bqa-related {
  margin: 3rem 0 0 !important;
  padding: 1.25rem 1.5rem !important;
  background: #fafcfb !important;
  border: 1px solid #e5ebe6 !important;
  border-radius: 8px !important;
}

html body .bqa-single-wrap .bqa-related-title,
html body .bqa-single-wrap .bqa-related h2 {
  font-size: 1.05em !important;
  font-weight: 600 !important;
  color: #2c5f3f !important;
  margin: 0 0 0.75rem !important;
  padding: 0 !important;
  letter-spacing: 0.01em !important;
  clear: none !important;
}

html body .bqa-single-wrap .bqa-related ul,
html body .bqa-single-wrap .bqa-related-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

html body .bqa-single-wrap .bqa-related li,
html body .bqa-single-wrap .bqa-related-list li {
  margin: 0 !important;
  padding: 8px 0 !important;
  border-bottom: 1px solid #eef3ef !important;
  list-style: none !important;
  display: block !important;
}

html body .bqa-single-wrap .bqa-related li:last-child,
html body .bqa-single-wrap .bqa-related-list li:last-child {
  border-bottom: none !important;
}

html body .bqa-single-wrap .bqa-related a,
html body .bqa-single-wrap .bqa-related-list a {
  color: #2c5f3f !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

html body .bqa-single-wrap .bqa-related a:hover,
html body .bqa-single-wrap .bqa-related-list a:hover {
  color: #4a7c59 !important;
  text-decoration: underline !important;
}

/* Back link */
html body .bqa-single-wrap .bqa-back {
  margin: 2rem 0 0 !important;
  padding: 0 !important;
  font-size: 0.95em !important;
}

html body .bqa-single-wrap .bqa-back a {
  color: #4a7c59 !important;
  text-decoration: none !important;
}

html body .bqa-single-wrap .bqa-back a:hover {
  text-decoration: underline !important;
}

/* Responsive */
@media (max-width: 640px) {
  html body .bqa-single-wrap {
    padding: 0 1rem !important;
    font-size: 16px !important;
  }

  html body .bqa-single-wrap h1.bqa-question {
    font-size: 1.5rem !important;
  }

  html body .bqa-single-wrap .bqa-related {
    padding: 1rem !important;
  }
}


/* ============================================================
   4. TOPIC ARCHIVE PAGE
   ============================================================ */

html body .bqa-single-wrap .bqa-topic-eyebrow {
  margin: 0 0 0.25rem !important;
  padding: 0 !important;
  font-size: 0.85em !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #7a8a80 !important;
}

html body .bqa-single-wrap .bqa-topic-count {
  margin: 0.25rem 0 0 !important;
  padding: 0 !important;
  font-size: 0.9em !important;
  color: #7a8a80 !important;
}

html body .bqa-single-wrap .bqa-archive-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 2rem 0 0 !important;
}

html body .bqa-single-wrap .bqa-archive-item {
  list-style: none !important;
  padding: 1.25rem 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid #e5ebe6 !important;
}

html body .bqa-single-wrap .bqa-archive-item:first-child {
  border-top: 1px solid #e5ebe6 !important;
}

html body .bqa-single-wrap .bqa-archive-question {
  margin: 0 0 0.5rem !important;
  padding: 0 !important;
  font-size: 1.15em !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: #1a2b22 !important;
  clear: none !important;
}

html body .bqa-single-wrap .bqa-archive-question a {
  color: #2c5f3f !important;
  text-decoration: none !important;
}

html body .bqa-single-wrap .bqa-archive-question a:hover {
  color: #4a7c59 !important;
  text-decoration: underline !important;
}

html body .bqa-single-wrap .bqa-archive-excerpt {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.95em !important;
  color: #555 !important;
  line-height: 1.6 !important;
}

html body .bqa-single-wrap .bqa-pagination {
  margin: 2rem 0 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

html body .bqa-single-wrap .bqa-pagination a,
html body .bqa-single-wrap .bqa-pagination span {
  display: inline-block !important;
  padding: 6px 12px !important;
  margin: 0 4px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  color: #2c5f3f !important;
}

html body .bqa-single-wrap .bqa-pagination .current {
  background: #4a7c59 !important;
  color: #fff !important;
  font-weight: 600 !important;
}

html body .bqa-single-wrap .bqa-pagination a:hover {
  background: #e8f1eb !important;
}


/* ============================================================
   5. AUTHOR / SOURCE ARCHIVE ADDITIONS
   ============================================================ */

html body .bqa-single-wrap .bqa-author-archive-avatar {
  margin: 1rem 0 0.75rem !important;
  padding: 0 !important;
}

html body .bqa-single-wrap .bqa-author-archive-avatar img {
  border-radius: 50% !important;
  display: block !important;
}

html body .bqa-single-wrap .bqa-author-archive-bio {
  margin: 0.5rem 0 1rem !important;
  padding: 0 !important;
  font-size: 0.95em !important;
  color: #555 !important;
  line-height: 1.6 !important;
}

html body .bqa-single-wrap .bqa-source-archive-citation {
  margin: 1rem 0 0.25rem !important;
  padding: 0 !important;
  font-size: 1em !important;
  color: #333 !important;
  line-height: 1.6 !important;
}

html body .bqa-single-wrap .bqa-source-archive-citation em {
  font-style: italic !important;
  color: #2c5f3f !important;
}

html body .bqa-single-wrap .bqa-source-archive-citation a {
  color: #2c5f3f !important;
  text-decoration: none !important;
}

html body .bqa-single-wrap .bqa-source-archive-citation a:hover {
  text-decoration: underline !important;
}

html body .bqa-single-wrap .bqa-source-archive-url {
  margin: 0.25rem 0 0.75rem !important;
  padding: 0 !important;
  font-size: 0.9em !important;
}

html body .bqa-single-wrap .bqa-source-archive-url a {
  color: #4a7c59 !important;
  text-decoration: none !important;
}

html body .bqa-single-wrap .bqa-source-archive-url a:hover {
  text-decoration: underline !important;
}

/* Author name link inside the citation card on single-QA pages */
html body .bqa-single-wrap .bqa-author-name a {
  color: #2c5f3f !important;
  text-decoration: none !important;
}

html body .bqa-single-wrap .bqa-author-name a:hover {
  text-decoration: underline !important;
}


/* ============================================================
   6. BREADCRUMBS
   ============================================================ */

html body .bqa-single-wrap .bqa-breadcrumbs {
  margin: 0 0 1.5rem !important;
  padding: 0 !important;
  font-size: 0.85em !important;
  color: #7a8a80 !important;
  line-height: 1.5 !important;
}

html body .bqa-single-wrap .bqa-breadcrumbs-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 0 !important;
}

html body .bqa-single-wrap .bqa-breadcrumb-item {
  display: inline-flex !important;
  align-items: baseline !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

html body .bqa-single-wrap .bqa-breadcrumb-item a {
  color: #4a7c59 !important;
  text-decoration: none !important;
}

html body .bqa-single-wrap .bqa-breadcrumb-item a:hover {
  text-decoration: underline !important;
}

html body .bqa-single-wrap .bqa-breadcrumb-sep {
  margin: 0 0.5rem !important;
  color: #c0ccc4 !important;
  display: inline-block !important;
}

html body .bqa-single-wrap .bqa-breadcrumb-current span {
  color: #555 !important;
  font-weight: 500 !important;
}

/* Truncate very long question text in the last crumb on small screens */
@media (max-width: 640px) {
  html body .bqa-single-wrap .bqa-breadcrumb-current span {
    max-width: 200px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
    vertical-align: bottom !important;
  }
}

/* Different accents for author/source related blocks */
html body .bqa-single-wrap .bqa-related-author {
  border-left: 3px solid #4a7c59 !important;
}

html body .bqa-single-wrap .bqa-related-source {
  border-left: 3px solid #8a6d3b !important;
}


/* ============================================================
   7. AUTOCOMPLETE DROPDOWN
   ============================================================ */

.bqa-search-input-wrap {
  position: relative;   /* anchors the dropdown under the input only */
  display: block;
}

.bqa-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
}

.bqa-suggest-item {
  display: block;
  padding: 10px 14px;
  color: #1f2933;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
  cursor: pointer;
  border-bottom: 1px solid #f1f4f2;
}

.bqa-suggest-item:last-child {
  border-bottom: none;
}

.bqa-suggest-item:hover,
.bqa-suggest-active {
  background: #f4f8f5;
  color: #2c5f3f;
}

.bqa-suggest-item.bqa-suggest-active {
  background: #e8f1eb;
}

.bqa-suggest-empty {
  padding: 10px 14px;
  color: #999;
  font-style: italic;
  font-size: 0.9rem;
}


/* ============================================================
   8. SEARCH UX — hint and empty states
   ============================================================ */

html body .bqa-search-wrap p.bqa-hint,
html body p.bqa-hint {
  color: #7a8a80 !important;
  font-style: italic !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
  margin: 0.75rem 0 0.5rem !important;
  padding: 0 !important;
  font-family: inherit !important;
}

html body .bqa-search-wrap p.bqa-empty,
html body p.bqa-empty {
  color: #999 !important;
  font-style: italic !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  margin: 0.75rem 0 0.5rem !important;
  padding: 0 !important;
}

html body .bqa-search-wrap p.bqa-loading,
html body p.bqa-loading {
  color: #999 !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  margin: 0.75rem 0 0.5rem !important;
  padding: 0 !important;
}

html body .bqa-search-wrap p.bqa-error,
html body p.bqa-error {
  color: #b32d2e !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  margin: 0.75rem 0 0.5rem !important;
  padding: 0 !important;
}

/* Search result cards */
html body .bqa-search-wrap .bqa-result,
html body .bqa-result {
  display: block !important;
  padding: 14px 16px !important;
  border: 1px solid #e5ebe6 !important;
  border-radius: 8px !important;
  margin-bottom: 8px !important;
  text-decoration: none !important;
  color: #1f2933 !important;
  background: #fff !important;
  transition:
    background 0.15s,
    border-color 0.15s !important;
}

html body .bqa-result:hover {
  background: #f7faf8 !important;
  border-color: #cbd8cf !important;
}

html body .bqa-search-wrap .bqa-result h4,
html body .bqa-result h4 {
  margin: 0 0 6px !important;
  padding: 0 !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: #2c5f3f !important;
  letter-spacing: 0 !important;
  clear: none !important;
}

html body .bqa-search-wrap .bqa-result p,
html body .bqa-result p {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: #555 !important;
  letter-spacing: 0 !important;
}

/* Search input */
html body .bqa-search-wrap .bqa-input,
html body input.bqa-input {
  width: 100% !important;
  padding: 12px 16px !important;
  font-size: 1rem !important;
  font-family: inherit !important;
  line-height: 1.4 !important;
  border: 2px solid #ddd !important;
  border-radius: 8px !important;
  outline: none !important;
  background: #fff !important;
  color: #1f2933 !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s !important;
}

html body input.bqa-input:focus {
  border-color: #4a7c59 !important;
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.12) !important;
}

/* Featured image on single Q&A */
html body .bqa-single-wrap .bqa-featured-image {
  margin: 1.5rem 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

html body .bqa-single-wrap .bqa-featured-image-img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
  display: inline-block !important;
}