/* VCB-Blacklens custom branding — fully responsive, fits one screen */

/* ─── Quicksand font + Orbitron (LCD digits) ─── */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&family=Orbitron:wght@400;500;700&display=swap');

/* ─── Charcoal palette — override all SearXNG blue variables ─── */
:root,
:root.theme-auto,
:root.theme-light {
  /* Core charcoal palette */
  --color-btn-background: #2c2c2c !important;
  --color-btn-font: #fff !important;
  --color-search-background-hover: #3a3a3a !important;
  --color-categories-item-selected-font: #2c2c2c !important;
  --color-categories-item-border-selected: #2c2c2c !important;
  --color-url-font: #3a3a3a !important;
  --color-result-link-font: #2c2c2c !important;
  --color-result-link-font-highlight: #2c2c2c !important;
  --color-result-vim-arrow: #2c2c2c !important;
  --color-bar-chart-primary: #4a4a4a !important;
}

/* Dark mode charcoal */
@media (prefers-color-scheme: dark) {
  :root.theme-auto {
    --color-btn-background: #d4d4d4 !important;
    --color-btn-font: #1a1a1a !important;
    --color-search-background-hover: #4a4a4a !important;
    --color-categories-item-selected-font: #e0e0e0 !important;
    --color-categories-item-border-selected: #e0e0e0 !important;
    --color-result-link-font: #d4d4d4 !important;
    --color-result-link-font-highlight: #d4d4d4 !important;
    --color-result-vim-arrow: #d4d4d4 !important;
  }
}
:root.theme-dark, :root.theme-black {
  --color-btn-background: #d4d4d4 !important;
  --color-btn-font: #1a1a1a !important;
  --color-search-background-hover: #4a4a4a !important;
  --color-categories-item-selected-font: #e0e0e0 !important;
  --color-categories-item-border-selected: #e0e0e0 !important;
  --color-result-link-font: #d4d4d4 !important;
  --color-result-link-font-highlight: #d4d4d4 !important;
  --color-result-vim-arrow: #d4d4d4 !important;
}

/* ─── Global font override ─── */
html, body, input, textarea, select, button {
  font-family: 'Quicksand', sans-serif !important;
}

/* Make the whole page a flex column so content stays within the viewport */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Charcoal overrides for elements not using CSS vars ─── */

/* Search button */
#send_search {
  background: #2c2c2c !important;
  color: #fff !important;
}
#send_search:hover {
  background: #3a3a3a !important;
}

/* Category tabs — selected state */
.category_button.selected,
.category_button:checked + label,
.categories_checkbox:checked + label {
  border-bottom-color: #2c2c2c !important;
  color: #2c2c2c !important;
}

/* Category tab icons — dark when selected (light theme) */
.category_button.selected svg,
.category_button:checked + label svg,
.categories_checkbox:checked + label svg {
  color: #2c2c2c !important;
  fill: #2c2c2c !important;
  stroke: #2c2c2c !important;
  filter: brightness(0) saturate(100%) !important;
}

/* Links throughout */
a:not(.vcb-topbar-link) {
  color: #2c2c2c;
}
a:visited:not(.vcb-topbar-link) {
  color: #555;
}

/* Result title links */
.result .url_wrapper a,
.result h3 a {
  color: #2c2c2c !important;
}
.result h3 a:visited {
  color: #555 !important;
}

/* Did-you-mean / correction suggestion */
.suggestion_item,
.suggestion a,
#suggestions .wrapper a,
.search_box .suggestion,
.result .correction {
  color: #2c2c2c !important;
  border-color: #2c2c2c !important;
}
.suggestion_item:hover,
#suggestions .wrapper a:hover {
  background: #2c2c2c !important;
  color: #fff !important;
}

/* Pagination buttons */
#pagination button,
#pagination a,
.result_header .btn,
form .btn {
  background: #2c2c2c !important;
  color: #fff !important;
  border-color: #2c2c2c !important;
}
#pagination button:hover,
#pagination a:hover {
  background: #3a3a3a !important;
}

/* Engine & infobox accents */
.infobox .header {
  background: #2c2c2c !important;
  color: #fff !important;
}

/* Checkbox/toggle accents */
input[type="checkbox"]:checked {
  accent-color: #2c2c2c !important;
}

