/* File Explorer Styles (Phase 1+2) */
.file-explorer-root {
  display: flex;
  flex-direction: row;
  height: 100%;
  background: #121212;
  color: #ddd;
  font-size: 12px;
}
.fx-sidebar {
  width: 180px;
  min-width: 140px;
  max-width: 260px;
  border-right: 1px solid #1f1f1f;
  background: #161616;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.fx-tree {
  padding: 4px 6px 12px 6px;
  font-family: monospace;
  user-select: none;
}
.fx-tree .tree-node {
  line-height: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 4px;
  border-radius: 3px;
}
.fx-tree .tree-node:hover {
  background: #222;
}
.fx-tree .tree-node.selected {
  background: #2d4f7c;
  color: #fff;
}
.fx-tree .twisty {
  width: 12px;
  text-align: center;
  opacity: 0.7;
  font-size: 10px;
}
.fx-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fx-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: #1b1b1b;
  border-bottom: 1px solid #222;
  flex-wrap: wrap;
}
.fx-toolbar .fx-btn {
  background: #252525;
  color: #ccc;
  border: 1px solid #2e2e2e;
  border-radius: 4px;
  padding: 3px 8px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.fx-toolbar .fx-btn:hover {
  background: #2f2f2f;
}
.fx-toolbar .fx-btn.active {
  background: #2d4f7c;
  border-color: #4d79b8;
  color: #fff;
}
.fx-path {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.fx-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow: hidden;
}
.fx-breadcrumb .crumb {
  padding: 2px 6px;
  background: #232323;
  border: 1px solid #2d2d2d;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
}
.fx-breadcrumb .crumb:last-child {
  background: #1e1e1e;
  cursor: default;
}
.fx-breadcrumb .crumb:not(:last-child):hover {
  background: #333;
}
.fx-search {
  position: relative;
}
.fx-search input {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 4px;
  color: #ddd;
  padding: 4px 8px;
  font-size: 12px;
  min-width: 140px;
}
.fx-viewswitch {
  display: flex;
  gap: 4px;
}
.fx-pane {
  flex: 1;
  position: relative;
  overflow: auto;
  background: #141414;
}
.fx-list {
  display: flex;
  flex-direction: column;
}
.fx-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 3px;
}
.fx-row:hover {
  background: #222;
}
.fx-row.selected {
  background: #2d4f7c;
  border-color: #4d79b8;
  color: #fff;
}
.fx-row .fx-ico {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.fx-status {
  font-size: 11px;
  color: #888;
  padding: 4px 8px;
  border-top: 1px solid #1f1f1f;
  background: #161616;
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Details table */
.fx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.fx-table th {
  padding: 4px 6px;
  text-align: left;
  background: #1f1f1f;
  border-bottom: 1px solid #262626;
  cursor: pointer;
  position: sticky;
  top: 0;
}
.fx-table td {
  padding: 2px 6px;
  white-space: nowrap;
}
.fx-table tr:hover {
  background: #222;
}
.fx-table tr.selected {
  background: #2d4f7c;
  color: #fff;
}
/* Grid view placeholder */
.fx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  padding: 6px;
}
.fx-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}
.fx-tile:hover {
  background: #202020;
}
.fx-tile.selected {
  background: #2d4f7c;
  border-color: #4d79b8;
  color: #fff;
}
.fx-tile .fx-ico {
  font-size: 28px;
}
.fx-tile .fx-name {
  font-size: 11px;
  text-align: center;
  word-break: break-word;
  line-height: 1.2;
  max-width: 100%;
}
/* Context menu inherits global styles */
.vscode-tree-contextmenu.fx-contextmenu {
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.6);
  padding: 4px 0;
  border-radius: 6px;
  min-width: 180px;
  font-size: 12px;
}
.vscode-tree-contextmenu.fx-contextmenu .cm-item {
  padding: 4px 12px;
  cursor: pointer;
}
.vscode-tree-contextmenu.fx-contextmenu .cm-item:hover {
  background: #2a2a2a;
}
.vscode-tree-contextmenu.fx-contextmenu .cm-item.disabled {
  opacity: 0.4;
  cursor: default;
}
.vscode-tree-contextmenu.fx-contextmenu .cm-sep {
  height: 1px;
  margin: 4px 0;
  background: #2a2a2a;
}
/* Task Manager styles */
.taskmgr-root {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  height: 100%;
  box-sizing: border-box;
}
.taskmgr-toolbar {
  display: flex;
  gap: 8px;
}
.taskmgr-content {
  display: flex;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.taskmgr-list {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px;
  overflow: auto;
}
.tm-header,
.tm-row {
  display: grid;
  grid-template-columns: 42px 1fr 90px 200px 60px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
}
.tm-header {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.2);
  font-weight: 600;
}
.tm-row {
  border-radius: 6px;
  cursor: pointer;
}
.tm-row:hover {
  background: rgba(255, 255, 255, 0.06);
}
.tm-row.selected {
  outline: 1px solid rgba(0, 150, 255, 0.6);
  background: rgba(0, 150, 255, 0.12);
}
.tm-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.taskmgr-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.taskmgr-status {
  font-size: 12px;
  opacity: 0.8;
}
/* Task Manager buttons styling */
.taskmgr-toolbar button {
  background: #252525;
  color: #ccc;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: background 0.12s ease, border-color 0.12s ease,
    transform 0.02s ease;
}
.taskmgr-toolbar button:hover {
  background: #2f2f2f;
  border-color: #3a3a3a;
}
.taskmgr-toolbar button:active {
  background: #383838;
  transform: translateY(0.5px);
}
.taskmgr-toolbar button:focus {
  outline: 2px solid #4d79b8;
  outline-offset: 2px;
}

.taskmgr-actions button {
  background: #1f1f1f;
  color: #ddd;
  border: 1px solid #2b2b2b;
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  min-width: 170px;
  text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease,
    transform 0.02s ease;
}
.taskmgr-actions button:hover {
  background: #2a2a2a;
}
.taskmgr-actions button:active {
  background: #343434;
  transform: translateY(0.5px);
}
.taskmgr-actions button:disabled {
  opacity: 0.55;
  cursor: default;
  filter: grayscale(0.3);
}
.taskmgr-actions button:focus {
  outline: 2px solid #4d79b8;
  outline-offset: 2px;
}
/* Primary and danger variants */
.taskmgr-actions .tm-focus {
  background: #263b55;
  border-color: #2f4a6d;
  color: #e4f1ff;
}
.taskmgr-actions .tm-focus:hover {
  background: #2d4f7c;
}
.taskmgr-actions .tm-close {
  background: #4a2323;
  border-color: #5a2a2a;
  color: #f5dcdc;
}
.taskmgr-actions .tm-close:hover {
  background: #5a2828;
}
.taskmgr-actions .tm-close:disabled {
  opacity: 0.6;
}
