/* ==========================================================================
   Journal Portal Widgets — gaya blok sidebar
   Warna: --jw-primary dan --jw-accent (diatur dari Settings plugin).
   ========================================================================== */
.jw-block {
  --jw-primary: #030271;
  --jw-accent: #ed991f;
  --jw-line: #e3e7ef;
  --jw-soft: #f6f7fb;
  --jw-ink: #1d2340;
  --jw-muted: #687089;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color: var(--jw-ink);
}
.jw-block, .jw-block * { box-sizing: border-box; }
.jw-block .content { font-size: .9rem; line-height: 1.5; }
.jw-block a { color: var(--jw-primary); text-decoration: none; }
.jw-block a:hover { text-decoration: underline; }
.jw-block .fa { width: 1.15em; text-align: center; }
.jw-block .title { display: flex; align-items: center; gap: 8px; }

/* blok tanpa judul (Quick Actions) */
.jw-block > .title.jw-notitle,
:root body .pkp_structure_sidebar .pkp_block.jw-block > .title.jw-notitle { display: none !important; }

/* tombol */
.jw-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin: 10px 0 0; padding: 10px 14px;
  border: 1.5px solid var(--jw-primary); border-radius: 6px;
  background: #fff; color: var(--jw-primary) !important;
  font: 600 .88rem/1.2 inherit; text-decoration: none !important;
  transition: background .18s, color .18s, border-color .18s;
}
.jw-btn:first-child { margin-top: 0; }
.jw-btn-solid { background: var(--jw-primary); color: #fff !important; }
.jw-btn:hover, .jw-btn:focus-visible { background: var(--jw-accent); border-color: var(--jw-accent); color: #1a1300 !important; }
.jw-btn-ghost { border-color: var(--jw-line); }
.jw-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-weight: 600; font-size: .85rem; }
.jw-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--jw-muted); font-size: .78rem; }
.jw-meta .fa { color: var(--jw-accent); }
.jw-chip {
  margin-left: auto; padding: 2px 9px; border: 1px solid var(--jw-line); border-radius: 999px;
  background: #fff; color: var(--jw-primary); font-size: .7rem; font-weight: 700; white-space: nowrap;
}
.jw-flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); flex: none; }

