/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright (c) 2026 WebTigers. Tiger™ and WebTigers™ are trademarks of WebTigers.
 * TigerDocs ⌘K search — result list states + match highlighting. Themed via Bootstrap CSS
 * variables so it follows the active skin + light/dark automatically. */
.docs-search-item {
    color: inherit;
    cursor: pointer;
}
.docs-search-item:hover,
.docs-search-item.active {
    background: var(--bs-secondary-bg);
}
#docsSearchModal mark {
    padding: 0;
    background: var(--bs-warning-bg-subtle);
    color: inherit;
    border-radius: .15rem;
}
#docsSearchModal .modal-header kbd,
.tiger-header-search kbd {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    font-size: .7rem;
}

/* Anchor jumps ("On this page" links) land BELOW the floating header, not under it —
   matches the sticky sidebars' top offset. */
.tiger-docs-body :is(h1, h2, h3, h4, h5, h6)[id] {
    scroll-margin-top: 4.5rem;
}

/* Prev/next pager cards. */
.docs-pager {
    color: inherit;
    transition: background-color .12s ease, border-color .12s ease;
}
.docs-pager:hover {
    background: var(--bs-secondary-bg);
    border-color: var(--bs-secondary-color) !important;
}

/* "On this page" scrollspy: a marker that slides along the TOC's left rail to the active heading. */
.docs-toc-marker {
    position: absolute;
    left: -1px;                 /* straddle the nav's 1px border-start (the rail) */
    top: 0;
    width: 2px;
    height: 0;
    opacity: 0;                 /* revealed once JS positions it */
    background: var(--bs-primary);
    border-radius: 2px;
    transition: transform .25s ease, height .25s ease, opacity .2s ease;
}
.docs-toc .nav-link {
    transition: color .15s ease;
}
.docs-toc .nav-link.active {
    color: var(--bs-primary) !important;
}
@media (prefers-reduced-motion: reduce) {
    .docs-toc-marker { transition: opacity .2s ease; }
}

/* Recursive sidebar nav — nested lists indent under their parent with a subtle rail. */
.doc-nav-list { list-style: none; padding-left: 0; margin-bottom: 0; }
.doc-nav-list .doc-nav-list { padding-left: .6rem; margin-left: .35rem; border-left: 1px solid var(--bs-border-color); }
.doc-nav-header { letter-spacing: .06em; }

/* Highlighted code blocks: give the hljs code a card border + radius (hljs owns the padding/bg). */
.tiger-docs-body pre code.hljs {
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
}

/* Vertical rhythm: breathing room above each content heading — but not the first element in the
   article (:not(:first-child)), so the page doesn't open with a big gap. */
.tiger-docs-body :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6):not(:first-child) {
    margin-top: 2.5rem;
}
