/*
 * inner.css  —  Layout & styles for JPSIM inner pages ONLY
 * Index page (index.html) does NOT load this file.
 * ──────────────────────────────────────────────────────────
 */

/* ── 1. INNER-PAGE WRAPPER ──────────────────────────────── */
.main-content { padding: 1.75rem 0 2.5rem; }

/* ── 2. TWO-COLUMN GRID (content + sidebar) ─────────────── */
.content-grid {
  display: grid !important;
  grid-template-columns: 1fr;          /* mobile: single column  */
  gap: 1.75rem;
  align-items: start;
}
.content-area { min-width: 0; }        /* prevent grid blowout   */

@media (min-width: 960px) {
  .content-grid { grid-template-columns: 1fr 300px; }
}
@media (min-width: 1200px) {
  .content-grid { grid-template-columns: 1fr 320px; }
}

/* ── 3. SIDEBAR (inner pages) ───────────────────────────── */
.sidebar {
  min-width: 0;
  /* stick to top when user scrolls */
}
@media (min-width: 960px) {
  .sidebar { position: sticky; top: 80px; }
}

/* ── 4. PAGE HERO (breadcrumb area below) ───────────────── */
.page-hero {
  background: linear-gradient(135deg, #1a3c5e 0%, #283593 100%);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  color: #fff;
}
.page-hero h1 {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 .35rem;
  letter-spacing: -.02em;
}
.page-hero p {
  font-size: .85rem;
  opacity: .85;
  margin: 0;
}

/* ── 5. ARTICLE DATES ROW ───────────────────────────────── */
.art-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: .71rem;
  color: #64748b;
  margin: .5rem 0 .85rem;
  padding: 7px 12px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  line-height: 1.6;
}
.art-dates strong { color: #374151; font-weight: 600; }

/* ── 6. ARTICLE LIST SPACING ─────────────────────────────── */
.article-list { display: flex; flex-direction: column; gap: 1rem; }
.article-item-v2 {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 1.1rem 1.25rem;
  transition: box-shadow .18s, border-color .18s;
}
.article-item-v2:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.09);
  border-color: #93c5fd;
}

