/* ===== FLOAT TOC - LEFT TOP + SCROLL SPY ===== */

#toc-float {
  position: fixed;
  left: 18px;
  top: 25px;
  z-index: 9999;
}

/* Nút tròn */
#toc-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.35);
  background: linear-gradient(145deg, #242424, #151515);
  color: #e6d18f;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
#toc-toggle:hover {
  box-shadow: 0 0 18px rgba(212,175,55,0.35);
}

/* Box TOC */
#toc-box {
  position: absolute;
  top: 56px;
  left: 0;
  width: 310px;
  max-height: 70vh;
  background: linear-gradient(180deg, #1f1f1f, #141414);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  display: none;
  overflow: hidden;
}

/* Header */
#toc-box-header {
  padding: 0.75rem 1rem;
  font-weight: 650;
  color: #f1e4bd;
  border-bottom: 1px solid rgba(212,175,55,0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Close */
#toc-close {
  cursor: pointer;
  font-size: 20px;
  color: #e6d18f;
}

/* Nội dung */
#toc-content {
  padding: 0.75rem 1rem;
  overflow-y: auto;
  font-size: 0.92rem;
}

/* Link */
#toc-content a {
  display: block;
  color: #d8cfa8;
  text-decoration: none;
  margin-bottom: 0.55rem;
  line-height: 1.45;
  border-radius: 10px;
  padding: 0.38rem 0.55rem;
  transition: all 0.2s ease;
}
#toc-content a:hover {
  color: #ffd86b;
  background: rgba(255,255,255,0.04);
}

/* ACTIVE (scroll spy) */
#toc-content a.is-active {
  color: #ffd86b;
  background: rgba(212,175,55,0.10);
  border: 1px solid rgba(212,175,55,0.28);
  box-shadow: 0 0 12px rgba(212,175,55,0.18);
}

/* Icon con giáp */
#toc-content .toc-ico {
  display: inline-block;
  width: 1.4em;
  margin-right: 0.35rem;
  opacity: 0.95;
}

/* Mobile */
@media (max-width: 768px) {
  #toc-box { width: 270px; }
}