.wiki-footnote * {
    pointer-events: none;
}

.mce-content-body .wiki-footnote-summary {
    margin: 10px 0;
}

.mce-content-readonly .macros-panel[data-macros="wikifootnote"] .editor-container {
    display: none;
}

.mce-content-readonly {
    counter-reset: footnote-count 0;
}

.mce-content-readonly .macros-panel[data-macros="wikifootnote"] {
    counter-increment: footnote-count 1;
}

.mce-content-readonly del .macros-panel[data-macros="wikifootnote"] .footnote-marker::after {
    content: '';
    counter-increment: footnote-count -1;
}

.mce-content-readonly .macros-panel[data-macros="wikifootnote"] .footnote-marker::before {
    content: counter(footnote-count);
    cursor: pointer;
    pointer-events: auto;
    vertical-align: super;
    font-size: smaller;
    line-height: 0;
    margin-left: -1px;
}

.mce-content-readonly .macros-panel[data-macros="wikifootnote"].macros-panel[data-macros-parameters*='"style":"cov-brackets"'] .footnote-marker::before {
    content: '[' counter(footnote-count)']';
}

.mce-content-readonly .macros-panel[data-macros="wikifootnote"].macros-panel[data-macros-parameters*='"style":"cov-parentheses"'] .footnote-marker::before {
    content: '(' counter(footnote-count) ')';
}

.wiki-footnote-context-menu[role=presentation] {
    position: absolute;
    z-index: 98;
    box-shadow: rgb(9 30 66 / 25%) 0px 4px 8px -2px, rgb(9 30 66 / 31%) 0px 0px 1px;
    display: flex;
    flex-flow: row nowrap;
    column-gap: 2px;
    padding: 2px;
    background: var(--theme-hack-bg2-color, #fff);
    will-change: top, left;
    font: var(--wiki-text-font);
    color: var(--user-content-color, var(--default-color));
    border-radius: 5px;
    user-select: none;
}

.wiki-footnote-context-menu[role=presentation][contentEditable=false][data-mce-selected] {
    outline: none;
    cursor: default;
}

.wiki-footnote-context-menu[role=presentation] .menu-item {
    display: flex;
    flex-flow: row nowrap;
    column-gap: 10px;
    cursor: pointer;
    opacity: 1;
    transition: background 0.2s ease;
    align-items: center;
    justify-content: space-between;
    border-radius: 5px;
    flex-shrink: 0;
}

.wiki-footnote-context-menu[role=presentation] .menu-item * {
    user-select: none;
    pointer-events: none;
}

.wiki-footnote-context-menu[role=presentation] .menu-item:hover {
    background: var(--color-gray-eee, #eee);
}

.wiki-footnote-context-menu[role=presentation] svg {
    color: #666;
}

.wiki-footnote-context-menu[role=presentation] svg,
.wiki-footnote-context-menu[role=presentation] svg * {
    pointer-events: none;
}

.wiki-footnote-context-menu[role=presentation] svg:hover {
    color: var(--color-gray-222, #222);
}

.wiki-footnote-context-menu[role=presentation] .menu-item {
    padding: 5px;
    font-size: 14px;
}

.wiki-footnote-context-menu[role=presentation] .menu-item>.menu-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    scale: 0.8;
}