/* =====================================================================
   Collectibles.com — Help Scout Docs LIGHT theme
   Clean light look with rounded boxes, matching collectibles.com branding.
   Covers: homepage, collection/category pages, and article pages.

   Upload via: Help Scout → Docs → Settings → Custom Code →
   "Upload stylesheet"  (NOT the "Headers" box) → then click SAVE.
   After saving, hard-refresh the site (Ctrl+Shift+R) to clear cache.

   Brand colours are sampled from the live app and live in the
   variables below — change a value once and it updates everywhere.
   ===================================================================== */

:root {
  --c-bg:          #F4F5F8; /* page background (light grey) */
  --c-surface:     #FFFFFF; /* cards / panels */
  --c-surface-2:   #F8F9FB; /* subtle alt surface */
  --c-border:      #E6E8EF; /* light borders */
  --c-border-2:    #D7DAE3;

  --c-text:        #15181E; /* primary text (brand near-black) */
  --c-text-muted:  #565E6E; /* secondary text */
  --c-text-dim:    #8A91A0; /* tertiary / footer */

  --c-accent:      #783DF5; /* brand purple */
  --c-accent-deep: #591CDD; /* deep purple (hover / gradient) */
  --c-accent-soft: rgba(120, 61, 245, 0.10);
  --c-magenta:     #E6007E; /* logo-dot magenta — tweak to your exact value */

  --radius:        18px;    /* rounded boxes */
  --radius-sm:     12px;
  --shadow:        0 4px 18px rgba(21, 24, 30, 0.06);
  --shadow-hover:  0 10px 28px rgba(120, 61, 245, 0.14);
}

/* ----------------------------- Base ---------------------------------- */
html, body {
  background: var(--c-bg) !important;
  color: var(--c-text) !important;
}
body, p, span, li, td, th, label {
  color: var(--c-text);
}
a { color: var(--c-accent); }
a:hover { color: var(--c-accent-deep); }
::selection { background: var(--c-accent); color: #fff; }

/* --------------------------- Top nav bar ----------------------------- */
header#mainNav,
header#mainNav .navbar-inner {
  background: var(--c-surface) !important;
  background-image: none !important;
  border: none !important;
  box-shadow: 0 1px 0 var(--c-border), 0 2px 12px rgba(21,24,30,.04) !important;
}
header#mainNav .brand img { border-radius: 10px; }

/* nav links — now clearly visible (dark text on white) */
header#mainNav nav ul li > a {
  color: var(--c-text) !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  text-shadow: none !important;
  padding: 6px 4px !important;
  border-bottom: 2px solid transparent !important;
  transition: color .15s ease, border-color .15s ease;
}
header#mainNav nav ul li > a:hover,
header#mainNav nav ul li.active > a {
  color: var(--c-accent) !important;
  background: transparent !important;
  border-bottom: 2px solid var(--c-accent) !important;
}

/* mobile hamburger toggle */
header#mainNav .btn-navbar { background: var(--c-surface-2) !important; border: 1px solid var(--c-border) !important; box-shadow: none !important; }
header#mainNav .btn-navbar .icon-bar { background: var(--c-text) !important; box-shadow: none !important; }

/* --------------------- Hero / search section ------------------------- */
section#docsSearch {
  background: var(--c-surface) !important;
  background-image: radial-gradient(820px 300px at 50% -30%, var(--c-accent-soft), transparent 70%) !important;
  border-bottom: 1px solid var(--c-border) !important;
}
section#docsSearch h1 {
  color: var(--c-text) !important;
  font-weight: 800 !important;
}

/* search field (homepage + sidebar variant) */
form#searchBar input.search-query {
  background: var(--c-surface) !important;
  color: var(--c-text) !important;
  border: 1px solid var(--c-border-2) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow) !important;
}
form#searchBar input.search-query::placeholder { color: var(--c-text-dim) !important; }
form#searchBar input.search-query:focus {
  border-color: var(--c-accent) !important;
  box-shadow: 0 0 0 3px var(--c-accent-soft) !important;
  outline: none !important;
}

