/**
 * File maintenance note
 * File: assets/css/toc-nav.css
 * Purpose: Theme style module.
 * Usage: Loaded through the theme enqueue system.
 * Note: Keep selectors scoped and avoid unrelated global changes.
 */


:root{
  --toc-container-bg:var(--section-container-bg);
  --toc-container-border:var(--section-container-border);
  --toc-container-padding:clamp(16px,2.2vw,24px);
  --toc-container-padding-mobile:15px;
  --toc-title-text:#174632;
  --toc-link-text:#3e5147;
  --toc-link-hover:#174632;
  --toc-link-bg:#ffffff;
  --toc-link-border:#d8d9ce;
  --toc-radius:var(--section-container-radius);
  --toc-toggle-text:#173c2d;
  --toc-toggle-bg:#d6aa35;
}
.wp-toc{
  width:100%;
  margin:var(--layout-section-gap) 0;
  padding:var(--toc-container-padding);
  border:1px solid var(--toc-container-border);
  border-radius:18px;
  background:#f8f5eb;
  box-shadow:0 12px 30px rgba(23,67,49,.08);
  box-sizing:border-box;
}
.wp-toc__details{margin:0;padding:0}
.wp-toc__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  margin:0 0 10px;
  padding:0 0 12px;
  border-bottom:1px solid rgba(205,160,56,.32);
  box-sizing:border-box;
}
summary.wp-toc__header{cursor:pointer;list-style:none}
summary.wp-toc__header::-webkit-details-marker{display:none}
.wp-toc__title{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding:0;
  color:var(--toc-title-text);
  font-weight:950;
  font-size:clamp(1.22rem,2vw,1.55rem);
  line-height:1.2;
}
.wp-toc__title.wp-toc__title--has-icon{padding:0}
.wp-toc__title-icon{
  width:22px;
  height:22px;
  display:inline-grid;
  place-items:center;
  flex:0 0 22px;
  color:var(--toc-icon-color,currentColor);
  margin:0;
  line-height:0;
}
.wp-toc__title-icon svg{width:100%;height:100%;display:block;fill:currentColor}
.wp-toc__title-text{display:inline-flex;align-items:center;min-height:22px}
.wp-toc__toggle{
  display:inline-grid;
  place-items:center;
  width:34px;
  height:34px;
  padding:0;
  border:1px solid #e4c563;
  border-radius:50%;
  background:var(--toc-toggle-bg);
  color:var(--toc-toggle-text);
  font-weight:950;
  cursor:pointer;
  line-height:1;
  box-shadow:0 8px 18px rgba(88,66,17,.16);
  flex:0 0 auto;
}
.wp-toc .icon{width:18px;height:18px;display:block;color:var(--toc-toggle-text)}
.wp-toc ul,.wp-toc ol,.wp-toc__list{list-style:none;margin:0;padding:0;display:grid;gap:8px;width:100%;box-sizing:border-box}
.wp-toc__item{min-width:0;width:100%;box-sizing:border-box}
.wp-toc a{
  display:flex;
  align-items:center;
  width:100%;
  margin:0;
  padding:10px 12px;
  border-radius:8px;
  background:var(--toc-link-bg);
  color:var(--toc-link-text);
  border:1px solid var(--toc-link-border);
  font-weight:800;
  text-decoration:none;
  box-sizing:border-box;
}
.wp-toc a:hover{color:var(--toc-link-hover);background:#f0f5ef;border-color:#caa03a}
.wp-toc__details:not([open]) > .wp-toc__list{display:none!important}
.wp-toc__details .icon-show{display:block}
.wp-toc__details .icon-hide{display:none}
.wp-toc__details[open] .icon-show{display:none}
.wp-toc__details[open] .icon-hide{display:block}
@media(max-width:640px){
  .wp-toc{padding:var(--toc-container-padding-mobile)}
  .wp-toc__header{align-items:center;width:100%;margin-inline:0;padding-inline:0}
  .wp-toc__title,.wp-toc__title.wp-toc__title--has-icon{padding:0;font-size:1.2rem}
  .wp-toc__list{width:100%;margin-inline:0;padding-inline:0}
  .wp-toc a{width:100%;margin-inline:0;padding-inline:10px}
  .wp-toc__toggle{width:32px;height:32px}
}
.entry-content .wp-toc ol.wp-toc__list,
.entry-content .wp-toc ul.wp-toc__list,
.entry-content .wp-toc .wp-toc__list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
  width:100%;
  box-sizing:border-box;
}
.entry-content .wp-toc .wp-toc__item{
  list-style:none;
  margin:0;
  padding:0;
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
.entry-content .wp-toc .wp-toc__item::marker{content:""}
.entry-content .wp-toc .wp-toc__link{
  display:flex;
  width:100%;
  margin:0;
  box-sizing:border-box;
  text-decoration:none;
}
