/* Open Library Publications — Clean Red UI — 2026-08-28 v8
 * Focus: Advanced Filters alignment, single-accent result cards, text alignment.
 */

:root{
  --olv8-red:#c51f2a;
  --olv8-red-deep:#941720;
  --olv8-red-soft:#fff6f7;
  --olv8-border:#eadde0;
  --olv8-border-strong:#dfa7ad;
  --olv8-text:#344054;
  --olv8-muted:#667085;
  --olv8-white:#fff;
}

/* Keep every major red surface clean: no diagonal/repeating technical pattern. */
html body .openlib_site_header__utility,
html body .openlib_journal_header__utility,
html body .openlib_search_form,
html body.openlib-site-index .openlib_search_panel--primary,
html body.openlib-site-index.openlib-search-is-fixed .openlib_search_panel--primary,
html body .pkp_structure_footer_wrapper.openlib_site_footer,
html body .pkp_structure_footer_wrapper.openlib_journal_footer_global{
  background-image:none!important;
}

/* --------------------------------------------------------------------------
   ADVANCED FILTERS — full-width, no collision, aligned controls
   -------------------------------------------------------------------------- */
html body .openlib_search_advanced{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
  margin:10px 0 0!important;
  padding:0!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:13px!important;
  background:#fff!important;
  color:var(--olv8-text)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.15)!important;
}
html body .openlib_search_advanced summary{
  display:flex!important;
  width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  box-sizing:border-box!important;
  align-items:center!important;
  gap:9px!important;
  margin:0!important;
  padding:0 14px!important;
  border:0!important;
  border-radius:13px!important;
  background:#fff!important;
  color:#a61923!important;
  cursor:pointer!important;
  list-style:none!important;
  font-size:13px!important;
  font-weight:850!important;
  line-height:1!important;
  outline:0!important;
}
html body .openlib_search_advanced summary::-webkit-details-marker{display:none!important;}
html body .openlib_search_advanced summary::marker{display:none!important;content:""!important;}
html body .openlib_search_advanced summary:after{display:none!important;content:none!important;}
html body .openlib_search_advanced summary .openlib_advanced_icon{
  position:static!important;
  flex:0 0 18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  height:18px!important;
  margin:0!important;
  padding:0!important;
  color:var(--olv8-red)!important;
  line-height:1!important;
}
html body .openlib_search_advanced summary .openlib_advanced_icon svg{
  display:block!important;
  width:17px!important;
  height:17px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
html body .openlib_search_advanced summary .openlib_advanced_label{
  display:flex!important;
  align-items:center!important;
  min-width:0!important;
  line-height:1.2!important;
}
html body .openlib_search_advanced summary .openlib_advanced_chevron{
  flex:0 0 18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  height:18px!important;
  margin-left:auto!important;
  color:#9e2931!important;
  transition:transform .18s ease!important;
}
html body .openlib_search_advanced summary .openlib_advanced_chevron svg{
  display:block!important;
  width:16px!important;
  height:16px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
html body .openlib_search_advanced[open] summary{
  border-radius:13px 13px 0 0!important;
  border-bottom:1px solid #eedfe1!important;
  background:#fff!important;
}
html body .openlib_search_advanced[open] summary .openlib_advanced_chevron{
  transform:rotate(180deg)!important;
}

html body .openlib_search_advanced__grid{
  display:grid!important;
  grid-template-columns:minmax(230px,.78fr) minmax(0,1.55fr)!important;
  gap:16px!important;
  align-items:stretch!important;
  box-sizing:border-box!important;
  width:100%!important;
  margin:0!important;
  padding:16px!important;
  background:#fff!important;
}
html body .openlib_search_advanced__field,
html body .openlib_search_advanced__dates .from,
html body .openlib_search_advanced__dates .to{
  box-sizing:border-box!important;
  min-width:0!important;
  padding:13px!important;
  border:1px solid #ece3e5!important;
  border-radius:11px!important;
  background:#fcfbfc!important;
}
html body .openlib_search_advanced__field{
  display:flex!important;
  flex-direction:column!important;
}
html body .openlib_search_advanced__field label,
html body .openlib_search_advanced__dates fieldset legend{
  display:block!important;
  width:100%!important;
  margin:0 0 8px!important;
  padding:0!important;
  color:#3f4b5d!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1.25!important;
  text-align:left!important;
}
html body .openlib_search_advanced__field input{
  box-sizing:border-box!important;
  width:100%!important;
  height:40px!important;
  margin:auto 0 0!important;
  padding:0 12px!important;
  border:1px solid #d7dde5!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#283548!important;
  line-height:40px!important;
  box-shadow:none!important;
  outline:0!important;
}
html body .openlib_search_advanced__dates{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
  min-width:0!important;
}
html body .openlib_search_advanced__dates fieldset{
  display:grid!important;
  grid-template-columns:34px minmax(72px,1fr) 42px minmax(64px,.9fr) 28px minmax(64px,.9fr)!important;
  gap:6px!important;
  align-items:center!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
}
html body .openlib_search_advanced__dates fieldset legend{
  grid-column:1 / -1!important;
}
html body .openlib_search_advanced__dates fieldset label{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  height:38px!important;
  margin:0!important;
  padding:0!important;
  color:#667085!important;
  font-size:11px!important;
  font-weight:700!important;
  line-height:1!important;
  text-align:right!important;
  white-space:nowrap!important;
}
html body .openlib_search_advanced__dates select{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  margin:0!important;
  padding:0 26px 0 9px!important;
  border:1px solid #d7dde5!important;
  border-radius:9px!important;
  background-color:#fff!important;
  color:#344054!important;
  font-size:12px!important;
  line-height:38px!important;
  box-shadow:none!important;
  outline:0!important;
}
html body .openlib_search_advanced__field input:focus,
html body .openlib_search_advanced__dates select:focus{
  border-color:#dc4a54!important;
  box-shadow:0 0 0 3px rgba(220,40,51,.08)!important;
}

/* --------------------------------------------------------------------------
   SEARCH RESULTS — ONE red accent only: LEFT. No top accent/pseudo rail.
   -------------------------------------------------------------------------- */
html body .openlib_search_results > li{
  position:relative!important;
  overflow:hidden!important;
  margin:0 0 12px!important;
  padding:0!important;
  border:1px solid #e8dfe1!important;
  border-left:4px solid var(--olv8-red)!important;
  border-radius:13px!important;
  background:#fff!important;
  box-shadow:0 7px 18px rgba(51,25,28,.05)!important;
}
html body .openlib_search_results > li:before,
html body .openlib_search_results > li:after,
html body .openlib_search_results .obj_article_summary:before,
html body .openlib_search_results .obj_article_summary:after{
  display:none!important;
  content:none!important;
  border:0!important;
  background:none!important;
}
html body .openlib_search_results .obj_article_summary{
  box-sizing:border-box!important;
  width:100%!important;
  margin:0!important;
  padding:17px 19px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
html body .openlib_search_results .obj_article_summary .title{
  margin:0 0 6px!important;
  line-height:1.45!important;
}
html body .openlib_search_results .obj_article_summary .authors,
html body .openlib_search_results .obj_article_summary .published,
html body .openlib_search_results .obj_article_summary .pages{
  line-height:1.5!important;
}

/* Dark mode */
html[data-openlib-color-mode="dark"] body .openlib_search_advanced,
html[data-openlib-color-mode="dark"] body .openlib_search_advanced[open]{
  background:#1b2029!important;
  color:#e7ebf2!important;
}
html[data-openlib-color-mode="dark"] body .openlib_search_advanced summary,
html[data-openlib-color-mode="dark"] body .openlib_search_advanced[open] summary{
  border-bottom-color:#42343a!important;
  background:#211b20!important;
  color:#ffb6bd!important;
}
html[data-openlib-color-mode="dark"] body .openlib_search_advanced__grid{background:#1b2029!important;}
html[data-openlib-color-mode="dark"] body .openlib_search_advanced__field,
html[data-openlib-color-mode="dark"] body .openlib_search_advanced__dates .from,
html[data-openlib-color-mode="dark"] body .openlib_search_advanced__dates .to{
  border-color:#3c424d!important;
  background:#171b22!important;
}
html[data-openlib-color-mode="dark"] body .openlib_search_advanced__field label,
html[data-openlib-color-mode="dark"] body .openlib_search_advanced__dates fieldset legend{color:#d8dde6!important;}
html[data-openlib-color-mode="dark"] body .openlib_search_advanced__field input,
html[data-openlib-color-mode="dark"] body .openlib_search_advanced__dates select{
  border-color:#454b57!important;
  background:#20252e!important;
  color:#f4f6fa!important;
}
html[data-openlib-color-mode="dark"] body .openlib_search_results > li{
  border-color:#39333b!important;
  border-left-color:#e44954!important;
  background:#191d25!important;
}

@media(max-width:1100px){
  html body .openlib_search_advanced__grid{grid-template-columns:1fr!important;}
}
@media(max-width:820px){
  html body .openlib_search_advanced__dates{grid-template-columns:1fr!important;}
}
@media(max-width:600px){
  html body .openlib_search_advanced__grid{padding:12px!important;}
  html body .openlib_search_advanced__dates fieldset{
    grid-template-columns:34px minmax(0,1fr)!important;
  }
  html body .openlib_search_advanced__dates fieldset legend{grid-column:1 / -1!important;}
  html body .openlib_search_advanced__dates fieldset label{justify-content:flex-start!important;text-align:left!important;}
}
