body {
    overflow-y: scroll;
}

.doc-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.doc-row[draggable="true"] {
    cursor: grab;
}

.doc-indent {
    flex: 0 0 auto;
    width: 1rem;
}

.doc-content {
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}

.doc-number {
    font-variant-numeric: tabular-nums;
    color: #6c757d;
    margin-right: 0.5rem;
}

.doc-title-line {
    display: flex;
    gap: 0.25rem;
    align-items: baseline;
}

.doc-title-text {
    white-space: pre-wrap;
}

.doc-title-strong {
    font-weight: 600;
}

.doc-content-text {
    white-space: pre-wrap;
    margin-top: 0.15rem;
}

.doc-content-text p {
    margin: 0;
}

.doc-content-text ul,
.doc-content-text ol {
    margin: 0.25rem 0 0.25rem 1.25rem;
}

.doc-wysiwyg {
    min-height: 110px;
    white-space: pre-wrap;
}

.doc-wysiwyg:focus {
    outline: none;
}

.doc-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 0.25rem;
}

.doc-icon-btn {
    border: 0;
    background: transparent;
    padding: 0.2rem 0.25rem;
    line-height: 1;
    border-radius: 0.25rem;
}

.doc-icon-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.doc-icon-btn i {
    font-size: 1rem;
    vertical-align: -0.12em;
}

.doc-actions .dropdown-menu {
    padding: 0.25rem;
    min-width: 14rem;
}

.doc-actions .dropdown-item {
    border-radius: 0.25rem;
}

.doc-quill .ql-container {
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.doc-quill .ql-toolbar {
    border-radius: 0.25rem;
    padding: 4px;
}

.doc-quill .ql-editor {
    min-height: 120px;
    padding: 8px 10px;
}

#index-col .card {
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 1.5rem);
}

#index {
    overflow: auto;
    max-height: calc(100vh - 4.5rem);
}

#side-col .card {
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 1.5rem);
}

#side-col .card-body {
    overflow: auto;
    max-height: calc(100vh - 4.5rem);
}

.doc-comment-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.375rem;
    padding: 0.5rem 0.6rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.7);
}

.doc-comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.doc-meta {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.doc-index-item {
    cursor: pointer;
}

.doc-index-item .doc-index-number {
    font-variant-numeric: tabular-nums;
    color: #6c757d;
}

.doc-index-children {
    padding-left: 0.5rem;
}

.doc-index-children-2 {
    padding-left: 1rem;
}

.index-collapsed #index-col {
    display: none;
}

.side-collapsed #side-col {
    display: none;
}

.doc-row.drag-over {
    outline: 2px dashed #0d6efd;
    outline-offset: -2px;
    background: rgba(13, 110, 253, 0.06);
}

.doc-row.is-editing {
    background: rgba(25, 135, 84, 0.06);
}

.doc-row.is-selected {
    background: rgba(13, 110, 253, 0.08);
}

.doc-side-comments {
    white-space: normal;
    word-break: break-word;
}

.doc-side-comments p {
    margin: 0 0 0.5rem 0;
}

.doc-side-comments ul,
.doc-side-comments ol {
    margin: 0.25rem 0 0.5rem 1.25rem;
}
