// =============================================================================
// 31-modules / toc / mixins
// =============================================================================

@use "sass:map";
@use "./toc.config" as config;
@use "../../01-core/external" as *;

@mixin ss-toc {
    ul {
        list-style: none;
        margin: 0;
        padding: 0;

        ul {
            padding-left: map.get(config.$toc-config, "indent");
            border-left: q(1) dashed map.get(config.$toc-config, "border-color");
            margin-top: map.get(config.$toc-config, "item-gap");
        }
    }

    li {
        margin: map.get(config.$toc-config, "item-gap") 0;

        &::before {
            content: "•";
            color: map.get(config.$toc-config, "marker-color");
            margin-right: q(6);
            font-size: map.get(config.$toc-config, "marker-font-size");
        }

        a {
            text-decoration: none;
            color: map.get(config.$toc-config, "link-color");
            transition: color 0.2s ease;

            &:hover {
                color: map.get(config.$toc-config, "link-color-hover");
                font-weight: bold;
            }

            &.is-active,
            &.active {
                color: map.get(config.$toc-config, "link-color-active");
                font-weight: bold;
            }
        }
    }
}
