/* ============================================================
   SH Single Post Paper Sidebar
   Applies only on single posts because the plugin enqueues it only there.
   ============================================================ */

/* --- Optional: hide existing cluttered widgets on single posts --- */
/* Comment these out if you want to keep the old widgets visible. */
body.single-post #secondary .widget,
body.single-post .sidebar .widget,
body.single-post .widget-area .widget {
  display: none;
}

/* We will insert our paper element into the sidebar; show it even if widgets are hidden */
body.single-post #sh-paper-sidebar {
  display: block !important;
}

/* --- Paper container --- */
.paper-style-sidebar{
  width: 100%;
  display: grid;
  gap: 1rem;
}

/* Paper block look */
.paper-block{
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

/* Sticky “bookmark” feel */
@media (min-width: 1024px){
  /* Kadence often has sticky header; give a little top offset */
  .paper-style-sidebar{
    position: sticky;
    top: 110px;
  }
}

.paper-title{
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--global-palette3);
  margin: 0 0 .65rem 0;
}

/* TOC list */
.blogpost-toc ul{
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: .35rem;
}

.blogpost-toc li{
  margin: 0;
  padding: 0;
}

.blogpost-toc a{
  display: inline-block;
  text-decoration: none;
  color: var(--global-palette4);
  line-height: 1.35;
  font-size: .92rem;
  padding: .18rem .15rem;
  border-radius: 10px;
}

.blogpost-toc a:hover{
  background: rgba(0,0,0,0.04);
}

.blogpost-toc .toc-h3{
  padding-left: .75rem;
  font-size: .9rem;
  opacity: .95;
}

/* Active section highlight (set by JS) */
.blogpost-toc a.is-active{
  background: rgba(0,0,0,0.06);
  color: var(--global-palette3);
}

/* Support link */
.paper-support-link{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  color: var(--global-palette1);
  padding: .35rem .55rem;
  border-radius: 12px;
}

.paper-support-link:hover{
  background: rgba(0,0,0,0.04);
}

/* If TOC is empty (no headings), show a calm note */
.blogpost-toc .toc-empty{
  font-size: .92rem;
  opacity: .8;
}

/* ============================================================
   NEW: Pagination block (multi-page posts)
   ============================================================ */

.paper-pagination-nav{
  margin-top: .25rem;
}

.paper-pagination-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}

.paper-pagination-list li{
  margin: 0;
  padding: 0;
}

.paper-page-num,
.paper-page-prev,
.paper-page-next{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 .5rem;
  font-size: .85rem;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--global-palette4);
}

.paper-page-num:hover,
.paper-page-prev:hover,
.paper-page-next:hover{
  background: rgba(0,0,0,0.04);
}

.paper-page-num.is-current{
  background: rgba(0,0,0,0.06);
  font-weight: 600;
  border-color: rgba(0,0,0,0.12);
  color: var(--global-palette3);
}

/* ============================================================
   Restore thumbnail polish (rounded corners + hover zoom)
   (applies site-wide on single posts only; safe selectors)
   ============================================================ */
body.single-post a.post-thumbnail{
  display:block;
  overflow:hidden;
  border-radius: 14px;
}

body.single-post a.post-thumbnail img{
  display:block;
  width:100%;
  height:auto;
}

@media (hover:hover){
  body.single-post a.post-thumbnail:hover img{
    transform: scale(1.04);
    transition: transform 280ms ease, filter 280ms ease;
    filter: brightness(1.03);
  }
}

/* Comments item in TOC */
.blogpost-toc a.toc-comments{
  margin-top: .35rem;
  opacity: .95;
}
.blogpost-toc .toc-comments-count{
  opacity: .75;
  font-weight: 600;
}