/* 1. Journal Issue */
.jw-issue .content { text-align: center; }
.jw-cover { display: block; }
.jw-cover img { display: block; width: 100%; max-width: 210px; height: auto; margin: 0 auto; border-radius: 4px; box-shadow: 0 12px 24px -12px rgba(16,24,64,.55); transition: transform .25s; }
.jw-cover:hover img { transform: translateY(-3px); }
.jw-cover-ph {
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  max-width: 210px; aspect-ratio: 3 / 4; margin: 0 auto; padding: 16px; border-radius: 4px;
  background: linear-gradient(160deg, var(--jw-primary), #000 140%); color: #fff;
}
.jw-cover-ph b { font-size: 1.4rem; }
.jw-cover-ph i { font-style: normal; color: var(--jw-accent); font-weight: 600; }
.jw-issue-title { display: block; margin: 12px 0 0; font-weight: 700; }

/* 2. Quick Actions */
.jw-social { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.jw-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 36px; border: 1px solid var(--jw-line); border-radius: 6px;
  color: var(--jw-primary); font-size: 16px; text-decoration: none !important;
}
.jw-social a:hover { background: var(--jw-primary); border-color: var(--jw-primary); color: #fff; }

/* 3. Journal Menu */
.jw-menu { list-style: none; margin: 0; padding: 0; }
.jw-menu li { margin: 0; padding: 0; border-bottom: 1px solid #eef0f5; list-style: none; }
.jw-menu li:last-child { border-bottom: 0; }
.jw-menu a { display: flex !important; align-items: center; gap: 10px; padding: 9px 6px; color: var(--jw-ink) !important; border-radius: 6px; }
.jw-menu a::before { display: none !important; }
.jw-menu a .fa { color: var(--jw-accent); font-size: 1rem; }
.jw-menu a:hover { background: var(--jw-soft); color: var(--jw-primary) !important; text-decoration: none; }

/* 4. Author Diversity */
.jw-dv-bar { display: flex; height: 8px; margin: 4px 0 12px; border-radius: 999px; overflow: hidden; background: #eceff5; }
.jw-dv-bar span { display: block; height: 100%; }
.jw-dv-list { list-style: none; margin: 0 0 4px; padding: 0; }
.jw-dv-list li { display: flex; align-items: center; gap: 7px; padding: 5px 0; list-style: none; margin: 0; }
.jw-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.jw-dv-name { flex: 1; min-width: 0; }
.jw-dv-list b { font-size: .82rem; }
.jw-diversity .jw-btn { margin-top: 12px; }

/* 5. News */
.jw-news { padding: 10px 0; border-bottom: 1px solid #eef0f5; }
.jw-news:first-child { padding-top: 2px; }
.jw-news:last-of-type { border-bottom: 0; }
.jw-news-t { font-weight: 600; font-size: .95rem; line-height: 1.35; }
.jw-news p { margin: 6px 0 0; color: #3d4462; font-size: .84rem; }

/* 6. Keywords */
.jw-cloud { line-height: 1.9; text-align: center; }
.jw-kw { display: inline-block; margin: 0 3px; color: var(--jw-primary); font-weight: 500; white-space: nowrap; }
.jw-kw:hover { color: var(--jw-accent); text-decoration: none !important; }
.jw-kw-1 { font-size: .78rem; opacity: .75; }
.jw-kw-2 { font-size: .88rem; }
.jw-kw-3 { font-size: 1rem; font-weight: 600; }
.jw-kw-4 { font-size: 1.2rem; font-weight: 600; }
.jw-kw-5 { font-size: 1.45rem; font-weight: 700; color: var(--jw-accent); }

/* 7. Most Accessed */
.jw-pop { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #e3e7ef; }
.jw-pop:first-child { padding-top: 2px; }
.jw-pop:last-child { border-bottom: 0; }
.jw-rank {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 26px; margin-top: 2px; background: var(--jw-primary); color: #fff;
  font-size: .75rem; font-weight: 800;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.jw-pop:first-child .jw-rank { background: var(--jw-accent); color: #1a1300; }
.jw-pop-t { font-weight: 600; font-size: .88rem; line-height: 1.35; }
.jw-au { margin-top: 2px; }

/* 8. Editorial Board */
.jw-role { margin: 14px 0 6px; padding-bottom: 6px; border-bottom: 1px dashed #d4d9e5; font-size: .88rem; font-weight: 700; color: var(--jw-ink); }
.jw-role:first-child { margin-top: 2px; }
.jw-person { padding: 5px 0; }
.jw-person a, .jw-person b { display: block; font-weight: 600; color: var(--jw-primary); }
.jw-person span { display: block; color: #3d4462; font-size: .82rem; }
.jw-editorial .jw-more { float: right; padding: 3px 9px; border: 1px solid var(--jw-line); border-radius: 4px; }
.jw-editorial .content::after { content: ""; display: table; clear: both; }

/* 9. Published Volumes */
.jw-range { margin: -2px 0 6px; text-align: right; color: var(--jw-muted); font-size: .72rem; }
.jw-year { margin: 0 0 8px; border: 1px solid var(--jw-line); border-radius: 6px; background: #fff; }
.jw-year summary {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; list-style: none;
  font-weight: 600;
}
.jw-year summary::-webkit-details-marker { display: none; }
.jw-year summary::after { content: "\f107"; font-family: FontAwesome; margin-left: auto; color: var(--jw-muted); transition: transform .2s; }
.jw-year[open] summary::after { transform: rotate(180deg); }
.jw-count { padding: 0 7px; border-radius: 999px; background: var(--jw-soft); color: var(--jw-muted); font-size: .72rem; }
.jw-year ul { list-style: none; margin: 0; padding: 0 12px 8px; }
.jw-year li { list-style: none; margin: 0; padding: 0; }
.jw-year li a { display: flex !important; align-items: center; gap: 8px; padding: 5px 4px; color: var(--jw-ink) !important; }
.jw-year li a::before { display: none !important; }
.jw-year li a .fa { color: var(--jw-accent); }

/* 10. Visitors */
.jw-vis { padding: 12px; border: 1px solid var(--jw-line); border-radius: 8px; }
.jw-vis-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.jw-vis-h b { font-size: .95rem; }
.jw-vis-h span { color: var(--jw-muted); font-size: .72rem; }
.jw-vis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.jw-vis-row { display: flex; align-items: center; gap: 6px; font-size: .78rem; }
.jw-vis-row span { font-weight: 600; }
.jw-vis-row b { margin-left: auto; font-weight: 600; }
.jw-vis-total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--jw-line); font-size: .8rem; font-weight: 700; }
.jw-vis-note { margin-top: 6px; text-align: center; color: var(--jw-muted); font-size: .7rem; }

/* 11. Google Scholar */
.jw-gs { width: 100%; border-collapse: collapse; font-size: .82rem; }
.jw-gs th, .jw-gs td { padding: 6px 4px; border-bottom: 1px solid var(--jw-line); text-align: right; }
.jw-gs th:first-child, .jw-gs td:first-child { text-align: left; color: var(--jw-primary); }
.jw-gs th { color: var(--jw-muted); font-weight: 600; font-size: .74rem; }
.jw-gs-chart { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin: 14px 0 4px; padding: 0 2px; border-bottom: 1px solid var(--jw-line); }
.jw-gs-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.jw-gs-col i { display: block; width: 100%; max-width: 18px; background: #9aa1b5; border-radius: 2px 2px 0 0; }
.jw-gs-col:last-child i { background: var(--jw-primary); }
.jw-gs-col span { margin-top: 3px; color: var(--jw-muted); font-size: .64rem; transform: translateY(16px); }
.jw-gs-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 22px; font-size: .74rem; color: var(--jw-muted); }
.jw-gs-foot a { font-weight: 600; }

/* 13. Scopus Citation */
.jw-sc-hero { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding: 12px 14px;
  border-radius: 8px; background: linear-gradient(135deg, var(--jw-primary), color-mix(in srgb, var(--jw-primary) 65%, #e9711c)); color: #fff; }
.jw-sc-score b { display: block; font-size: 1.9rem; line-height: 1; }
.jw-sc-score span { font-size: .74rem; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.jw-sc-q { padding: 4px 12px; border-radius: 999px; background: var(--jw-accent); color: #1a1300; font-weight: 800; font-size: .9rem; }
.jw-sc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
.jw-sc-tiles div { padding: 8px 6px; border: 1px solid var(--jw-line); border-radius: 6px; text-align: center; background: #fff; }
.jw-sc-tiles b { display: block; font-size: 1rem; color: var(--jw-primary); }
.jw-sc-tiles span { font-size: .62rem; color: var(--jw-muted); text-transform: uppercase; letter-spacing: .04em; }
.jw-sc-chart .jw-gs-col:last-child i { background: #e9711c; }

/* 12. Poster */
.jw-poster { display: block; }
.jw-poster img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 10px 22px -14px rgba(16,24,64,.6); }

@media (prefers-reduced-motion: reduce) {
  .jw-cover img, .jw-btn, .jw-year summary::after { transition: none; }
}
