/* ============================================================
   issue_browser.css — 过刊浏览（b12 版式）
   三种显示模式：封面显示 / 表格显示 / 年代显示
   依赖 tpl-b12.css 的 --b12-* 设计令牌与 page-head/ph-* 页头类
   ============================================================ */

/* ---------- 页头右侧模式切换 ---------- */
.ib-head-actions{display:flex;margin-bottom:.6rem}
.ib-tabs{
  display:inline-flex;gap:.15rem;padding:.28rem;border-radius:.42rem;
  background:#fff;border:1px solid #e4e6ef;
  box-shadow:0 0 14px rgba(76,87,125,.07);
}
.ib-tab{
  border:0;background:transparent;cursor:pointer;
  padding:.5rem 1.15rem;border-radius:.32rem;
  font-size:.9rem;font-weight:600;color:#7e8299;
  transition:color .15s,background .15s,box-shadow .15s;white-space:nowrap;
}
.ib-tab:hover{color:#3445e5}
.ib-tab.on{
  background:#3445e5;color:#fff;
  box-shadow:0 4px 12px rgba(52,69,229,.30);
}

/* ---------- 主卡片 ---------- */
.ib-card{
  background:#fff;border-radius:.42rem;
  box-shadow:0 0 20px rgba(76,87,125,.08);
  padding:1.4rem 1.5rem 1.7rem;margin-top:1.25rem;
}
.ib-pane[hidden]{display:none!important}
.ib-empty{padding:3.2rem 1rem;text-align:center;color:#7e8299;font-size:.92rem}

/* ---------- ① 封面显示：按年分组 + 封面卡片 ---------- */
.ib-group{margin-bottom:.4rem}
.ib-group:last-child{margin-bottom:0}
.ib-group-head{display:flex;align-items:center;gap:.9rem;margin:1.1rem 0 1rem}
.ib-group-head:first-child{margin-top:.1rem}
.ib-group-head h4{
  margin:0;font-size:1.05rem;font-weight:700;color:#181c32;white-space:nowrap;
}
.ib-group-head .ib-line{flex:1;height:1px;background:#ebedf3}
.ib-covers{
  display:grid;gap:1.2rem 1rem;
  grid-template-columns:repeat(auto-fill,minmax(152px,1fr));
}
.ib-cover{
  display:flex;flex-direction:column;text-decoration:none;
}
.ib-cover-img{
  display:flex;align-items:center;justify-content:center;
  aspect-ratio:3/4;overflow:hidden;border-radius:.3rem;
  background:linear-gradient(160deg,#e8eef7 0%,#d5dfeb 100%);
  box-shadow:0 6px 18px rgba(24,28,50,.14);
  transition:transform .18s,box-shadow .18s;color:#9aa6b5;
}
.ib-cover:hover .ib-cover-img{
  transform:translateY(-4px);
  box-shadow:0 14px 30px rgba(24,28,50,.22);
}
.ib-cover-img img{width:100%;height:100%;object-fit:cover;display:block}
.ib-cover h5{
  margin:.65rem 0 0;font-size:.86rem;font-weight:600;line-height:1.35;
  color:#3f4254;
}
.ib-cover:hover h5{color:#3445e5}
.ib-pages{margin:.2rem 0 0;font-size:.72rem;color:#7e8299}
/* 卡片内的封面/标题链接（2026-10-19：卡片从 <a> 改为 <div>，避免与下载链接嵌套成非法锚点） */
.ib-cover-link{display:block;color:inherit;text-decoration:none}
.ib-cover-link:hover,.ib-cover-link:focus{text-decoration:none;color:inherit}
/* 下载区（目录 / 全文 / 封面）：卡片内一行小 chip。
   用 margin 而不是 gap —— IE11 不支持 flex gap */
.ib-dls{display:block;margin-top:.4rem;padding-top:.35rem;border-top:1px dashed #ebedf3}
.ib-dls a{
  display:inline-flex;align-items:center;font-size:.7rem;line-height:1.5;
  color:#7e8299;background:#f3f6f9;border-radius:.18rem;
  padding:.12rem .42rem;margin:0 .3rem .3rem 0;text-decoration:none;
}
.ib-dls a:hover{background:#f1f3ff;color:#3445e5;text-decoration:none}

/* ---------- ② 表格显示：年卷行 + 期次格 ---------- */
.ib-table{
  border:1px solid #e4e6ef;border-radius:.42rem;
  overflow:hidden;
}
.ib-trow{display:flex;border-bottom:1px solid #e4e6ef}
.ib-trow:last-child{border-bottom:0}
.ib-trow:nth-child(even){background:#fafbfd}
.ib-yearcell{
  flex:0 0 190px;display:flex;align-items:center;
  padding:.85rem 1.05rem;font-size:.92rem;font-weight:700;color:#181c32;
  border-right:1px solid #e4e6ef;background:#fff;
}
.ib-trow:nth-child(even) .ib-yearcell{background:#fff}
.ib-cells{flex:1;display:flex;flex-wrap:wrap;align-content:flex-start}
.ib-cell{
  flex:1 0 118px;min-width:118px;display:flex;flex-direction:column;align-items:center;
  padding:.6rem .5rem;text-align:center;
  border-right:1px solid #e4e6ef;
  border-bottom:1px solid #e4e6ef;margin-bottom:-1px;
}
.ib-cell:nth-last-child(-n+1){border-right:0}
.ib-cell a{
  font-size:.86rem;font-weight:600;color:#3f4254;
  padding:.15rem .5rem;border-radius:.25rem;transition:color .15s,background .15s;
}
.ib-cell a:hover{color:#3445e5;background:#f1f3ff}
.ib-cell .ib-pages{margin:.1rem 0 0}

/* ---------- ③ 年代显示：10 年分组 + 年份块 ---------- */
.ib-decade{margin-top:1.6rem}
.ib-decade:first-child{margin-top:.2rem}
.ib-decade-head{
  display:inline-flex;align-items:center;
  padding:.38rem 1rem;border-radius:.42rem;
  background:#f1f3ff;color:#3445e5;
  font-size:.98rem;font-weight:700;letter-spacing:.5px;
}
.ib-era-grid{
  display:grid;gap:1rem;margin-top:.95rem;
  grid-template-columns:repeat(auto-fill,minmax(236px,1fr));
}
.ib-era{
  border:1px solid #e4e6ef;border-radius:.42rem;
  padding:.85rem .95rem;background:#fff;
  transition:box-shadow .15s,border-color .15s;
}
.ib-era:hover{border-color:rgba(52,69,229,.35);box-shadow:0 6px 18px rgba(52,69,229,.10)}
.ib-era h5{margin:0;font-size:.92rem;font-weight:700;color:#181c32}
.ib-era-list{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.55rem}
.ib-era-issue{
  display:inline-flex;flex-direction:column;align-items:flex-start;
  padding:.4rem .7rem;border:1px solid #e4e6ef;border-radius:.3rem;
  text-decoration:none;background:#fff;
  transition:border-color .15s,background .15s;
}
.ib-era-issue b{font-size:.8rem;font-weight:600;color:#3f4254}
.ib-era-issue .ib-pages{margin:.05rem 0 0;font-size:.66rem}
.ib-era-issue:hover{border-color:#3445e5;background:#f1f3ff}
.ib-era-issue:hover b{color:#3445e5}

/* ---------- 响应式 ---------- */
@media (max-width:991px){
  .ib-head-actions{justify-content:flex-start!important}
  .ib-tabs{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .ib-tab{flex:1 0 auto;padding:.5rem .9rem}
  .ib-card{padding:1.1rem 1rem 1.3rem}
  .ib-covers{grid-template-columns:repeat(auto-fill,minmax(122px,1fr));gap:.9rem .8rem}
  .ib-trow{flex-direction:column}
  .ib-yearcell{
    flex:0 0 auto;border-right:0;border-bottom:1px dashed #e4e6ef;
    padding:.6rem 1rem;
  }
  .ib-cell{flex:1 0 33.33%;min-width:0}
  .ib-cell:nth-last-child(-n+1){border-right:1px solid #e4e6ef}
  .ib-era-grid{grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:.75rem}
}
