/* "Cited by" badges on the archive pages -- fed by public/journals/2/citations/citations.json,
   which /home/ubuntu/ojs-tools/citation-counts.php refreshes from OpenAlex/Crossref/Semantic Scholar.
   Colours follow the archive pages' own palette (#0b6670 links, #d8e0e6 rules). */

.cite-count {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  margin-left: 0.5em;
  padding: 0.1em 0.6em;
  border: 1px solid #b9d3d6;
  border-radius: 999px;
  background: #eef6f6;
  color: #0b6670;
  font-size: 0.85em;
  line-height: 1.7;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: baseline;
}
.cite-count:hover,
.cite-count:focus {
  background: #0b6670;
  border-color: #0b6670;
  color: #ffffff;
  text-decoration: none;
}
.cite-count__n { font-weight: 700; }

/* Uncited work: present but deliberately quiet, so a page of new articles does not
   read as a wall of red flags. Hidden entirely unless data-show-zero is on. */
.cite-count--zero {
  border-color: #e0e5e8;
  background: #f6f7f8;
  color: #5e6b76;
}

/* One quiet line of figures at the top of /teihasoiu/archives. The two citation figures
   link to the cited-articles page. */
.ar-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.7rem;
  margin: 0;
  padding: 0 0 1.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #5e6b76;
}
.ar-metrics__item { color: #5e6b76; text-decoration: none; }
.ar-metrics__item b {
  font-size: 1rem;
  font-weight: 600;
  color: #17212b;
  font-variant-numeric: tabular-nums;
}
.ar-metrics__item--link, .ar-metrics__item--link b { color: #0b6670; }
.ar-metrics__item--link:hover,
.ar-metrics__item--link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.ar-metrics__sep { color: #cbd5da; }
.ar-metrics__upd { margin-left: auto; color: #94a2ab; font-size: 0.78rem; }
@media (max-width: 720px) {
  .ar-metrics__upd { margin-left: 0; flex-basis: 100%; }
}

/* ---- /teihasoiu/citations : every cited article, expanding to its citing works ---- */

.cite-report__hint {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #5e6b76;
}
.cite-report__note {
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #5e6b76;
}

.cite-report__filter {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d8e0e6;
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  color: #17212b;
}
.cite-report__filter:focus {
  outline: none;
  border-color: #0b6670;
  box-shadow: 0 0 0 2px rgba(11, 102, 112, 0.15);
}

/* --- the ranked list of cited articles --- */

.cite-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #e2e9ec;
}
.cite-row {
  border-bottom: 1px solid #e2e9ec;
}
.cite-row[hidden] { display: none; }
.cite-row.is-open { background: #fbfdfd; }

.cite-row__head {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  align-items: baseline;
  gap: 0.5rem 0.9rem;
}
.cite-row__rank {
  padding-top: 0.95rem;
  color: #adb8bf;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* The article name is the control: selecting it reveals the citing works. */
.cite-row__toggle {
  display: block;
  width: 100%;
  padding: 0.85rem 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.cite-row__toggle:focus-visible {
  outline: 2px solid #0b6670;
  outline-offset: 2px;
}
.cite-row__title {
  display: block;
  font-size: 1.02rem;
  line-height: 1.35;
  color: #17212b;
}
.cite-row__toggle:hover .cite-row__title { color: #0b6670; }
.cite-row__title::before {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin: 0 0.6em 0.15em 0;
  border-right: 2px solid #0b6670;
  border-bottom: 2px solid #0b6670;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  vertical-align: middle;
}
.cite-row.is-open .cite-row__title::before { transform: rotate(45deg); }
.cite-row__sub {
  display: block;
  margin-top: 0.2rem;
  padding-left: 1em;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #5e6b76;
  overflow-wrap: anywhere;
}
.cite-row__n {
  padding: 0.9rem 0 0;
  color: #0b6670;
  font-size: 0.85rem;
  white-space: nowrap;
}
.cite-row__n b { font-size: 1.15rem; }

/* --- the citing works, revealed under an article --- */

.cite-row__body {
  padding: 0.25rem 0 1.1rem 3.1rem;
}
.cite-row__body[hidden] { display: none; }
.cite-row__loading { margin: 0.5rem 0; color: #5e6b76; font-size: 0.9rem; }
.cite-row__note { margin: 0.5rem 0; color: #5e6b76; font-size: 0.85rem; }
.cite-row__links { margin: 0.9rem 0 0; font-size: 0.82rem; }
.cite-row__links a { color: #0b6670; }

.cite-cw {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid #d8e0e6;
}
.cite-cw__item {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0 0.5rem 1rem;
}
.cite-cw__i {
  flex: 0 0 1.4rem;
  color: #adb8bf;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.cite-cw__body { min-width: 0; }
.cite-cw__title {
  color: #17212b;
  font-size: 0.94rem;
  line-height: 1.4;
  text-decoration: none;
}
a.cite-cw__title:hover, a.cite-cw__title:focus { color: #0b6670; text-decoration: underline; }
.cite-cw__meta {
  margin-top: 0.15rem;
  font-size: 0.79rem;
  line-height: 1.5;
  color: #5e6b76;
  overflow-wrap: anywhere;
}
.cite-cw__meta a { color: #0b6670; }
.cite-list__sep { color: #adb8bf; }

@media (max-width: 640px) {
  .cite-row__head { grid-template-columns: 1.6rem 1fr; }
  .cite-row__n { grid-column: 2; padding: 0 0 0.85rem 1em; }
  .cite-row__body { padding-left: 1.6rem; }
}

/* The article an entry in that list lands on, over on its issue page */
.cite-target {
  outline: 3px solid #0b6670;
  outline-offset: 6px;
  animation: cite-target-fade 4s ease-out forwards;
}
@keyframes cite-target-fade {
  0%, 70% { outline-color: #0b6670; }
  100%    { outline-color: rgba(11, 102, 112, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .cite-target { animation: none; }
  .cite-row__title::before { transition: none; }
}
