.d4-notes .d4-list-detail__head {
    align-items: center;
    border-bottom: 1px solid #edf0f3;
    display: flex;
    gap: 8px;
    min-height: 58px;
    padding: 10px 24px;
}

.d4-notes .d4-list-detail__buttons {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.d4-notes .d4-list-detail__buttons .btn-sm {
    margin-left: 0;
}

.d4-notes .tree-container {
    overflow-y: auto;
    padding: 18px 16px;
}

.d4-notes .tree-node {
    padding: 2px 0;
    position: relative;
}

.d4-notes .tree-node .folder {
    cursor: pointer;
    user-select: none;
}

.d4-notes .tree-node .subfolder {
    position: relative;
}

.d4-notes .d4-list-detail-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .d4-notes .d4-list-detail-menu__button {
        align-items: center;
        border: 1px solid transparent;
        border-radius: 8px;
        color: #343a40;
        cursor: pointer;
        display: flex;
        gap: 12px;
        min-height: 46px;
        padding: 8px 10px;
        touch-action: manipulation;
        transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
        width: 100%;
    }

.d4-notes .d4-list-detail-menu__button:hover {
    background: #f6f8fb;
    border-color: #edf0f3;
}

.d4-notes .d4-list-detail-menu__icon {
    align-items: center;
    background: #eef6ff;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 28px;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.d4-notes .d4-list-detail-menu__text {
    flex: 1 1 auto;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.d4-notes .d4-list-detail-menu__actions {
    flex: 0 0 auto;
}

.d4-notes .tree-node.active > .folder-wrapper > .folder {
    background: #eef7ff;
    border-color: #b8dbff;
    color: #1f5f99;
}

.d4-notes .tree-node.active > .folder-wrapper > .folder .d4-list-detail-menu__icon {
    background: #ffffff;
}

.d4-notes .folder:hover {
    background-color: #f6f8fb;
}

.d4-notes .dropdown-menu-end {
    min-width: 120px;
}

.d4-notes .folder .dropdown-btn .fa-ellipsis-v {
    visibility: hidden;
    padding: 2px 10px;
}

.d4-notes .folder:hover .dropdown-btn .fa-ellipsis-v {
    visibility: visible;
}

.d4-notes .folder-wrapper {
    position: relative;
}

.d4-notes .children-container {
    position: relative;
}

.d4-notes .subfolder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 1px;
    height: calc(100% + 10px);
    background-color: #ccc;
}

.d4-notes .subfolder::after {
    content: '';
    position: absolute;
    top: 19px;
    left: -7px;
    width: 10px;
    height: 1px;
    background-color: #ccc;
}

.d4-notes .children-container .subfolder:last-child::before {
    height: 20px;
}

.d4-notes .tree-node.dragging {
    opacity: 0.5;
}

.d4-notes .tree-node.dragover {
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
}

.d4-notes td {
    padding: 5px 10px;
    border: 1px solid #e6e6e6;
}

@media (max-width: 767.98px) {
    .d4-notes .d4-notes-panels {
        position: relative;
        overflow: hidden;
        min-height: 420px;
        margin: 0;
    }

    .d4-notes .d4-notes-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        min-height: 420px;
        background: #fff;
        opacity: 0;
        pointer-events: none;
        transform: translateX(100%);
        transition: transform 180ms ease, opacity 180ms ease;
        z-index: 1;
    }

    .d4-notes .d4-notes-panel:not(.is-active) {
        pointer-events: none;
    }

    .d4-notes .d4-notes-panel--list {
        border-right: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .d4-notes .d4-notes-panel--detail {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .d4-notes .d4-notes-panel.is-active {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        z-index: 3;
    }

    .d4-notes .d4-notes-panel.is-previous {
        opacity: 0;
        transform: translateX(-16%);
        z-index: 2;
    }

    .d4-notes .d4-notes-panel--list.is-active {
        transform: translateX(0);
    }

    .d4-notes .tree-container {
        height: calc(100vh - 220px) !important;
        min-height: 360px;
    }

    .d4-notes .view-display {
        height: calc(100vh - 220px) !important;
        min-height: 360px;
    }

    .d4-notes .d4-list-detail__buttons .btn {
        align-items: center;
        box-sizing: border-box;
        display: inline-flex;
        flex: 0 0 38px;
        font-size: 0 !important;
        height: 38px;
        justify-content: center;
        line-height: 0 !important;
        min-height: 38px;
        min-width: 38px;
        overflow: hidden;
        padding: 0 !important;
        position: relative;
        text-align: center;
        width: 38px;
    }

    .d4-notes .d4-list-detail__buttons .btn i,
    .d4-notes .d4-list-detail__buttons .btn .label-icon {
        align-items: center;
        background: none !important;
        border-radius: 0 !important;
        display: inline-flex;
        font-size: 10px !important;
        height: auto;
        justify-content: center;
        left: 50%;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        position: absolute;
        top: 50%;
        transform: translate(-50%, -50%);
        vertical-align: middle !important;
        width: auto;
    }

    .d4-notes .d4-list-detail__buttons .btn i::before {
        display: block;
        line-height: 1;
    }
}
