/* folder.css - 解决悬停问题的目录面板样式 */

.zib-folder-root,
.zib-folder {
    margin: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 只对直接子元素应用悬停效果 */
.zib-folder:hover > .folder-header {
    background-color: #e2e8f0;
    border-radius: 4px;
}

.zib-folder.expanded {
    /* 展开状态样式 */
}

.zib-folder.selected > .folder-header {
    background-color: #4f46e5;
    color: white;
    border-radius: 4px;
}

.zib-folder.selected > .folder-header .name {
    color: white;
    font-weight: bold;
}

.zib-folder.selected > .folder-header .icon {
    color: white;
}

.zib-folder .icon {
    margin-right: 6px;
    font-size: 14px;
    color: #64748b;
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    text-align: center;
}

.zib-folder .name {
    flex: 1;
    color: #334155;
    word-break: break-word;
    white-space: normal;
    padding-top: 2px;
    font-weight: bold; /* 文件夹名称加粗 */
    font-size: 13px;
}

.folder-header {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 4px;
    margin: 1px 5px;
}

.folder-header:hover {
    background-color: #e2e8f0;
    border-radius: 4px;
}

.folder-header.selected {
    background-color: #4f46e5;
    color: white;
    border-radius: 4px;
}

.folder-header.selected .name {
    color: white;
    font-weight: bold;
}

.folder-header.selected .icon {
    color: white;
}

.folder-header .icon {
    margin-right: 6px;
    font-size: 14px;
    color: #64748b;
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    text-align: center;
}

.folder-header .name {
    flex: 1;
    color: #334155;
    word-break: break-word;
    white-space: normal;
    padding-top: 2px;
    font-weight: bold; /* 文件夹名称加粗 */
    font-size: 13px;
}

.zib-file {
    display: flex;
    align-items: center;
    padding: 3px 1px 3px 5px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
    font-size: 13px;
    line-height: 1;
    border-radius: 4px;
    margin: 1px 5px;
}

.zib-file:hover {
    background-color: #e2e8f0;
    border-radius: 4px;
}

.zib-file.selected {
    background-color: #4f46e5;
    border-radius: 4px;
}

.zib-file.selected .name {
    color: white;
    font-weight: 500;
}

.zib-file.selected .icon {
    color: white;
}

.zib-file .icon {
    margin-right: 6px;
    font-size: 14px;
    color: #64748b;
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    text-align: center;
}

.zib-file .name {
    flex: 1;
    color: #334155;
    word-break: break-word;
    white-space: normal;
    padding-top: 2px;
    font-weight: normal; /* 文件名称保持正常粗细 */
    font-size: 13px;
}

/* 添加展开/折叠的样式 */
.folder-children {
    display: none;
    margin-left: 5px;
    padding: 2px 0;
}

.zib-folder.expanded + .folder-children,
.zib-folder-root.expanded > .folder-children,
.zib-folder.expanded > .folder-children {
    display: block;
}

.loading-placeholder {
    text-align: center;
    padding: 15px;
    color: #94a3b8;
    font-size: 13px;
}

.zib-alert {
    padding: 1px 1px;
    margin: 1px 1px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.zib-alert.info {
    
}

.zib-alert.danger {
    background-color: #fee2e2;
    color: #dc2626;
}