/**
 * =============================================================================
 * LunarDocs - 文件列表样式
 * =============================================================================
 */

/* ---- 文件卡片（网格视图） ---- */
.file-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: cardFadeIn 0.3s ease-out;
}

.file-card:hover {
    border-color: #4a9eff;
    background: #fafcff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.file-card.selected {
    border-color: #4a9eff;
    background: #eff6ff;
}

.file-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease;
}

.file-card:hover .file-card-actions {
    opacity: 1;
    transform: translateY(0);
}

.file-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
}

.file-action-btn:hover { background: #f3f4f6; color: #111827; }
.file-action-btn.danger:hover { background: #fef2f2; color: #ef4444; }

/* ---- 文件列表行（列表视图） ---- */
.file-list-row {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    animation: rowFadeIn 0.2s ease-out;
}

.file-list-row:nth-child(even) { background: #f9fafb; }
.file-list-row:hover { background: #f3f4f6; }
.file-list-row.selected { background: #eff6ff; }

.file-list-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.file-list-row:hover .file-list-actions { opacity: 1; }

/* ---- 文件图标 ---- */
.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.file-icon-grid { width: 56px; height: 56px; }
.file-icon-list { width: 32px; height: 32px; }

@media (max-width: 640px) {
    .file-card { padding: 12px; }
    .file-icon-grid { width: 44px; height: 44px; }
}
