$embedded-toc-bg--active: #1ba1e4;

[data-embedded="tableOfContent"] {
    margin-left: 2px;
    margin-right: 2px;
    margin-top: 16px;
    margin-bottom: 16px;
    outline: 1px solid $o-gray-300;
    outline-offset: -1px;
    border-radius: 5px;
    background-color: $o-gray-100;
    & .o_embedded_toc_content {
        background-color: $o-view-background-color;

        a[class*="o_embedded_toc_link_depth_"] {
            font-family: $font-family-base !important;
            border-radius: 5px;
            min-height: $line-height-base * $font-size-base;
            border: transparent;

            &:hover {
                background-color: rgba($embedded-toc-bg--active, 0.2);
                text-decoration: none;
            }

        }

        a.o_embedded_toc_link_depth_0 {
            // initial 5px padding to give some space to first level
            padding-left: 5px;
        }

        @for $depth from 1 through 5 {
            a.o_embedded_toc_link_depth_#{$depth} {
                padding-left: calc(5px + Min(30px, 10%) * #{$depth});
            }
        }
    }

    & .o_embedded_toc_label {
        color: $o-gray-600;
    }

}

.o_field_html {
    .odoo-editor-editable,
    .o_readonly {
        h1, h2, h3, h4, h5, h6 {
            transition: background-color 0.5s ease;
            &.o_embedded_toc_header_highlight {
                border-radius: 0.25rem;
                background-color: rgba($embedded-toc-bg--active, 0.2);
            }
        }
    }
}