/* Global top black brand bar — auto-height, wraps content */
.vcb-topbar {
  background: #000 !important;
  color: #fff !important;
  width: 100%;
  padding: 0.8rem 1.2rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

/* ─── Top nav (About / Preferences) — float over the topbar on homepage ─── */
#links_on_top {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}
#links_on_top,
#links_on_top a,
#links_on_top a span,
#links_on_top svg {
  color: #fff !important;
  stroke: #fff;
}

/* Homepage: overlay About/Prefs into the topbar */
.index_endpoint #links_on_top {
  position: fixed;
  top: 0.6rem;
  right: 1.2rem;
  z-index: 1000;
}

/* Results page: keep nav in normal flow with dark background */
.results_endpoint #links_on_top {
  background: #000 !important;
  padding: 0.5rem 1rem !important;
}

/* The search bar header strip on results page */
.page_with_header #search_header {
  background: #1a1a1a !important;
}
.page_with_header #search_header,
.page_with_header #search_header a,
.page_with_header #search_header svg {
  color: #fff !important;
  fill: #fff;
}

/* Category tabs on results page — white text on dark bg */
.page_with_header .category_button label,
.page_with_header .categories_checkbox label,
#categories_container label {
  color: #ccc !important;
}
.page_with_header .category_button.selected label,
.page_with_header .categories_checkbox:checked + label,
#categories_container .selected label {
  color: #fff !important;
  border-bottom-color: #fff !important;
}
/* Results page: selected category icons stay white on dark header */
.page_with_header .category_button.selected svg,
.page_with_header .categories_checkbox:checked + label svg,
#categories_container .selected svg {
  color: #fff !important;
  fill: #fff !important;
  stroke: #fff !important;
  filter: none !important;
}

/* ─── Preferences page — logo 20% larger ─── */
#preferences .vcb-topbar-logo,
body:has(#preferences) .vcb-topbar-logo {
  max-height: 150px !important;
}

.vcb-topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vcb-topbar-logo {
  max-height: 125px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Homepage: keep everything in viewport */
.index_endpoint .center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 0;
  flex: 1 1 auto;
  padding: 0;
}

/* Kill ALL top margin/padding on homepage */
.index_endpoint #main_index,
.index_endpoint .index,
.index_endpoint main,
.index_endpoint .center {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* On homepage, the nav is inside the topbar (absolute positioned) */

/* Homepage logo container — tight, no extra spacing */
.index .title {
  background: transparent !important;
  min-height: unset !important;
  margin: 0 auto !important;
  max-width: min(1120px, 95vw);
  text-align: center;
  padding: 0 !important;
}

.index .title img {
  max-height: min(600px, 50vh) !important;
  max-width: min(1080px, 90vw) !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

.index h1 {
  visibility: hidden;
  height: 0;
  margin: 0;
}

/* Search bar area — compact spacing */
.index .search_box {
  margin-top: 0.5vh !important;
}

/* Results page header logo — scales with viewport */
.page_with_header .logo {
  height: min(272px, 20vh) !important;
  width: auto !important;
}

/* ─── Hide all SearXNG branding ─── */

/* Replace the footer entirely with clean VCB branding */
footer p {
  visibility: hidden;
  position: relative;
  font-size: 0;
  line-height: 0;
}
footer p::after {
  visibility: visible;
  content: "VCB-BLACKLENS · Private Search · Powered by 250+ engines";
  display: block;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #888;
  text-align: center;
  padding: 0.5rem 0;
}
footer p a,
footer p br {
  display: none !important;
}

/* ─── Preferences button — elegant first-visit enticement ─── */

/* Subtle glow keyframes */
@keyframes prefGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
  50%      { box-shadow: 0 0 12px 3px rgba(212, 175, 55, 0.45); }
}

/* Gentle bounce for the icon */
@keyframes prefNudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

/* The preferences link — pill shape with gold accent */
.link_on_top_preferences {
  position: relative;
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  border-radius: 20px;
  padding: 4px 14px !important;
  animation: prefGlow 3s ease-in-out infinite;
  transition: all 0.3s ease;
}
.link_on_top_preferences:hover {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.1);
  animation: none;
}
.link_on_top_preferences svg {
  animation: prefNudge 3s ease-in-out infinite;
}
.link_on_top_preferences:hover svg {
  animation: none;
}

