/* Florida TaxWatch — Collapsible Table of Contents (styles)
   The navy is driven by the --ftw-navy custom property, set from the plugin's
   Settings → Table of Contents color picker. The fallback below is FTW brand navy. */

.ftw-toc {
  --ftw-navy: #292b68;
  background: #f7f8fa;
  border: 1px solid #d8dde3;
  border-left: 4px solid var(--ftw-navy);    /* FTW brand accent */
  border-radius: 4px;
  margin: 28px 0 36px;
  font-family: -apple-system, "Segoe UI", sans-serif;
}
.ftw-toc-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ftw-navy);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
/* Solid navy bar with white text, locked in every state. !important + the
   extra .ftw-toc prefix override theme button styles (which color the bar
   red and swap the background on hover). */
.ftw-toc .ftw-toc-toggle,
.ftw-toc .ftw-toc-toggle:hover,
.ftw-toc .ftw-toc-toggle:focus,
.ftw-toc .ftw-toc-toggle:active {
  background: var(--ftw-navy) !important;
  color: #fff !important;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}
.ftw-toc .ftw-toc-toggle .ftw-toc-icon { color: #fff !important; }
/* White focus ring sits inside the navy bar so it's visible. */
.ftw-toc .ftw-toc-toggle:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }
.ftw-toc-icon { transition: transform 0.2s ease; font-size: 13px; flex-shrink: 0; }
.ftw-toc.is-collapsed .ftw-toc-icon { transform: rotate(-90deg); }
.ftw-toc-list { overflow: hidden; transition: max-height 0.28s ease; padding: 0 18px; }
.ftw-toc-root, .ftw-toc-sub { list-style: none; margin: 0; padding: 0 0 14px 0; }
.ftw-toc-sub { padding-left: 20px; padding-bottom: 0; }
.ftw-toc-root > li { margin: 7px 0; }
.ftw-toc-sub > li { margin: 5px 0; font-size: 0.93em; }
/* Links: no underline at rest, a single underline on hover (drawn as a bottom
   border). The .ftw-toc-list prefix beats themes that force text-decoration. */
.ftw-toc .ftw-toc-list a {
  color: #2b2b2b;
  text-decoration: none;
  display: inline-block;
  padding: 1px 0;
  border-bottom: 1px solid transparent;
}
.ftw-toc .ftw-toc-list a:hover,
.ftw-toc .ftw-toc-list a:focus-visible {
  color: var(--ftw-navy);
  text-decoration: none;                     /* underline comes from the border only */
  border-bottom-color: var(--ftw-navy);
}
.ftw-toc .ftw-toc-list a.is-active {
  color: var(--ftw-navy);
  font-weight: 700;
  background: #e8edf2;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: -6px;
}

@media (prefers-reduced-motion: reduce) {
  .ftw-toc-list, .ftw-toc-icon { transition: none; }
}
@media (max-width: 600px) {
  .ftw-toc-toggle { font-size: 15px; padding: 12px 14px; }
}
@media print {
  .ftw-toc-icon { display: none; }
  .ftw-toc-list { max-height: none !important; visibility: visible !important; }
  .ftw-toc { break-inside: avoid; }
}
