/* Open Library Publications — targeted UI + PDF Reader/Flipbook — 2026-09-08 v85
 * Baseline: openlibTheme(4).zip
 * Theme-only layer. No OJS core/default-theme changes.
 */

/* --------------------------------------------------------------------------
   1) Portal dark/light geometry parity
   -------------------------------------------------------------------------- */
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_search_panel--primary,
html[data-openlib-color-mode="dark"] body.openlib-site-index:not(.openlib-search-is-fixed) .openlib_search_panel--primary {
  margin: 0 0 30px !important;
}
html[data-openlib-color-mode="dark"] body.openlib-site-index.openlib-search-is-fixed .openlib_search_panel--primary {
  margin: 0 !important;
}

/* --------------------------------------------------------------------------
   2) Registration readability in dark mode
   Keep the nested role/privacy cards dark together with their text.
   -------------------------------------------------------------------------- */
html[data-openlib-color-mode="dark"] .page_register .openlib_register_context__name,
html[data-openlib-color-mode="dark"] .page_register .context_optin .openlib_register_context__name {
  color: #f5f7fa !important;
  opacity: 1 !important;
}
html[data-openlib-color-mode="dark"] .page_register .openlib_register_context__roles,
html[data-openlib-color-mode="dark"] .page_register fieldset.openlib_register_context__roles,
html[data-openlib-color-mode="dark"] .page_register .context_optin fieldset.openlib_register_context__roles {
  border-color: #334155 !important;
  background: #111827 !important;
}
html[data-openlib-color-mode="dark"] .page_register .openlib_register_context__roles label,
html[data-openlib-color-mode="dark"] .page_register .openlib_register_context__roles label *,
html[data-openlib-color-mode="dark"] .page_register .openlib_register_context__roles .label,
html[data-openlib-color-mode="dark"] .page_register .context_optin .openlib_register_context__roles label,
html[data-openlib-color-mode="dark"] .page_register .context_optin .openlib_register_context__roles label * {
  color: #e8edf3 !important;
  -webkit-text-fill-color: #e8edf3 !important;
  opacity: 1 !important;
}
html[data-openlib-color-mode="dark"] .page_register .openlib_register_context__roles label:hover,
html[data-openlib-color-mode="dark"] .page_register .openlib_register_context__roles label:focus-within {
  background: #202833 !important;
  color: #fff !important;
}
html[data-openlib-color-mode="dark"] .page_register .context_privacy,
html[data-openlib-color-mode="dark"] .page_register .context_privacy_visible,
html[data-openlib-color-mode="dark"] .page_register .context_optin .openlib_register_context .context_privacy,
html[data-openlib-color-mode="dark"] .page_register .context_optin .openlib_register_context .context_privacy_visible {
  border-color: #674149 !important;
  background: #21181d !important;
  color: #e8edf3 !important;
}
html[data-openlib-color-mode="dark"] .page_register .context_privacy label,
html[data-openlib-color-mode="dark"] .page_register .context_privacy_visible label,
html[data-openlib-color-mode="dark"] .page_register .context_privacy label *,
html[data-openlib-color-mode="dark"] .page_register .context_privacy_visible label *,
html[data-openlib-color-mode="dark"] .page_register .context_optin .context_privacy label,
html[data-openlib-color-mode="dark"] .page_register .context_optin .context_privacy label * {
  color: #e8edf3 !important;
  -webkit-text-fill-color: #e8edf3 !important;
  opacity: 1 !important;
}
html[data-openlib-color-mode="dark"] .page_register .context_privacy a,
html[data-openlib-color-mode="dark"] .page_register .context_privacy_visible a {
  color: #ff9aa0 !important;
  -webkit-text-fill-color: #ff9aa0 !important;
  text-decoration: underline !important;
}
html[data-openlib-color-mode="dark"] .page_register input[type="checkbox"],
html[data-openlib-color-mode="dark"] .page_register input[type="radio"] {
  accent-color: #dc2626 !important;
}

/* --------------------------------------------------------------------------
   3) Portal journal-card actions: obvious hover/focus
   -------------------------------------------------------------------------- */
html body.openlib-site-index .openlib_journal_actions li a {
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease !important;
}
html body.openlib-site-index .openlib_journal_actions li a:hover,
html body.openlib-site-index .openlib_journal_actions li a:focus-visible {
  border-color: #dc2626 !important;
  background: #dc2626 !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(220,38,38,.20) !important;
  outline: 0 !important;
}
html body.openlib-site-index .openlib_journal_actions li a:hover *,
html body.openlib-site-index .openlib_journal_actions li a:focus-visible * {
  color: #fff !important;
}

/* --------------------------------------------------------------------------
   4) Journal homepage banner: remove dark artwork edge lines
   -------------------------------------------------------------------------- */
html body.openlib-journal-page .openlib_journal_banner {
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  overflow: hidden !important;
}
html body.openlib-journal-page .openlib_journal_banner img {
  width: calc(100% + 8px) !important;
  max-width: none !important;
  margin-left: -4px !important;
  margin-right: -4px !important;
}

/* v86: global UI fixes only. PDF/Flipbook assets are loaded only on galley pages. */
