/* Elemate TOC — full stylesheet */

.elementor-widget-elemate_toc { width: 233px; }
.eltoc { max-width: 100%; }
.eltoc.is-empty { display: none; }

/* =============== Header =============== */
.eltoc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px 5px;
}
.eltoc-title {
  font-size: 15px;
  font-weight: 600;
}

/* Toggle buttons (Elementor-style icon wrappers) */
.elemate-toc__toggle-button {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 35px;
  width: 15px;
}

/* Show only the relevant icon by state */
.eltoc .elemate-toc__toggle-button--expand { display: none; }
.eltoc.elemate-toc--collapsed .elemate-toc__toggle-button--expand { display: flex; }
.eltoc.elemate-toc--collapsed .elemate-toc__toggle-button--collapse { display: none; }

/* =============== Search row =============== */
.eltoc-search {
  display: flex;
  align-items: center;
  padding: 0 0 14px;
  margin-top: -7px;
}
.eltoc-search__field {
  flex: 1 1 auto;
  display: block;
  padding: 0 12px;
}
.eltoc-search input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 0;
}
.eltoc-search input:focus-visible {
  outline: none;
  border-color: #2563eb;
}

/* =============== Body + smooth shutter =============== */
.eltoc-body {
  /* Important: content-box so JS can measure content height correctly */
  box-sizing: content-box;

  /* Visuals */
  padding: 5px 12px 12px;
  border-top: 1px solid #E5E7EB;

  /* Shutter mechanics */
  overflow: hidden;
  transition:
    height .34s ease,
    padding-top .34s ease,
    padding-bottom .34s ease,
    border-top-width .34s ease;
  will-change: height;
}

/* When collapsed: let JS set height:0 inline; CSS animates padding/border */
.eltoc.elemate-toc--collapsed .eltoc-body {
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
}

/* IMPORTANT: Do NOT use display:none on .eltoc-body — it breaks measuring */

/* =============== List =============== */
.eltoc-list { margin: 0; padding-left: 0; }
.eltoc-list li { margin: 4px 0; list-style: none; }

.eltoc-li.depth-1 { margin-left: 12px; }
.eltoc-li.depth-2 { margin-left: 24px; }
.eltoc-li.depth-3 { margin-left: 36px; }
.eltoc-li.depth-4 { margin-left: 48px; }

.eltoc a { text-decoration: none; color: #252525; }
.eltoc .eltoc-num { color: #252525; }
.eltoc a.is-active, .eltoc .eltoc-li:has(> a.is-active) > .eltoc-num {color: #61CE70; }
/* =============== Back to top =============== */
.eltoc-backtop {
  margin-top: 10px;
  font-size: .9em;
  font-weight: 600;
  border-top: 1px solid #E5E7EB;
  padding-top: 10px;
}

/* =============== Small match-count badge =============== */
.eltoc-hit {
  margin-left: 6px;
  font-size: 12px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #eef2ff;
  color: #111827;
}
