/* ===============================================================
   JNSPS Green V2.1.38 — REAL view/download metrics placement only
   Keeps the V2.1.37 article-card visual design unchanged.
   =============================================================== */

/* Thumbnail remains the positioning context for usage metadata. */
html body .obj_article_summary > .thumbnail {
  position: relative !important;
}

/* Real metrics from Templates::Issue::Issue::Article are now rendered here. */
html body .obj_article_summary .rans-article-counter {
  position: absolute !important;
  z-index: 7 !important;
  top: 14px !important;
  right: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  width: auto !important;
  max-width: calc(100% - 165px) !important;
  min-height: 28px !important;
  margin: 0 !important;
  padding: 4px 9px !important;
  box-sizing: border-box !important;
  border: 1px solid #d4e9dc !important;
  border-radius: 999px !important;
  background: rgba(238,248,241,.97) !important;
  color: #315f45 !important;
  box-shadow: 0 3px 9px rgba(15,81,50,.08) !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

/* Normalize whatever lightweight markup the statistics plugin/hook returns. */
html body .obj_article_summary .rans-article-counter > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

html body .obj_article_summary .rans-article-counter i,
html body .obj_article_summary .rans-article-counter svg,
html body .obj_article_summary .rans-article-counter .fa,
html body .obj_article_summary .rans-article-counter .fas,
html body .obj_article_summary .rans-article-counter .far {
  color: #198754 !important;
}

html body .obj_article_summary .rans-article-counter a,
html body .obj_article_summary .rans-article-counter a:visited,
html body .obj_article_summary .rans-article-counter span,
html body .obj_article_summary .rans-article-counter div {
  color: #315f45 !important;
  font-size: inherit !important;
  line-height: 1.1 !important;
}

/* The title gets the whole content width and never shares a row with metrics. */
html body .obj_article_summary .title {
  display: block !important;
  width: 100% !important;
}

html body .obj_article_summary .title > a,
html body .obj_article_summary .title > a:visited {
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0 !important;
}

/* V2.1.37 briefly used the article ID as a counter. Never show that badge. */
html body .obj_article_summary .title .article-id,
html body .obj_article_summary .article-id,
html body .obj_article_summary .rans-article-counter-eye,
html body .obj_article_summary .rans-article-counter-value {
  display: none !important;
}

@media (max-width: 767px) {
  html body .obj_article_summary .rans-article-counter {
    top: 12px !important;
    right: 12px !important;
    gap: 6px !important;
    min-height: 26px !important;
    padding: 4px 8px !important;
    font-size: 10px !important;
    max-width: calc(100% - 140px) !important;
  }
}

@media (max-width: 420px) {
  html body .obj_article_summary .rans-article-counter {
    top: 11px !important;
    right: 11px !important;
    gap: 5px !important;
    padding: 4px 7px !important;
    max-width: calc(100% - 125px) !important;
  }
}
