/*
 * Buzl Dynamic TOC - Stylesheet
 * Version: 1.0
 * Description: Sticky Table of Contents styling for WordPress.
 */

/* 🔹 Base Container */
.buzl-toc-container {
  position: -webkit-sticky;
  position: sticky;
  top: 100px; /* Distance from top when scrolling */
  background: #ffffff;
  padding: 16px 20px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  z-index: 999;
  max-width: 280px;
  font-family: "Inter", "Poppins", sans-serif;
  transition: all 0.3s ease;
}

/* Optional hover lift */
.buzl-toc-container:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* 🔹 Title */
.buzl-toc-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #222;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 5px;
}

/* 🔹 TOC List */
.buzl-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.buzl-toc-list li {
  margin-bottom: 8px;
}

.buzl-toc-list li a {
  color: #444;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  display: block;
  border-left: 3px solid transparent;
  padding-left: 8px;
  transition: all 0.2s ease;
}

/* Hover & Active State */
.buzl-toc-list li a:hover {
  color: #0073aa;
  border-left-color: #0073aa;
  padding-left: 10px;
}

/* Active link highlight (optional if JS supports it) */
.buzl-toc-list li a.active {
  color: #0073aa;
  font-weight: 600;
  border-left-color: #0073aa;
}

/* 🔹 Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* 🔹 Responsive Fixes */
@media screen and (max-width: 992px) {
  .buzl-toc-container {
    position: relative;
    top: auto;
    max-width: 100%;
    margin-bottom: 25px;
  }
}

@media screen and (max-width: 600px) {
  .buzl-toc-title {
    font-size: 15px;
  }
  .buzl-toc-list li a {
    font-size: 13px;
  }
}

/* 🔹 Elementor/Flexbox Fixes */
.elementor-column, 
.elementor-widget-wrap {
  overflow: visible !important;
}

/* 🔹 Smooth Scroll Offset for fixed headers */
:target::before {
  content: "";
  display: block;
  height: 80px; /* height of sticky header */
  margin-top: -80px;
  visibility: hidden;
}
