/* ===== PWA Workspace (spec v1.5, slice 5) — Pit Wall visual language ===== */
/* Tokens: fleet-* + accent/text vars from foundation-shell.css / fleet-pit-wall.css
   (:root-shared). Tree vocabulary mirrors Mockups v5 verbatim: .tree-subpanel /
   .tree-section-head / .tree-item.folder / .tree-new-folder / .folder-graphic. */

#view-workspace {
  display: none;
  height: 100%;
}
#view-workspace.active { display: flex; flex-direction: column; }

.ws-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--fleet-hair);
}
.ws-header h2 {
  font-family: var(--fleet-ink); font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.10em; font-size: 1.1rem; margin: 0;
}
.ws-room-select {
  background: rgba(0,0,0,0.35); color: var(--text-primary);
  border: 1px solid var(--fleet-hair); border-radius: 6px;
  font-family: var(--fleet-mono); font-size: 12px; padding: 4px 8px;
}

.ws-body { display: flex; flex: 1; min-height: 0; }

/* --- tree sub-panel (always visible — the navigation invariant) --- */
.tree-subpanel {
  width: 240px; flex: 0 0 240px;
  background: rgba(0,0,0,0.32); border-right: 1px solid var(--fleet-hair);
  padding: 14px 12px; overflow-y: auto;
}
.tree-new-folder {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 6px;
  background: rgba(254,202,87,0.08); border: 1px solid rgba(254,202,87,0.30);
  border-radius: 5px; font-family: var(--fleet-ink); font-size: 10px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.10em; color: var(--accent-yellow); cursor: pointer;
}
.tree-new-folder .plus-glyph { font-size: 13px; line-height: 1; }
.tree-section-head {
  font-family: var(--fleet-ink); font-size: 9px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--text-muted); font-weight: 900;
  padding: 8px 8px 4px; border-top: 1px solid var(--fleet-hair); margin-top: 6px;
}
.tree-section-head.first { border-top: none; margin-top: 0; padding-top: 4px; }
.tree { font-family: var(--fleet-mono); font-size: 12px; }
.tree-item {
  padding: 3px 8px; color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tree-item.folder { color: var(--text-primary); }
.tree-item.folder .tri { color: var(--accent-yellow); font-size: 10px; }
.tree-item.folder.active {
  background: rgba(254,202,87,0.10); border-left: 2px solid var(--accent-yellow);
  padding-left: 6px; color: var(--accent-yellow);
}
.tree-item.nested { padding-left: 22px; }
.ws-file-empty { color: var(--text-muted); cursor: default; font-style: italic; }
.ws-label { overflow: hidden; text-overflow: ellipsis; }
.ws-date { color: var(--text-muted); font-size: 10px; }
.folder-ico {
  width: 10px; height: 8px; border: 1px solid var(--text-muted);
  border-radius: 1px; display: inline-block; flex: 0 0 auto;
}

.ws-badge {
  font-family: var(--fleet-ink); font-size: 8px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.10em;
  padding: 1px 6px; border-radius: 8px; flex: 0 0 auto;
}
.ws-badge-pending {
  color: var(--accent-yellow); border: 1px solid rgba(254,202,87,0.45);
  animation: ws-pulse 1.6s ease-in-out infinite;
}
.ws-badge-failed { color: #ff6b6b; border: 1px solid rgba(255,107,107,0.45); }
@keyframes ws-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* --- workarea --- */
.ws-workarea { flex: 1; min-width: 0; padding: 14px 18px; overflow-y: auto; }
.folder-graphic {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 2px solid var(--accent-yellow);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.10));
}
.ws-folder-title {
  font-family: var(--fleet-ink); font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.95rem; color: var(--text-primary);
}
.ws-folder-meta { color: var(--text-muted); font-family: var(--fleet-mono); font-size: 11px; margin-left: auto; }
.ws-workarea-note { color: var(--text-muted); font-family: var(--fleet-mono); font-size: 12px; padding: 18px 4px; }
.ws-workarea-empty { color: var(--text-muted); padding: 40px 20px; text-align: center; }
.ws-workarea-empty-title {
  font-family: var(--fleet-ink); font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 1.2rem; margin-bottom: 8px; color: var(--text-secondary);
}
.ws-empty { color: var(--text-muted); font-size: 12px; padding: 10px 8px; line-height: 1.5; }

/* --- F6: the workspace never renders below the breakpoint. Nav entry hidden,
   so mobile DM stays byte-identical to today. The in-room entry point
   (workspace-access-rollout §S1) hides for the same reason — the destination
   view does not render on mobile, so the affordance must not appear either. --- */
@media (max-width: 768px) {
  .nav-btn-workspace { display: none !important; }
  #view-workspace { display: none !important; }
  .dm-workspace-btn { display: none !important; }
}

/* --- slice 6: tab strip + inline file frame + review affordance --- */
.tab-strip {
  display: flex; gap: 2px; margin-top: 10px;
  border-bottom: 1px solid var(--fleet-hair); overflow-x: auto;
}
.tab {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; cursor: pointer; white-space: nowrap;
  font-family: var(--fleet-mono); font-size: 12px; color: var(--text-secondary);
  border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0;
  max-width: 220px;
}
.tab .ws-label { overflow: hidden; text-overflow: ellipsis; }
.tab.active {
  color: var(--accent-yellow); background: rgba(254,202,87,0.08);
  border-color: var(--fleet-hair);
}
.tab-x { color: var(--text-muted); font-size: 14px; padding: 0 2px; }
.tab-x:hover { color: #ff6b6b; }
.ws-tab-newer {
  color: var(--accent-yellow); font-weight: 900; cursor: pointer;
  animation: ws-pulse 1.6s ease-in-out infinite;
}
.tab-content { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-top: 8px; }
.ws-tab-actions { display: flex; justify-content: flex-end; padding: 0 0 6px; }
.ws-open-review {
  background: rgba(254,202,87,0.08); border: 1px solid rgba(254,202,87,0.30);
  color: var(--accent-yellow); border-radius: 5px; cursor: pointer;
  font-family: var(--fleet-ink); font-size: 10px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.10em; padding: 4px 10px;
}
.ws-file-frame {
  flex: 1; width: 100%; min-height: 420px; border: 1px solid var(--fleet-hair);
  border-radius: 6px; background: #fff;
}
.ws-folder-close {
  margin-left: 12px; color: var(--text-muted); cursor: pointer; font-size: 14px;
}
.ws-folder-close:hover { color: #ff6b6b; }
/* Visibly disabled review flows for workspace-file sources (never silent). */
.artifact-flow-unavailable { opacity: 0.45; cursor: not-allowed; }

/* Bot-created folder attribution (task 02f519f4) — quiet marker, hover names the bot. */
.ws-badge-bot { color: #8fa3ff; border: 1px solid rgba(143,163,255,0.4); }

/* One-level sub-folders (029): second indent step for a nested folder's files. */
.ws-depth-2 { padding-left: 34px; }
