:root {
    --vditor-toolbar-height: 0px;
}

.vditor {
    border: none;
}

.vditor--fullscreen .vditor-toolbar {
    background-color: rgba(var(--m-theme-surface));
}

.vditor--fullscreen .vditor-reset {
    background-color: rgba(var(--m-theme-surface)) !important;
}

.vditor-toolbar {
    background: initial;
    padding: 0px !important;
    border: none;
}

    .vditor-toolbar .vditor-toolbar__item {
        padding: 0px 8px !important;
    }

.vditor-toolbar__item svg {
    width: 16px;
    height: 16px;
}

.vditor-toolbar-content {
    display: flex;
    flex-wrap: wrap;
}

.vditor-content {
    min-height: 0px;
}

.vditor-reset {
    background: initial !important;
    border-radius: 8px;
    padding-left: 0px !important;
    padding-right: 0px !important;
    word-break: break-all;
}

    .vditor-reset *::-webkit-scrollbar {
        display: initial !important;
    }

    .vditor-reset iframe.iframe__video {
        width: 100%;
        aspect-ratio: 2/1;
        border-radius: 8px;
    }

    .vditor-reset video {
        background-color: #000;
        border-radius: 8px;
        max-height: unset;
    }

    .vditor-reset audio {
        border-radius: 9999px;
    }

        .vditor-reset audio::-webkit-media-controls {
            width: 100%;
        }

    .vditor-reset img {
        border-radius: 8px;
    }

    .vditor-reset svg {
        direction: initial;
    }

.vditor-ir__node--expand[data-type="code-block"] .vditor-ir__preview {
    display: none;
}

.vditor-sv {
    word-break: break-all;
}

.vditor-outline {
    padding-top: 8px;
    padding-bottom: 8px;
    background-color: initial;
    border-right: unset;
    border-inline-end: 1px solid var(--border-color);
}

    .vditor-outline span {
        user-select: none !important;
    }

    .vditor-outline::-webkit-scrollbar {
        display: initial !important;
    }

    .vditor-outline li > span {
        padding: 0;
    }

        .vditor-outline li > span > svg {
            width: 24px;
            height: 24px;
            padding: 6px;
        }

.vditor-outline--right {
    border-right: unset;
    border-left: unset;
    border-inline-end: 0;
    border-inline-start: 1px solid var(--border-color);
}

.vditor-outline__title {
    display: none;
}

@media screen and (min-width:600px) {
    .vditor-toolbar {
        margin-inline-start: -10px;
        -webkit-margin-start: -10px;
        -moz-margin-start: -10px;
    }

    .vditor-reset video {
        max-height: 55vh;
    }

    .vditor-reset img {
        max-height: 55vh;
    }
}

.vditor-panel--arrow::before {
    filter: drop-shadow(0.1px -0.1px 1px rgba(0, 0, 0, .1));
}

@media screen and (max-width:600px) {
    :root {
        --vditor-toolbar-height: 70px;
    }

    .vditor-toolbar {
        position: fixed;
        bottom: 0px;
        left: 0px;
        right: 0px;
        border: none;
        z-index: 10;
        overflow-x: auto;
        /*box-shadow: 0 -3px 5px -3px rgba(0,0,0,.2);*/
    }

        .vditor-toolbar .vditor-toolbar__item {
            padding: 0px 8px !important;
        }

    .vditor-toolbar-content {
        min-width: var(--vditor-toolbar-width);
        max-height: var(--vditor-toolbar-height);
        margin-left: 10px !important;
        margin-right: 10px !important;
    }

    button[data-type="headings"].vditor-tooltipped + .vditor-panel--arrow {
        position: fixed;
        bottom: var(--vditor-toolbar-height);
    }

        button[data-type="headings"].vditor-tooltipped + .vditor-panel--arrow::before {
            top: unset;
            bottom: -14px;
            transform: rotateX(180deg);
            filter: drop-shadow(0.1px 0.1px 1px rgba(0, 0, 0, .2));
        }

    .vditor-toolbar-help {
        min-height: var(--vditor-toolbar-height);
    }
}

@media screen and (max-width:960px) {
    .vditor-outline {
        display: none !important;
    }
}

@media screen and (min-width:960px) {
    .vditor-outline {
        display: block !important;
        margin-inline-end: 1em;
        -webkit-margin-end: 1em;
        -moz-margin-end: 1em;
        --border-color: #d1d5da;
    }

        .vditor-outline.vditor-outline--right {
            margin-inline-end: initial;
            -webkit-margin-end: initial;
            -moz-margin-end: initial;
        }

            .vditor-outline.vditor-outline--right .vditor-outline__content > ul {
                padding-inline-start: 1em;
            }
}
