@charset "UTF-8";

/**
 * Fancy Custom Shortcodes — Table of Contents
 */

.fcs-toc {
    --fcs-toc-accent: var(--wp-admin-theme-color, #2271b1);
    --fcs-toc-text: #1d2327;
    --fcs-toc-muted: #646970;
    --fcs-toc-bg: #ffffff;
    --fcs-toc-border: #dcdcde;
    --fcs-toc-soft: #f6f7f7;
    --fcs-toc-active-bg: #f0f6fc;
    --fcs-toc-scrollbar: #a7aaad;
    --fcs-toc-offset: 80px;
    --fcs-toc-radius: 10px;
    --fcs-toc-max-height: calc(100vh - var(--fcs-toc-offset) - 24px);
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 24px;
    padding: 16px 18px;
    overflow-wrap: anywhere;
    color: var(--fcs-toc-text);
    background: var(--fcs-toc-bg);
    border: 1px solid var(--fcs-toc-border);
    border-radius: var(--fcs-toc-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    font-size: 16px;
    line-height: 1.5;
}

.fcs-toc[hidden],
.fcs-toc-panel[hidden],
.fcs-toc-toggle[hidden] {
    display: none !important;
}

.fcs-toc *,
.fcs-toc *::before,
.fcs-toc *::after {
    box-sizing: border-box;
}

.fcs-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.fcs-toc-heading {
    flex: 1 1 auto;
    min-width: 0;
}

.fcs-toc-caption {
    display: none;
}

.fcs-toc:not(.is-expanded) .fcs-toc-header {
    margin-bottom: 0;
}

.fcs-toc-title {
    margin: 0;
    color: var(--fcs-toc-text);
    font-size: 1em;
    font-weight: 650;
    line-height: 1.4;
}

.fcs-toc-toggle {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--fcs-toc-border);
    border-radius: 6px;
    background: var(--fcs-toc-soft);
    color: var(--fcs-toc-text);
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.fcs-toc-toggle::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 160ms ease;
}

.fcs-toc.is-expanded .fcs-toc-toggle::after {
    transform: translateY(2px) rotate(225deg);
}

.fcs-toc-toggle:hover {
    border-color: var(--fcs-toc-accent);
    color: var(--fcs-toc-accent);
}

.fcs-toc-toggle:focus {
    outline: 2px solid var(--fcs-toc-accent);
    outline-offset: 2px;
}

.fcs-toc-toggle:focus:not(:focus-visible),
.fcs-toc-link:focus:not(:focus-visible) {
    outline: none;
}

.fcs-toc-toggle:focus-visible,
.fcs-toc-link:focus-visible {
    outline: 2px solid var(--fcs-toc-accent);
    outline-offset: 2px;
}

.fcs-toc-panel,
.fcs-toc-list,
.fcs-toc-sublist,
.fcs-toc-item {
    margin: 0;
}

.fcs-toc-list,
.fcs-toc-sublist {
    padding: 0;
    list-style: none;
}

.fcs-toc-sublist {
    margin-top: 4px;
    padding-left: 14px;
    border-left: 2px solid var(--fcs-toc-border);
}

.fcs-toc-link {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 6px;
    color: var(--fcs-toc-text);
    text-decoration: none;
}

.fcs-toc-h3 > .fcs-toc-link,
.fcs-toc-h4 > .fcs-toc-link,
.fcs-toc-h5 > .fcs-toc-link,
.fcs-toc-h6 > .fcs-toc-link {
    color: var(--fcs-toc-muted);
    font-size: 0.95em;
}

.fcs-toc-link:hover {
    background: var(--fcs-toc-soft);
    color: var(--fcs-toc-accent);
}

.fcs-toc-link:focus {
    outline: 2px solid var(--fcs-toc-accent);
    outline-offset: 2px;
}

.fcs-toc-link.is-active {
    border-left-color: var(--fcs-toc-accent);
    background: var(--fcs-toc-active-bg);
    color: var(--fcs-toc-accent);
    font-weight: 600;
}

@supports (background: color-mix(in srgb, #000000 10%, transparent)) {
    .fcs-toc-link.is-active {
        background: color-mix(in srgb, var(--fcs-toc-accent) 10%, var(--fcs-toc-bg));
    }
}

.fcs-toc-empty {
    margin: 8px 0 0;
    color: var(--fcs-toc-muted);
    font-size: 14px;
}

.fcs-toc--numbered .fcs-toc-list,
.fcs-toc--numbered .fcs-toc-sublist {
    counter-reset: fcs-toc-item;
}

.fcs-toc--numbered .fcs-toc-item {
    counter-increment: fcs-toc-item;
}

.fcs-toc--numbered .fcs-toc-link::before {
    content: counters(fcs-toc-item, ".") ".";
    flex: 0 0 auto;
    min-width: 1.35em;
    margin-right: 0.45em;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.fcs-toc--compact {
    padding: 12px 14px;
}

.fcs-toc--compact .fcs-toc-header {
    margin-bottom: 4px;
}

.fcs-toc--compact .fcs-toc-link {
    min-height: 38px;
    padding: 5px 8px;
}

.fcs-toc--compact .fcs-toc-sublist {
    margin-top: 2px;
    padding-left: 12px;
}

.fcs-toc--style-minimal {
    padding: 0;
    background: transparent;
    border-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

.fcs-toc--style-minimal.fcs-toc--custom-background {
    background: var(--fcs-toc-bg);
}

.fcs-toc--style-minimal .fcs-toc-header {
    padding: 0 3px;
}

.fcs-toc.fcs-toc--sticky {
    position: sticky;
    top: calc(var(--fcs-toc-offset) + 8px);
    z-index: 4;
    align-self: start;
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: var(--fcs-toc-max-height);
    overflow: hidden;
}

/*
 * Elementor wraps shortcode output in a widget whose height is greater than
 * the shortcode's immediate inner wrappers. Promoting sticky positioning to
 * that widget provides a usable containing block while the TOC keeps control
 * of its own height and internal scrolling.
 */
.fcs-toc-sticky-host.is-fcs-sticky-active {
    position: sticky !important;
    top: var(--fcs-toc-host-top, 88px) !important;
    z-index: 4;
    align-self: start;
    width: 100%;
    min-width: 0;
    height: fit-content;
}

.fcs-toc.fcs-toc--sticky.fcs-toc--hosted-sticky {
    position: relative;
    top: auto;
}

.fcs-toc--sticky .fcs-toc-header {
    flex: 0 0 auto;
}

.fcs-toc--sticky.is-expanded .fcs-toc-header {
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--fcs-toc-border);
}

.fcs-toc--sticky .fcs-toc-panel {
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-color: var(--fcs-toc-scrollbar) transparent;
    scrollbar-width: thin;
}

.fcs-toc--sticky .fcs-toc-panel::-webkit-scrollbar {
    width: 9px;
}

.fcs-toc--sticky .fcs-toc-panel::-webkit-scrollbar-track {
    background: transparent;
}

.fcs-toc--sticky .fcs-toc-panel::-webkit-scrollbar-thumb {
    min-height: 36px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--fcs-toc-scrollbar);
    background-clip: padding-box;
}

.fcs-toc--sticky .fcs-toc-panel::-webkit-scrollbar-thumb:hover {
    background-color: var(--fcs-toc-accent);
    background-clip: padding-box;
}

.admin-bar .fcs-toc--sticky {
    top: calc(var(--fcs-toc-offset) + 40px);
    --fcs-toc-max-height: calc(100vh - var(--fcs-toc-offset) - 56px);
}

@media screen and (max-width: 782px) {
    .fcs-toc {
        padding: 14px;
    }

    .fcs-toc--style-minimal {
        padding: 0;
    }

    .fcs-toc--compact:not(.fcs-toc--style-minimal) {
        padding: 12px;
    }

    .fcs-toc:not(.is-expanded) {
        min-height: 70px;
        padding: 12px 14px;
        border-color: var(--fcs-toc-border);
        box-shadow: 0 6px 20px rgba(29, 35, 39, 0.08);
    }

    .fcs-toc:not(.is-expanded) .fcs-toc-header {
        gap: 10px;
    }

    .fcs-toc:not(.is-expanded) .fcs-toc-header::before {
        content: "";
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        border: 1px solid var(--fcs-toc-border);
        border-radius: 11px;
        background-color: var(--fcs-toc-soft);
        background-image:
            linear-gradient(var(--fcs-toc-accent), var(--fcs-toc-accent)),
            linear-gradient(var(--fcs-toc-accent), var(--fcs-toc-accent)),
            linear-gradient(var(--fcs-toc-accent), var(--fcs-toc-accent));
        background-position: 11px 11px, 11px 17px, 11px 23px;
        background-repeat: no-repeat;
        background-size: 16px 2px;
    }

    .fcs-toc:not(.is-expanded) .fcs-toc-caption {
        display: block;
        margin-top: 2px;
        color: var(--fcs-toc-muted);
        font-size: 12px;
        font-weight: 400;
        line-height: 1.35;
    }

    .fcs-toc:not(.is-expanded) .fcs-toc-toggle {
        min-height: 44px;
        padding: 8px 13px;
        border-color: var(--fcs-toc-accent);
        border-radius: 999px;
        background: var(--fcs-toc-active-bg);
        color: var(--fcs-toc-accent);
        font-weight: 600;
    }

    @supports (background: color-mix(in srgb, #000000 10%, transparent)) {
        .fcs-toc:not(.is-expanded) .fcs-toc-toggle {
            background: color-mix(in srgb, var(--fcs-toc-accent) 9%, var(--fcs-toc-bg));
        }
    }

    .fcs-toc.fcs-toc--sticky:not(.fcs-toc--mobile-sticky) {
        position: static;
        top: auto;
        z-index: auto;
        align-self: auto;
        display: block;
        height: auto;
        max-height: none;
        overflow: visible;
        scrollbar-gutter: auto;
    }

    .fcs-toc--sticky:not(.fcs-toc--mobile-sticky) .fcs-toc-panel {
        max-height: none;
        overflow: visible;
        scrollbar-gutter: auto;
    }

    .admin-bar .fcs-toc--sticky.fcs-toc--mobile-sticky {
        top: calc(var(--fcs-toc-offset) + 54px);
        --fcs-toc-max-height: calc(100vh - var(--fcs-toc-offset) - 70px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fcs-toc-link,
    .fcs-toc-toggle {
        scroll-behavior: auto;
        transition: none;
    }
}
