/**
 * Pionyr "Scopus-style" restyle — v1
 *
 * Academic-database look for the BLOG contexts only:
 *   homepage (posts index), archives, single posts, search results.
 * Vikinger community pages (members, groups, account, etc.) are NOT touched —
 * every rule below is scoped under body.pionyr-scopus (added in functions.php).
 *
 * Palette (pionyr.tech brand tokens — DESIGN.md / tokens.css):
 *   ink     #201d1d  hero band / headings (hero gradient to #302c2c)
 *   blue    #0061ed  Pionyr Blue — links / primary buttons (hover #0146b2)
 *   page bg #fdfcfc  warm cream canvas
 *   card    #ffffff
 *   border  #e7e2e2  warm hairline
 *   text    #201d1d  near-black ink
 *   meta    #646262  muted gray (authors, dates)
 */

body.pionyr-scopus {
  --pionyr-navy: #201d1d;
  --pionyr-navy-2: #302c2c;
  --pionyr-blue: #0061ed;
  --pionyr-blue-dark: #0146b2;
  --pionyr-bg: #fdfcfc;
  --pionyr-border: #e7e2e2;
  --pionyr-text: #201d1d;
  --pionyr-meta: #646262;
  background-color: var(--pionyr-bg);
}

/* ------------------------------------------------------------------ */
/* 1. Section banner -> Scopus hero bar                                 */
/* ------------------------------------------------------------------ */

body.pionyr-scopus .section-banner {
  min-height: 0;
  padding: 40px 48px;
  border-radius: 12px;
  /* !important: Vikinger sets the banner background via an inline style
     (banner-bg.png), which a normal stylesheet rule cannot override */
  background: linear-gradient(120deg, var(--pionyr-navy) 0%, var(--pionyr-navy-2) 100%) !important;
  border: 1px solid rgba(255, 255, 255, .08);
}

/* hide the playful illustration icon on blog contexts */
body.pionyr-scopus .section-banner .section-banner-icon {
  display: none;
}

body.pionyr-scopus .section-banner .section-banner-title {
  color: #ffffff;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.01em;
}

body.pionyr-scopus .section-banner .section-banner-text {
  color: #c4c2c2;
  font-size: 15px;
  font-weight: 500;
}

/* ------------------------------------------------------------------ */
/* 2. Injected hero search panel (added by scopus-hero.js)              */
/* ------------------------------------------------------------------ */