/* Tooltip bubble — appears on first view, fades out */
.link_on_top_preferences::after {
  content: "Customise your search experience ✦";
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #d4af37;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  animation: tooltipReveal 8s ease-in-out 1.5s forwards;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  border: 1px solid rgba(212, 175, 55, 0.3);
}
/* Tooltip arrow */
.link_on_top_preferences::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a1a1a;
  pointer-events: none;
  opacity: 0;
  animation: tooltipReveal 8s ease-in-out 1.5s forwards;
}

/* Fade in, hold, then fade out — plays once */
@keyframes tooltipReveal {
  0%   { opacity: 0; transform: translateX(-50%) translateY(4px); }
  10%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  75%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-4px); }
}

/* On the homepage, hide tooltip entirely — it overlaps the counter */
.index_endpoint .link_on_top_preferences::after,
.index_endpoint .link_on_top_preferences::before {
  display: none !important;
  animation: none !important;
}

/* ─── "Make Default" banner — homepage only, dismissible ─── */
.vcb-default-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
  color: #d4af37;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 10px 20px;
  width: 100%;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  animation: bannerSlideIn 0.6s ease-out;
  position: relative;
  z-index: 100;
}
.vcb-default-banner .banner-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.vcb-default-banner .banner-text .banner-icon {
  font-size: 1.1rem;
}
.vcb-default-banner a.banner-cta {
  background: #d4af37;
  color: #1a1a1a !important;
  padding: 5px 16px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.vcb-default-banner a.banner-cta:hover {
  background: #e8c84a;
  transform: scale(1.03);
}
.vcb-default-banner .banner-dismiss {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}
.vcb-default-banner .banner-dismiss:hover {
  color: #d4af37;
}
@keyframes bannerSlideIn {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Homepage tagline below logo ─── */
.vcb-tagline {
  text-align: center;
  font-family: 'Quicksand', sans-serif;
  color: #555;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0.5vh auto 1vh;
  padding: 0 1rem;
  line-height: 1.5;
}
.vcb-tagline em {
  font-style: normal;
  color: #2c2c2c;
  font-weight: 600;
}

/* ─── Live search counter — digital quartz LCD ─── */
.vcb-counter-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 6px 18px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  margin-left: auto;
  white-space: nowrap;
}
.vcb-counter-label {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.58rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.2;
}
.vcb-counter-digits {
  font-family: 'Orbitron', monospace;
  font-weight: 500;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: 0.15em;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.25),
               0 0 20px rgba(212, 175, 55, 0.15);
  line-height: 1;
  min-width: 9ch;
  text-align: right;
  /* Subtle segment-display glow */
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3));
}
/* Faint "ghost" segments behind digits */
.vcb-counter-digits::after {
  content: attr(data-ghost);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  color: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  letter-spacing: inherit;
  font: inherit;
}
/* Position relative for ghost overlay */
.vcb-counter-digits {
  position: relative;
}

/* Topbar flex: logo left, counter bottom-right */
.vcb-topbar {
  justify-content: space-between !important;
}
.vcb-topbar-link {
  margin-right: auto;
}

/* Homepage: counter in bottom-right of topbar */
.index_endpoint .vcb-counter-wrap {
  position: absolute;
  bottom: 0.5rem;
  right: 1.2rem;
}

/* Responsive: stack on narrow screens */
@media (max-width: 600px) {
  .vcb-counter-wrap {
    padding: 4px 10px;
    gap: 0.4rem;
  }
  .vcb-counter-digits {
    font-size: 1rem;
    min-width: 8ch;
  }
  .vcb-counter-label {
    font-size: 0.55rem;
  }
}

/* ─── LinkedIn follow CTA — homepage ─── */
.vcb-linkedin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5vh auto 0.5vh;
  padding: 0;
}
.vcb-linkedin a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0a66c2 !important;
  text-decoration: none;
  padding: 7px 18px;
  border: 1.5px solid rgba(10, 102, 194, 0.3);
  border-radius: 20px;
  transition: all 0.3s ease;
  background: rgba(10, 102, 194, 0.04);
}
.vcb-linkedin a:hover {
  background: rgba(10, 102, 194, 0.12);
  border-color: #0a66c2;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(10, 102, 194, 0.15);
}
.vcb-linkedin-icon {
  width: 18px;
  height: 18px;
  fill: #0a66c2;
  flex-shrink: 0;
}