/* search button */
form#searchBar button {
  background-image: linear-gradient(135deg, var(--c-accent), var(--c-accent-deep)) !important;
  background-color: var(--c-accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  text-shadow: none !important;
}
form#searchBar button:hover { background-image: linear-gradient(135deg, var(--c-accent-deep), var(--c-accent-deep)) !important; }
form#searchBar button i, form#searchBar button span { color: #fff !important; }

/* sidebar search (.sm) — button is a tiny icon inside the field, NOT a pill */
form#searchBar.sm button {
  background: none !important;
  background-image: none !important;
  box-shadow: none !important;
  border: none !important;
  width: auto !important;
  color: var(--c-accent) !important;
}
form#searchBar.sm button i, form#searchBar.sm button .icon-search { color: var(--c-accent) !important; }
form#searchBar.sm input.search-query { padding-right: 38px !important; }

/* live search results dropdown */
form#searchBar #serp-dd, form#searchBar ul.result {
  background: var(--c-surface) !important;
  border: 1px solid var(--c-border-2) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 16px 40px rgba(21,24,30,.14) !important;
}
form#searchBar #serp-dd a, form#searchBar ul.result a, form#searchBar ul.result li { color: var(--c-text) !important; }
form#searchBar #serp-dd a:hover, form#searchBar ul.result li:hover { background: var(--c-accent-soft) !important; }

/* ------------------------- Content area ------------------------------ */
section#contentArea { background: var(--c-bg) !important; }
#noResults { color: var(--c-text-dim) !important; }

/* === Homepage category cards (section.collection) === */
section.collection {
  background: var(--c-surface) !important;
  border: 1px solid var(--c-border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  padding: 24px 26px !important;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
section.collection:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover) !important;
  border-color: var(--c-accent) !important;
}
section.collection .collection-head h2 a { color: var(--c-text) !important; font-weight: 800; }
section.collection .collection-head h2 a:hover { color: var(--c-accent) !important; }
section.collection .collection-head p { color: var(--c-text-dim) !important; }
section.collection ul.popArticles li { border-color: var(--c-border) !important; }
section.collection ul.popArticles li a { color: var(--c-text-muted) !important; transition: color .12s ease; }
section.collection ul.popArticles li a:hover { color: var(--c-accent) !important; }
section.collection a.browse {
  display: inline-block;
  color: var(--c-accent) !important;
  font-weight: 700;
  border: 1px solid var(--c-accent) !important;
  border-radius: 999px !important;
  padding: 7px 18px !important;
  transition: background .15s ease, color .15s ease;
}
section.collection a.browse:hover { background: var(--c-accent) !important; color: #fff !important; }

/* === Collection & article pages === */
/* Align the sidebar + main column so their outer edges match the header
   and footer exactly. Uses flexbox (scoped with :has so the homepage grid
   is untouched) and kills Bootstrap's clearfix pseudo-elements, which
   otherwise behave as stray flex items and push the columns out of line. */
#contentArea > .row-fluid:has(#main-content) {
  display: flex !important;
  gap: 32px !important;
  align-items: flex-start !important;
  margin: 0 !important;
}
#contentArea > .row-fluid:has(#main-content)::before,
#contentArea > .row-fluid:has(#main-content)::after {
  display: none !important;
  content: none !important;
}
#contentArea > .row-fluid:has(#main-content) aside#sidebar {
  order: 0 !important;
  flex: 0 0 270px !important;
  width: 270px !important;
  margin: 0 !important;
}
#contentArea > .row-fluid:has(#main-content) #main-content {
  order: 1 !important;
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* contentWrapper is just a transparent container — no card, so we never
   get a box-inside-a-box. The real content blocks below are the cards. */
#main-content .contentWrapper {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
/* page heading sits on the background, above its card */
#main-content .contentWrapper > h1 {
  color: var(--c-text) !important;
  font-weight: 800;
  margin: 2px 0 18px 4px !important;
}