.pionyr-scopus-hero {
  background: #ffffff;
  border: 1px solid var(--pionyr-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(14, 42, 71, .08);
  padding: 28px 32px;
  margin-top: 24px;
}

.pionyr-scopus-hero .pionyr-scopus-kicker {
  color: var(--pionyr-blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.pionyr-scopus-hero h2 {
  color: var(--pionyr-navy);
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 6px;
}

.pionyr-scopus-hero p {
  color: var(--pionyr-meta);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 18px;
  font-weight: 500;
}

.pionyr-scopus-hero form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.pionyr-scopus-hero input[type="search"] {
  flex: 1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 52px;
  border: 1px solid var(--pionyr-border);
  border-radius: 8px;
  padding: 0 18px;
  font-size: 15px;
  color: var(--pionyr-text);
  background: #fbfcfe;
}

.pionyr-scopus-hero input[type="search"]:focus {
  border-color: var(--pionyr-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 103, 184, .12);
}

.pionyr-scopus-hero button[type="submit"] {
  height: 52px;
  padding: 0 36px;
  border: none;
  border-radius: 8px;
  background: var(--pionyr-blue);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.pionyr-scopus-hero button[type="submit"]:hover {
  background: var(--pionyr-blue-dark);
}

.pionyr-scopus-hero .pionyr-scopus-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  color: var(--pionyr-meta);
  font-size: 13px;
  font-weight: 500;
}

.pionyr-scopus-hero .pionyr-scopus-hints a {
  color: var(--pionyr-blue);
  font-weight: 600;
}

@media screen and (max-width: 680px) {
  .pionyr-scopus-hero {
    padding: 22px;
  }
  .pionyr-scopus-hero form {
    grid-template-columns: 1fr;
  }
  .pionyr-scopus-hero button[type="submit"] {
    width: 100%;
  }
}

/* ------------------------------------------------------------------ */
/* 3. Blog index cards -> Scopus "document result" rows                */
/* ------------------------------------------------------------------ */

/* section heading above the list */
body.pionyr-scopus .section-header .section-header-title,
body.pionyr-scopus .section-title {
  color: var(--pionyr-navy);
}

body.pionyr-scopus .section-filters-bar {
  background: #ffffff;
  border: 1px solid var(--pionyr-border);
  border-radius: 12px;
  padding: 16px 20px;
}

body.pionyr-scopus .post-preview {
  min-height: 0;
  height: auto;
  background: #ffffff;
  border: 1px solid var(--pionyr-border);
  border-radius: 8px;
  box-shadow: none;
  padding: 22px 26px;
}

body.pionyr-scopus .post-preview:hover {
  border-color: #b9c9db;
  box-shadow: 0 2px 8px rgba(14, 42, 71, .08);
}

/* no cover art on result rows */
body.pionyr-scopus .post-preview .post-preview-image,
body.pionyr-scopus .post-preview .post-preview-image-mobile-link,
body.pionyr-scopus .post-preview .post-preview-image-mobile,
body.pionyr-scopus .post-preview .post-preview-gallery,
body.pionyr-scopus .post-preview .gallery-popup-button {
  display: none;
}

/* flatten the overlapping info card into a plain row body */
body.pionyr-scopus .post-preview .post-preview-info {
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

body.pionyr-scopus .post-preview .post-preview-info.fixed-height {
  height: auto;
  display: block;
  padding: 0;
}

/* Scopus-style: blue title link, gray meta, abstract snippet */
body.pionyr-scopus .post-preview .post-preview-title {
  font-size: 19px;
  line-height: 1.35;
  margin-top: 0;
}

body.pionyr-scopus .post-preview .post-preview-title a {
  color: var(--pionyr-blue);
  font-weight: 700;
}

body.pionyr-scopus .post-preview .post-preview-title a:hover {
  color: var(--pionyr-blue-dark);
  text-decoration: underline;
}

body.pionyr-scopus .post-preview .post-preview-timestamp {
  color: var(--pionyr-meta);
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  margin-top: 8px;
}

body.pionyr-scopus .post-preview .post-preview-text {
  color: var(--pionyr-text);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 400;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.pionyr-scopus .post-preview .post-preview-link {
  color: var(--pionyr-blue);
  font-size: 12px;
  margin-top: 12px;
}

body.pionyr-scopus .post-preview .post-preview-link:hover {
  color: var(--pionyr-blue-dark);
}

/* hide social reactions / share row on the index (kept on single post) */
body.pionyr-scopus.home .post-preview .content-actions,
body.pionyr-scopus.archive .post-preview .content-actions,
body.pionyr-scopus.search .post-preview .content-actions {
  display: none;
}

/* tag list -> subtle keyword chips */
body.pionyr-scopus .post-preview .tag-list .tag-item,
body.pionyr-scopus .post-preview .tag-item {
  border: 1px solid var(--pionyr-border);
  background: #f8f7f7;
  color: var(--pionyr-meta);
  font-weight: 600;
}

/* sticky/featured post keeps emphasis but in academic dress */
body.pionyr-scopus .post-preview.sticky {
  height: auto;
  border-left: 4px solid var(--pionyr-blue);
}

body.pionyr-scopus .post-preview.sticky .post-preview-info {
  width: 100%;
  margin: 0;
  height: auto;
}

body.pionyr-scopus .post-preview.sticky .content-actions {
  width: 100%;
}

/* ------------------------------------------------------------------ */
/* 4. Single post -> clean article page                                 */
/* ------------------------------------------------------------------ */

body.pionyr-scopus.single .post-open {
  background: #ffffff;
  border: 1px solid var(--pionyr-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(14, 42, 71, .06);
}

body.pionyr-scopus.single .post-open .post-open-title,
body.pionyr-scopus.single .post-open-heading .post-open-heading-title {
  color: var(--pionyr-navy);
}

/* meta line (author / date) in academic gray */
body.pionyr-scopus.single .meta-line,
body.pionyr-scopus.single .meta-line .meta-line-timestamp,
body.pionyr-scopus.single .post-open .post-open-meta {
  color: var(--pionyr-meta);
}

body.pionyr-scopus.single .post-open .post-open-content,
body.pionyr-scopus.single .post-open-content {
  color: var(--pionyr-text);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
}

body.pionyr-scopus.single .post-open .post-open-content a {
  color: var(--pionyr-blue);
}

body.pionyr-scopus.single .post-open .post-open-content h2,
body.pionyr-scopus.single .post-open .post-open-content h3 {
  color: var(--pionyr-navy);
}

/* ------------------------------------------------------------------ */
/* 5. Search results page                                               */
/* ------------------------------------------------------------------ */

body.pionyr-scopus.search .page-open,
body.pionyr-scopus.search .post-preview {
  background: #ffffff;
  border: 1px solid var(--pionyr-border);
  border-radius: 8px;
}