/* type colour strip */
.article-item-v2[data-type="editorial"]  { border-left: 4px solid #7c3aed; }
.article-item-v2[data-type="original"]   { border-left: 4px solid #1a3c5e; }
.article-item-v2[data-type="review"]     { border-left: 4px solid #0891b2; }
.article-item-v2[data-type="case"]       { border-left: 4px solid #ea7c12; }
.article-item-v2[data-type="reflection"] { border-left: 4px solid #6b7280; }

/* header row: badge + page numbers */
.art-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: .5rem;
}

/* title */
.article-item-v2 .article-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a3c5e;
  line-height: 1.4;
  margin: 0 0 .3rem;
}
.article-item-v2 .article-title a { color: inherit; text-decoration: none; }
.article-item-v2 .article-title a:hover { text-decoration: underline; color: #2563eb; }

/* authors */
.article-item-v2 .article-authors {
  font-size: .82rem;
  color: #475569;
  margin: 0 0 .35rem;
}

/* citation + doi — each on its own line */
.art-cite-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: .78rem;
  color: #64748b;
  margin-bottom: .5rem;
}
.art-journal-ref { font-style: italic; }
.art-doi-inline { font-size: .76rem; }
.art-doi-inline a   { color: #2563eb; text-decoration: none; }
.art-doi-inline a:hover { text-decoration: underline; }

/* page number chip */
.art-pg-inline {
  font-size: .72rem;
  font-weight: 700;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 999px;
  padding: 2px 10px;
  border: 1px solid #c7d2fe;
  white-space: nowrap;
}

/* bottom row: metrics + buttons */
.article-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid #f1f5f9;
}
.article-metrics {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* metric boxes */
.art-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 7px;
  min-width: 64px;
  border: 1px solid #e2e8f0;
  text-align: center;
}
.art-metric-num  { font-size: .88rem; font-weight: 700; line-height: 1.2; }
.art-metric-lbl  { font-size: .58rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; white-space: nowrap; }

.art-metric-views { background: #eef4ff; border-color: #c7d9f8; }
.art-metric-views .art-metric-num { color: #2563eb; }
.art-metric-views .art-metric-lbl { color: #3b82f6; }

.art-metric-dl { background: #f0fdf4; border-color: #bbf7d0; }
.art-metric-dl .art-metric-num { color: #16a34a; }
.art-metric-dl .art-metric-lbl { color: #22c55e; }

.art-metric-cite { background: #fff7ed; border-color: #fed7aa; }
.art-metric-cite .art-metric-num { color: #c2410c; }
.art-metric-cite .art-metric-lbl { color: #ea580c; }

/* button row */
.article-btn-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.btn-sm {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
/* Colors for .btn-pdf-sm/.btn-cite-sm/.btn-fulltext-sm now live in one
   place — style.css (loaded before this file on every page) — so Home and
   the Current Issue/Archive/Article pages show the same solid-red PDF /
   outline Cite / outline-green Full Text buttons instead of this file's
   old solid-blue Cite + plain-gray Full Text winning here by load order. */

/* Abstract toggle (for future use) */
.abstract-section {
  background: #f8fafc;
  border-radius: 0 0 8px 8px;
  padding: .85rem 1rem;
  font-size: .82rem;
  line-height: 1.65;
  color: #374151;
  border-top: 2px solid #e0e7ff;
  margin-top: .5rem;
  display: none;
}
.abstract-section.open { display: block; }

/* ── 7. ISSUE CARD ───────────────────────────────────────── */
.issue-card {
  background: linear-gradient(135deg, #1a3c5e 0%, #283593 100%);
  color: #fff;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.1rem;
}
.issue-card h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 .2rem; }
.issue-card p  { font-size: .8rem; opacity: .8; margin: 0 0 1rem; }
.issue-stats   { display: flex; flex-wrap: wrap; gap: .6rem; }
.issue-stat    { background: rgba(255,255,255,.13); border-radius: 8px; padding: .55rem 1rem; text-align: center; min-width: 64px; }
.issue-stat__num   { font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.issue-stat__label { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .8; margin-top: 2px; }

/* ── 8. SEARCH BAR ───────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: .5rem .75rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.search-bar .form-control {
  border: none;
  outline: none;
  font-size: .85rem;
  flex: 1;
  min-width: 160px;
  background: transparent;
  color: #374151;
}
.search-bar select.form-control {
  flex: 0 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: .3rem .5rem;
  background: #f8fafc;
  cursor: pointer;
}

/* ── 9. ALERT BOX ────────────────────────────────────────── */
.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  border-radius: 6px;
  padding: .7rem 1rem;
  font-size: .79rem;
  color: #1e40af;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ── 10. ARCHIVES PAGE ───────────────────────────────────── */

/* Volume section grouping */
.volume-section { margin-bottom: 2rem; }
.volume-section:last-child { margin-bottom: 0; }

/* Volume heading */
.volume-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding-left: .75rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.volume-sub {
  font-size: .72rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: .35rem;
}

/* Issue list (replaces grid — works for any issue count) */
.issue-grid {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

/* Horizontal list-view card */
.archive-issue-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: .7rem 1rem;
  transition: box-shadow .15s, border-color .15s;
}
.archive-issue-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,.07);
  border-color: #93c5fd;
  border-left-color: var(--accent);
}

/* Text block — grows to fill space */
.aic-info {
  flex: 1;
  min-width: 0;
}

/* Small volume label */
.aic-year {
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 2px;
}

/* Issue title */
.aic-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Article count chip */
.aic-count {
  font-size: .75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Button + badge row */
.aic-footer {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}

/* "Current" badge */
.badge-current {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 2px 7px;
  white-space: nowrap;
}

/* Mobile: stack on narrow screens */
@media (max-width: 600px) {
  .archive-issue-card {
    flex-wrap: wrap;
    gap: .5rem;
  }
  .aic-title { white-space: normal; }
  .aic-count { display: none; } /* count shown inside aic-info on mobile */
}

/* ── 11. QUICK LINKS SIDEBAR ─────────────────────────────── */
.quick-links-nav { display: flex; flex-direction: column; gap: 2px; }
.ql-link {
  display: block;
  font-size: .78rem;
  color: #374151;
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 6px;
  transition: all .15s;
  border: 1px solid transparent;
}
.ql-link:hover {
  background: #eef2ff;
  color: #3730a3;
  border-color: #c7d2fe;
  transform: translateX(2px);
}

/* ── 12. ARTICLE LANDING PAGE ────────────────────────────────────────────── */

/* Article type badge (replaces inline spans) */
.article-type-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 999px;
  vertical-align: middle;
}
/* Colors for .badge-original/.badge-review/etc. now live in one place —
   style.css (loaded before this file on every page that uses them) — so
   the same soft, pastel palette applies everywhere instead of this file's
   old solid/dark set fighting with style.css's for whichever page happened
   to load last. See style.css's "ARTICLE BADGES & LISTING" section. */

/* Article title on landing page */
.article-landing-title {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  color: #1a3c5e;
  line-height: 1.3;
  margin: .85rem 0 .5rem;
  letter-spacing: -.02em;
}

/* Authors + Affiliations */
.article-landing-authors {
  font-size: .92rem;
  color: #374151;
  margin-bottom: .2rem;
}
.article-landing-affiliations {
  font-size: .8rem;
  color: #6c757d;
  margin-bottom: 1.1rem;
  line-height: 1.55;
}

/* DOI / Volume / Pages row */
.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: .82rem;
  color: #374151;
  padding: .6rem 1rem;
  background: #f1f5f9;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  margin-bottom: .75rem;
}
.article-meta-row a { color: #1a3c5e; font-weight: 600; text-decoration: none; }
.article-meta-row a:hover { text-decoration: underline; }

/* Structured abstract (always visible on article page) */
.article-abstract {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #1a3c5e;
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin: 1.1rem 0;
}
.article-abstract h3 {
  font-size: .95rem;
  font-weight: 800;
  color: #1a3c5e;
  margin: 0 0 .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.abstract-field {
  margin-bottom: .75rem;
  font-size: .875rem;
  line-height: 1.65;
}
.abstract-field:last-child { margin-bottom: 0; }
.abstract-field > strong {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #1a3c5e;
  margin-bottom: 3px;
}
.abstract-field p { margin: 0; color: #374151; text-align: justify; }

/* Keywords */
.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .35rem;
}
.keyword-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 2px 10px;
}

/* Inline cite format tabs (article page cite-box) */
.cite-inline-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: .65rem;
}
.cite-inline-tab {
  font-size: .7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
}
.cite-inline-tab:hover {
  background: #ffedd5;
  border-color: #f97316;
}
.cite-inline-tab.active {
  background: #f97316;
  color: #fff;
  border-color: #ea580c;
}

/* Cite box */
.cite-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f97316;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.cite-box h4 {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #c2410c;
  margin: 0 0 .5rem;
}
.cite-text {
  font-size: .85rem;
  color: #374151;
  line-height: 1.65;
  margin-bottom: .75rem;
  font-style: italic;
}

/* Ethics + general alerts */
.alert {
  border-radius: 8px;
  padding: .9rem 1.15rem;
  font-size: .85rem;
  line-height: 1.6;
  margin: .85rem 0;
}
.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #16a34a;
  color: #14532d;
}
.alert-success strong { color: #166534; }

/* Prose sections (references, full-text) */
.prose h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a3c5e;
  margin: 1.5rem 0 .65rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid #e0e7ff;
}
.prose .references-list {
  padding-left: 1.5rem;
  font-size: .85rem;
  line-height: 1.7;
  color: #374151;
}
.prose .references-list li { margin-bottom: .4rem; }

/* License block at page bottom */
.license-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: .9rem 1.1rem;
  font-size: .82rem;
  color: #6c757d;
  margin-top: 1.5rem;
  line-height: 1.6;
}
.license-block a { color: #1a3c5e; }

/* [data-cite-open] button — triggers citation modal */
[data-cite-open] { cursor: pointer; }

/* ── 13. AUTHOR / AFFILIATION BLOCK (OJS-style) ─────────────────────────── */

/* Author name line with superscripts */
.article-author-names {
  font-size: .97rem;
  font-weight: 600;
  color: #1a3c5e;
  margin: .4rem 0 .15rem;
  line-height: 1.6;
}
.article-author-names sup {
  font-size: .6rem;
  font-weight: 700;
  color: #c9a227;
  margin-left: 1px;
  vertical-align: super;
}
.author-sep { color: #9ca3af; font-weight: 400; margin: 0 3px; }

/* ORCID badge inline */
.orcid-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  vertical-align: middle;
  margin-left: 4px;
}
.orcid-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #a6ce39;
  flex-shrink: 0;
}
.orcid-icon svg { width: 10px; height: 10px; }
.orcid-id-text {
  font-size: .65rem;
  font-weight: 600;
  color: #557c13;
  letter-spacing: .01em;
  line-height: 1;
}
.orcid-id-text:hover { text-decoration: underline; }

/* Numbered affiliation list */
.article-affiliations-list {
  list-style: none;
  padding: 0;
  margin: .3rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.article-affiliations-list li {
  font-size: .78rem;
  color: #6c757d;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.55;
}
.aff-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c9a227;
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Corresponding author note */
.corresponding-note {
  font-size: .74rem;
  color: #6c757d;
  font-style: italic;
  margin-bottom: .9rem;
}
.corresponding-note a {
  color: #1a3c5e;
  text-decoration: none;
}
.corresponding-note a:hover { text-decoration: underline; }

/* Author section wrapper */
.article-author-block {
  padding: .85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #c9a227;
  border-radius: 8px;
  margin-bottom: .75rem;
}
