/*
Theme Name: Salient Child Theme
Template: salient
Version: 1.0
*/

/* =========================
   TOC WRAPPER
========================= */
.toc-pills{
  position: sticky;
  top: 0;
  z-index: 999;

  width: calc(100vw - 64px);
  margin-left: calc(50% - 50vw + 32px);
  margin-right: calc(50% - 50vw + 32px);

  margin-top: 0;
  margin-bottom: 24px;        /* ↓ was 32 */
  padding: 12px 22px;         /* ↓ was 16px 24px */

  border-radius: 18px;

  background: rgba(242, 237, 230, 0.8);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);

  border: none !important;
  box-shadow: none !important;

  overflow: visible !important;
}

/* Fixed fallback */
.toc-pills.is-fixed{
  position: fixed !important;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  margin: 0 !important;
}

.toc-pills-spacer{ height: 0; }

/* =========================
   TOP ROW
========================= */
.toc-pills__top{
  display: flex;
  align-items: center;     /* tighter vertical alignment */
  gap: 12px;
  margin-bottom: 8px;      /* ↓ was 12 */
}

.toc-pills__label{
  font-weight: 700;
  white-space: nowrap;
  font-size: 15px;
}

.toc-pills__posttitle{
  opacity: .65;
  font-size: 14px;
}

/* =========================
   CHIPS ROW
========================= */
.toc-pills__chips{
  display: flex;
  gap: 8px;
  overflow-x: auto;

  padding: 0 0 8px;        /* ↓ was 2px 0 10px */

  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.toc-pills__chips::-webkit-scrollbar{ display:none; }

/* =========================
   CHIP SIZE
========================= */
.toc-pill{
  display: inline-flex;
  align-items: center;
  gap: 7px;

  padding: 6px 10px;       /* ↓ was 7px 11px */
  border-radius: 999px;

  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.08);

  text-decoration: none;
  white-space: nowrap;

  font-size: 13.5px;       /* ↓ slightly */
  line-height: 1;

  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}

.toc-pill,
.toc-pill:link,
.toc-pill:visited{
  color: rgba(0, 35, 1, 0.8);
}
.toc-pill:hover{ color:#002301; }

.toc-pill__num{
  width: 18px;             /* ↓ was 20 */
  height: 18px;
  font-size: 10px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-weight: 700;
  background:#d7df00;
  color:#0b0b0b;
}

.toc-pill.is-active{
  color:#002301;
  background:rgba(255,255,255,0.9);
  border-color:rgba(0,0,0,0.16);
}

/* =========================
   PROGRESS BAR
========================= */
.toc-pills__bar{
  height: 3px;             /* ↓ was 4 */
  margin-top: 6px;         /* ↓ was 8 */
  border-radius:999px;
  background:rgba(0,0,0,0.12);
  overflow:hidden;
}

.toc-pills__bar-inner{
  height:100%;
  width:0%;
  background:#d7df00;
  border-radius:999px;
}

/* =========================
   FADE MASK
========================= */
@supports (-webkit-mask-image: linear-gradient(#000,#000)) or (mask-image: linear-gradient(#000,#000)) {
  .toc-pills__chips{
    -webkit-mask-image: linear-gradient(to right,
      transparent 0,
      #000 30px,
      #000 calc(100% - 30px),
      transparent 100%
    );
    mask-image: linear-gradient(to right,
      transparent 0,
      #000 30px,
      #000 calc(100% - 30px),
      transparent 100%
    );
  }
}

/* =========================
   MOBILE
========================= */
@media (max-width:768px){

  .toc-pills{
    width:100vw;
    margin-left:50%;
    transform:translateX(-50%);
    padding:10px 12px;
    border-radius:0;
  }

  .toc-pills__top{
    margin-bottom:6px;
  }

  .toc-pills__label{ font-size:14px; }

  .toc-pills__posttitle{
    font-size:13px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:70vw;
  }

  .toc-pill{
    font-size:12.5px;
    padding:5px 8px;
  }

  .toc-pill__num{
    width:16px;
    height:16px;
    font-size:9px;
  }

  .toc-pills__bar{
    height:3px;
    margin-top:5px;
  }
}