/* the actual cards */
#main-content article#fullArticle,
#main-content ul.articleList,
section.articleFoot {
  background: var(--c-surface) !important;
  border: 1px solid var(--c-border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  padding: 14px 18px !important;
}
#main-content article#fullArticle { padding: 28px 32px !important; }
#main-content article#fullArticle h1 { color: var(--c-text) !important; font-weight: 800; }

/* article list (collection page) — clean tappable rows, no double box */
ul.articleList { list-style: none !important; margin: 0 !important; padding: 4px !important; }
ul.articleList li { border: none !important; padding: 0 !important; margin: 0 !important; }
ul.articleList li + li { border-top: 1px solid var(--c-border) !important; }
ul.articleList li a {
  display: block;
  color: var(--c-text) !important;
  font-weight: 500;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  transition: background .12s ease, color .12s ease;
}
ul.articleList li a:hover { background: var(--c-accent-soft) !important; color: var(--c-accent) !important; }

/* === Sidebar (collection & article pages) === */
aside#sidebar { color: var(--c-text) !important; }
aside#sidebar h3 { color: var(--c-text) !important; font-weight: 800; margin-top: 18px; }
aside#sidebar ul.nav.nav-list {
  background: var(--c-surface) !important;
  border: 1px solid var(--c-border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  padding: 8px !important;
}
aside#sidebar ul.nav.nav-list li a {
  color: var(--c-text-muted) !important;
  border-radius: var(--radius-sm) !important;
  padding: 9px 12px !important;
  display: block;
  transition: background .12s ease, color .12s ease;
}
aside#sidebar ul.nav.nav-list li a:hover { background: var(--c-accent-soft) !important; color: var(--c-accent) !important; }
aside#sidebar ul.nav.nav-list li.active > a {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-deep)) !important;
  color: #fff !important;
}

/* === Article body typography === */
article#fullArticle, article#fullArticle p, article#fullArticle li { color: var(--c-text) !important; line-height: 1.7; }
article#fullArticle h2, article#fullArticle h3, article#fullArticle h4 { color: var(--c-text) !important; }
article#fullArticle a { color: var(--c-accent) !important; }
article#fullArticle a:hover { color: var(--c-accent-deep) !important; }
article#fullArticle img { border-radius: var(--radius-sm) !important; border: 1px solid var(--c-border) !important; }
article#fullArticle code, code {
  background: var(--c-surface-2) !important;
  color: var(--c-accent-deep) !important;
  border: 1px solid var(--c-border) !important;
  border-radius: 6px; padding: 1px 6px;
}
article#fullArticle pre { background: var(--c-surface-2) !important; border: 1px solid var(--c-border) !important; border-radius: var(--radius-sm) !important; padding: 16px !important; }
article#fullArticle blockquote {
  border-left: 4px solid var(--c-accent) !important;
  background: var(--c-accent-soft) !important;
  color: var(--c-text-muted) !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
  padding: 12px 18px !important;
}
article#fullArticle table { border-color: var(--c-border) !important; border-radius: var(--radius-sm); overflow: hidden; }
article#fullArticle th { background: var(--c-surface-2) !important; }
article#fullArticle th, article#fullArticle td { border-color: var(--c-border) !important; color: var(--c-text) !important; }
hr { border-color: var(--c-border) !important; }

/* article rating + footer blocks */
div.articleRatings { color: var(--c-text-muted) !important; }
section.articleFoot, section.articleFoot p, section.articleFoot a { color: var(--c-text-muted) !important; }
section.articleFoot a { color: var(--c-accent) !important; }

/* generic buttons */
.btn, button.btn, a.btn, input[type="submit"] {
  background-image: linear-gradient(135deg, var(--c-accent), var(--c-accent-deep)) !important;
  background-color: var(--c-accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  text-shadow: none !important;
}

/* ------------------------------ Footer ------------------------------- */
footer.center, footer {
  background: var(--c-surface) !important;
  border-top: 1px solid var(--c-border) !important;
  box-shadow: inset 0 3px 0 var(--c-magenta);
  color: var(--c-text-dim) !important;
}
footer.center p, footer p, footer span { color: var(--c-text-dim) !important; }
footer.center a, footer a { color: var(--c-text-muted) !important; }
footer.center a:hover, footer a:hover { color: var(--c-accent) !important; }
