.file-browser-container { padding: 1rem; max-width: 1200px; margin: 0 auto; }
.browser-content { border: 1px solid #000; padding: 1rem; border-radius: 8px; }
.tree-view { max-height: calc(100vh - 200px); overflow: auto; }
.breadcrumbs { margin-bottom: 0.5rem; color: #666; font-size: 14px; }
.breadcrumbs a { color: #2196F3; text-decoration: none; cursor: pointer; font-weight: 500; }
.breadcrumbs a:hover { color: #42A5F5; text-decoration: underline; }
.breadcrumbs .sep { margin: 0 6px; color: #777; }
.breadcrumb-folder { color: #2196F3; text-decoration: none; cursor: pointer; font-weight: 500; }
.breadcrumb-folder:hover { color: #42A5F5; text-decoration: underline; }
.search-bar { display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; margin-bottom: 0.75rem; align-items: center; }
.search-controls { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.search-container { position: relative; margin: 0; min-width: 0; }
.search-container input { box-sizing: border-box; width: 100%; padding: 0.5rem 2.5rem 0.5rem 0.5rem; border-radius: 4px; border: 1px solid #555; background: #222; color: #fff; }
.search-clear-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #888; cursor: pointer; font-size: 16px; padding: 0; width: 20px; height: 20px; display: none; align-items: center; justify-content: center; border-radius: 3px; }
.search-clear-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.search-clear-btn.active { display: flex; }
/* File types dropdown */
.search-controls .type-filter { padding: 0.5rem; border-radius: 4px; border: 1px solid #555; background: #222; color: #fff; width: 178px; flex-shrink: 0; }
/* Reset view button */
.search-controls .reset-view-btn { padding: 0.5rem 1rem; border-radius: 4px; border: 1px solid #555; background: #333; color: #fff; cursor: pointer; transition: background-color 0.2s; width: auto; flex-shrink: 0; white-space: nowrap; }
.search-controls .reset-view-btn:hover { background: #3d3d3d; }

/* Download button */
.search-controls .download-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0.5rem 0.9rem; border-radius: 4px; border: 1px solid #1e88e5; background: #2196F3; color: #fff; cursor: pointer; transition: background-color 0.2s, border-color 0.2s; width: auto; flex-shrink: 0; white-space: nowrap; text-decoration: none; }
.search-controls .download-btn:hover { background: #1976D2; border-color: #1976D2; }
.search-controls .download-btn svg { width: 16px; height: 16px; }
.item { padding: 8px 12px; cursor: pointer; border-radius: 6px; display: flex; align-items: center; gap: 8px; transition: background-color 0.2s ease; }
.item:hover { background: rgba(255,255,255,0.1); }
.item.selected { background: #0056b3; }
.item.file { margin-left: 16px; }
.item.file:hover { background: rgba(66, 165, 245, 0.1); }
ul.tree { list-style: none; margin: 0; padding: 0; }
.tree .folder-toggle { width: 20px; display: inline-flex; align-items: center; justify-content: center; color: #666; cursor: pointer; font-size: 12px; }
.tree .folder-toggle:hover { color: #333; }
.tree .folder-icon { width: 20px; display: inline-flex; align-items: center; justify-content: center; }
.tree .file-icon { width: 20px; display: inline-flex; align-items: center; justify-content: center; }
/* Proper color inheritance for file browser elements */
.file-browser-container {
  color: #333;
}
.tree .file, 
.item.file, 
.tree .file-name, 
.item.file .file-name,
.tree .item.file, 
.tree .item.file .file-name,
ul.tree .item.file,
ul.tree .item.file .file-name { 
  color: #333; 
}
.tree .item.file .file-size, 
.tree .item.file .file-icon,
ul.tree .item.file .file-size { 
  color: #666; 
}
.tree .folder-name { flex: 1; }
.tree .file-name { flex: 1; display: flex; align-items: center; gap: 8px; }
.tree .file-size { color: #666; font-size: 12px; margin-left: auto; }
.tree .download-btn { margin-left: 8px; padding: 4px 8px; background: #2196F3; color: white; border: none; border-radius: 4px; font-size: 11px; cursor: pointer; opacity: 0; transition: opacity 0.2s; }
.tree .item:hover .download-btn { opacity: 1; }
.tree .download-btn:hover { background: #1976D2; }


.meta { color: #666; font-size: 12px; margin-top: 6px; }
.badge { display: inline-block; padding: 2px 6px; border-radius: 10px; font-size: 12px; margin-left: 6px; }
.badge.small { background: #2d6a4f; }
.badge.medium { background: #1d3557; }
.badge.large { background: #b08968; }
.badge.huge { background: #a4161a; }
.spinner { color: #666; font-size: 0.95rem; padding: 0.5rem 0; text-align: center; }
.icon { width: 18px; height: 18px; display: inline-block; }
@media (max-width: 768px) { 
  .file-browser-container { padding: 0.5rem; }
  .browser-content { padding: 0.75rem; }
  .item { padding: 6px 8px; }
  .tree .download-btn { opacity: 1; }
}

@media (max-width: 640px) {
  .search-bar { grid-template-columns: 1fr; }
  .search-controls { justify-content: flex-start; }
}

