/* =============================================================================
 * AI Panel: console/terminal area
 * Ported from scitex-cloud global-ai-chat/06-console-mode.css
 * ============================================================================= */

/* Console view must not scroll — xterm handles its own scrollback */
.stx-shell-ai-view[data-view="console"] {
  overflow: hidden !important;
}

/* Terminal container — flex column so child .stx-shell-terminal fills height */
.stx-shell-ai-console-terminal {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--terminal-bg, var(--workspace-bg-tertiary, #0d1117));
}

/* xterm.js cursor alignment: padding and inherited line-height
   break character cell measurements, causing cursor position drift. */
.stx-shell-ai-console-terminal .xterm {
  padding: 0;
  line-height: normal;
}

.stx-shell-ai-console-terminal.drop-target {
  outline: 2px dashed var(--accent-primary, #3b82f6);
  outline-offset: -2px;
}

/* Console status indicator */
.stx-shell-ai-console-status {
  flex-shrink: 0;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text-muted, #8b949e);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stx-shell-ai-console-status .fa-circle {
  font-size: 0.5rem;
}

.stx-shell-ai-console-status.connected {
  color: var(--workspace-icon-primary, #5a9a7e);
}

.stx-shell-ai-console-status.connected .fa-circle {
  color: var(--workspace-icon-primary, #5a9a7e);
}

/* Console toolbar (status + camera/sketch/mic buttons) */
.stx-shell-ai-console-toolbar {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0.5rem;
  border-top: 1px solid var(--border-default, #30363d);
  background: var(--bg-tertiary, var(--workspace-bg-tertiary, #0d1117));
  font-size: 0.6875rem;
}

.stx-shell-ai-console-toolbar-btns {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stx-shell-ai-console-toolbar-btns .stx-shell-ai-input-btn {
  font-size: 0.7rem;
  padding: 0.15rem 0.35rem;
}

/* Auto-accept state label */
.stx-shell-ai-auto-accept-state {
  font-size: 0.55rem;
  color: var(--text-muted, #8b949e);
  margin-left: 2px;
}

.stx-shell-ai-auto-accept-btn.active {
  color: var(--workspace-icon-primary, #5a9a7e);
}

/* Jobs section (collapsible) */
.stx-shell-ai-jobs-section {
  flex-shrink: 0;
  border-top: 1px solid var(--border-default, #30363d);
}

.stx-shell-ai-jobs-section-summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.6875rem;
  color: var(--text-muted, #8b949e);
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: var(--bg-tertiary, #0d1117);
}

.stx-shell-ai-jobs-section-summary::-webkit-details-marker {
  display: none;
}

.stx-shell-ai-jobs-section-summary:hover {
  color: var(--text-primary);
}

.stx-shell-ai-jobs-summary {
  flex: 1;
  font-size: 0.625rem;
  color: var(--text-muted, #8b949e);
}

.stx-shell-ai-jobs-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 0.25rem 0.5rem;
}
