/* Tazama brand overrides for Apache Answer (faq.tazama.org).
   Palette and typography from shared/assets/css/main.css (tazama.org).
   Applied via scripts/apply_branding.py -> admin custom-css setting. */

:root {
  --tz-orange: #f57e20;
  --tz-orange-hover: #d96a12;
  --tz-green: #51be99;
  --tz-green-dark: #003c30;
  --tz-emerald: #065f46;
  --tz-mint-bg: #e6f7f1;
  --tz-text: #606060;
  --tz-muted: #888888;
  --tz-border: #e4e4ef;
  --tz-font-sans: "Open Sans", Verdana, Geneva, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--tz-font-sans);
  color: var(--tz-text);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--tz-green-dark);
}

/* Links: deep green, orange on hover (tazama.org navigation pattern) */
a,
.link-dark,
.link-secondary {
  color: var(--tz-green-dark);
}

a:hover {
  color: var(--tz-orange);
}

/* Question list titles */
.h5 a,
a.h5 {
  color: var(--tz-green-dark);
}

/* Primary buttons: Tazama orange pill CTA */
.btn-primary {
  --bs-btn-bg: var(--tz-orange);
  --bs-btn-border-color: var(--tz-orange);
  --bs-btn-hover-bg: var(--tz-orange-hover);
  --bs-btn-hover-border-color: var(--tz-orange-hover);
  --bs-btn-active-bg: var(--tz-orange-hover);
  --bs-btn-active-border-color: var(--tz-orange-hover);
  border-radius: 200px;
}

.btn-outline-primary {
  --bs-btn-color: var(--tz-emerald);
  --bs-btn-border-color: var(--tz-emerald);
  --bs-btn-hover-bg: var(--tz-emerald);
  --bs-btn-hover-border-color: var(--tz-emerald);
  border-radius: 200px;
}

/* Tag pills: mint background, deep green text (brand chip style) */
.badge-tag {
  background: var(--tz-mint-bg);
  color: var(--tz-emerald);
}

.badge-tag:hover {
  background: #d2ede3;
  color: var(--tz-green-dark);
}

/* Accepted-answer check keeps the brand green */
.text-success {
  color: var(--tz-green) !important;
}

/* --- FAQ mode: minimize question-list chrome ------------------------- */
/* The list is curated by the product team, so per-entry community
   signals (votes, views, answer badge, timestamps) are noise. Scoped to
   .list-group-item so question detail pages keep their full metadata. */

/* Hide "3h ago" and its bullet separator: zero the meta row's font size
   (the bullet is a bare text node), restore it for the author chip. */
.list-group-item > .d-flex.flex-wrap {
  font-size: 0;
}

.list-group-item > .d-flex.flex-wrap > .d-flex.align-items-center {
  font-size: 0.875rem;
}

.list-group-item time {
  display: none;
}

/* Hide the reputation score next to the author name */
.list-group-item > .d-flex.flex-wrap .fw-bold[title="Reputation"] {
  display: none;
}

/* Hide the body excerpt (duplicates the title in seeded FAQ entries) */
.list-group-item .text-truncate-2 {
  display: none;
}

/* Hide the votes / answers / views footer row entirely */
.list-group-item > .small.text-secondary {
  display: none;
}

/* Hide the anonymous "Welcome ... / Log in" sidebar card */
.card:has(a[href="/users/login"]) {
  display: none;
}

/* Hide the Hot Questions sidebar widget on list pages. Scoped so the
   Related widget (same markup) survives on question detail pages. */
.row:not(.questionDetailPage) .page-right-side .card:has(> .card-header) {
  display: none;
}

/* Hot Questions sidebar: hide the "1 answers" count rows
   (!important to beat Bootstrap's .d-flex) */
.card .link-success.small {
  display: none !important;
}

/* --- Anonymous visitors: hide dead interaction controls ---------------
   Registration is disabled, so these only lead to a login wall. Scoped
   to body:has(nav "Log in" link) = anonymous; logged-in maintainers
   (who post and accept answers) keep every control. */

/* Thumbs up/down + score on questions and answers */
body:has(nav a[href="/users/login"]) .questionDetailPage .btn-group:has(i[class*="bi-hand-thumbs"]) {
  display: none !important;
}

/* Bookmark/save button */
body:has(nav a[href="/users/login"]) .questionDetailPage button:has(i[class*="bi-bookmark"]) {
  display: none !important;
}

/* "Add comment" and emoji-reaction pills */
body:has(nav a[href="/users/login"]) .questionDetailPage .btn-reaction {
  display: none !important;
}

/* "Your Answer" heading, editor and post button */
body:has(nav a[href="/users/login"]) .questionDetailPage .page-main > form {
  display: none !important;
}

/* "Follow" button in the question meta row */
body:has(nav a[href="/users/login"]) .questionDetailPage .btn-no-border.btn-link.btn-sm {
  display: none !important;
}

/* Score/Newest/Oldest sort controls next to the "N Answers" heading
   (everything in that header row except the heading itself, so both the
   desktop button group and the mobile dropdown variant are covered) */
body:has(nav a[href="/users/login"]) .questionDetailPage .d-flex.justify-content-between.mt-5 > :not(h5) {
  display: none !important;
}
