$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;
    padding: 8px;
    & > .o_embedded_toc_content {
        @for $depth from 0 through 5 {
            a.o_embedded_toc_link_depth_#{$depth} {
                padding-left: calc(5px + Min(30px, 10%) * #{$depth});
                font-family: $font-family-base !important;
                font-weight: $font-weight-bolder;
                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;
            }
        }
    }
    & .o_embedded_toc_hint {
        padding-left: 5px;
    }
}

.o_field_html {
    .note-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);
            }
        }
    }
}
