/* Open Library Publications — Red Clean Polish — 2026-08-28 v2
 * Focused polish layer for search + auth capsule alignment.
 */

:root{
  --olx-red-deep:#8d121b;
  --olx-red-main:#c91f2b;
  --olx-red-soft:#fff2f3;
  --olx-red-line:#efc1c6;
  --olx-ink:#1f2937;
}

/* --------------------------------------------------------------------------
   1. AUTH CAPSULE — cleaner, more balanced, no awkward divider cuts
   -------------------------------------------------------------------------- */
html body .openlib_account_cluster--guest,
html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  min-height:42px!important;
  padding:4px!important;
  border:1px solid rgba(255,255,255,.72)!important;
  border-radius:15px!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 10px 24px rgba(93,11,18,.16)!important;
  overflow:visible!important;
}
html body .openlib_account_cluster--guest > * + *:before,
html body .openlib_account_cluster--guest > .is-active:before,
html body .openlib_account_cluster--guest > .openlib_auth_switch__item--register:before{
  display:none!important;
  content:none!important;
}
html body .openlib_account_cluster--guest > .openlib_color_mode_toggle,
html body .openlib_account_cluster--guest > .openlib_auth_switch__item{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
  border:0!important;
  border-radius:11px!important;
  box-shadow:none!important;
  line-height:1!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}
html body .openlib_account_cluster--guest > .openlib_color_mode_toggle{
  width:34px!important;
  min-width:34px!important;
  padding:0!important;
  background:var(--olx-red-soft)!important;
  color:var(--olx-red-deep)!important;
  font-size:14px!important;
}
html body .openlib_account_cluster--guest > .openlib_color_mode_toggle .fa{
  position:static!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:14px!important;
  height:14px!important;
  margin:0!important;
  line-height:1!important;
}
html body .openlib_account_cluster--guest > .openlib_auth_switch__item{
  padding:0 16px!important;
  background:transparent!important;
  color:#8a1821!important;
  font-size:13px!important;
  font-weight:800!important;
}
html body .openlib_account_cluster--guest > .openlib_auth_switch__item span{
  display:block!important;
  line-height:1!important;
}
html body .openlib_account_cluster--guest > .openlib_auth_switch__item--login{
  background:#fff7f8!important;
}
html body .openlib_account_cluster--guest > .openlib_auth_switch__item--register,
html body .openlib_account_cluster--guest > .openlib_auth_switch__item.is-active,
html body.pkp_page_login .openlib_account_cluster--guest > .openlib_auth_switch__item--login,
html body.pkp_page_user.pkp_op_register .openlib_account_cluster--guest > .openlib_auth_switch__item--register{
  background:linear-gradient(135deg,#b81924,#dc2934)!important;
  color:#fff!important;
  box-shadow:0 6px 14px rgba(156,20,29,.18)!important;
}
html body.pkp_page_login .openlib_account_cluster--guest > .openlib_auth_switch__item--register,
html body.pkp_page_user.pkp_op_register .openlib_account_cluster--guest > .openlib_auth_switch__item--login{
  background:#fff7f8!important;
  color:#8a1821!important;
  box-shadow:none!important;
}

/* --------------------------------------------------------------------------
   2. SEARCH INPUT + FILTER ICONS — properly centered and clean
   -------------------------------------------------------------------------- */
html body.openlib-site-index .openlib_discovery__query,
html body .openlib_search_form__query,
html body.openlib-site-index .openlib_journal_filter{
  position:relative!important;
}

html body.openlib-site-index .openlib_discovery__query > .fa,
html body .openlib_search_form__query > .fa,
html body.openlib-site-index .openlib_journal_filter > .fa{
  position:absolute!important;
  left:16px!important;
  top:50%!important;
  z-index:3!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:16px!important;
  height:16px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--olx-red-main)!important;
  font-size:13px!important;
  line-height:1!important;
  transform:translateY(-50%)!important;
  pointer-events:none!important;
  box-shadow:none!important;
}

html body.openlib-site-index .openlib_discovery__query > .fa:before,
html body .openlib_search_form__query > .fa:before,
html body.openlib-site-index .openlib_journal_filter > .fa:before{
  display:block!important;
  line-height:1!important;
}

html body.openlib-site-index .openlib_discovery__query input[type="search"]{
  padding:0 16px 0 44px!important;
}
html body .openlib_search_form__query input{
  padding:0 16px 0 44px!important;
}
html body.openlib-site-index .openlib_journal_filter input{
  padding:0 16px 0 42px!important;
}

/* Keep the search panel visually clean while preserving the dominant-red concept */
html body.openlib-site-index .openlib_search_panel--primary,
html body.openlib-site-index.openlib-search-is-fixed .openlib_search_panel--primary,
html body .openlib_search_form{
  background:
    linear-gradient(105deg,#86111a 0%,#bd1d28 54%,#df3843 100%)!important;
}

/* Better alignment for search submit icon */
html body.openlib-site-index .openlib_discovery__form > button .fa,
html body .openlib_search_form__submit .fa{
  position:static!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:14px!important;
  height:14px!important;
  margin:0!important;
  padding:0!important;
  line-height:1!important;
}
html body .openlib_search_form__submit .fa{margin-right:7px!important;}

/* --------------------------------------------------------------------------
   3. HEADER BAR SPACING
   -------------------------------------------------------------------------- */
html body .openlib_site_header__utility_inner,
html body .openlib_journal_header__utility_inner{
  min-height:42px!important;
}
html body .openlib_site_header__right,
html body .openlib_journal_header__account{
  gap:10px!important;
}

/* --------------------------------------------------------------------------
   4. SMALL SCREEN TIGHTENING
   -------------------------------------------------------------------------- */
@media (max-width:767px){
  html body .openlib_account_cluster--guest{gap:4px!important;padding:4px!important;}
  html body .openlib_account_cluster--guest > .openlib_auth_switch__item{padding:0 12px!important;font-size:12.5px!important;}
  html body .openlib_account_cluster--guest > .openlib_color_mode_toggle{width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;}
}
