/* e6a.css -- agentpaneel, een tab in het onderpaneel (#0000-0729). Alle maten en
 * kleuren uit core.css' variabelen (var(--surface) enz.); geen eigen hex. Vorm: een
 * vaste linkerkolom (de slots) en een rechterkolom die meegroeit (het gesprek), zoals
 * AW_LISTW/agentview.wz op het canvas -- zie plan-e6a.md. De volle breedte van het
 * onderpaneel geeft het gesprek nu ruimte om code te lezen, in plaats van de kolom van
 * ~260px die de zijbalk toestond. */

.e6a-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

/* DE WERKBALK (DEC-0000-0140): Launch links, de engine voor nieuwe vragen rechts */
.e6a-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--row-h);
  padding: 0 8px;
  border-bottom: 1px solid var(--rule);
}
.e6a-spacer { flex: 1; }
.e6a-englab { color: var(--text-dim); font-size: calc(var(--ui-fs) * 11 / 13); }
/* #0000-0590: welke engine nieuwe agentvragen krijgt -- de tools bestonden al
 * (agents_engines/agents_select), dit is alleen de keuzelijst. */
.e6a-engine {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: calc(var(--ui-fs) * 11 / 13);
  padding: 1px 4px;
  max-width: calc(var(--ui-fs) * 11);
}
.e6a-engine:focus { outline: none; border-color: var(--focus); }

/* LINKS DE GRID VAN ALLE AGENTS (agentmap.js), RECHTS HET GESPREK */
.e6a-body {
  flex: 1;
  display: flex;
  /* NOOIT WEGGEDRUKT door Launch: de grid en het gesprek houden minstens vier rijen */
  min-height: calc(var(--row-h) * 4);
}
.e6a-list {
  flex: 0 0 var(--e6a-list-w, 55%);
  min-width: 0;
  max-width: calc(100% - 240px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.e6a-grid { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
/* DE AANDACHTSLIJST ALLEEN ALS ER IETS WACHT: leeg nam hij twee rijen van de grid ("ATTENTION /
 * Nothing waiting"); een beantwoorde vraag blijft er wel in staan, om hem terug te vinden. */
.e6a-list .e6c-inline:has(.e6c-inlinelist > .e6c-empty) { display: none; }

/* DE TABS RECHTS: Conversation | Steps */
.e6a-tabs {
  flex: none;
  display: flex;
  gap: 14px;
  padding: 0 12px;
  height: var(--row-h);
  align-items: center;
  border-bottom: 1px solid var(--rule);
}
.e6a-tab {
  font-size: calc(var(--ui-fs) * 11 / 13);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-dim);
  height: 100%;
  border-bottom: 1px solid transparent;
}
.e6a-tab.on { color: var(--text); border-bottom-color: var(--focus); }
.e6a-steps { flex: 1; overflow-y: auto; min-height: 0; padding: 6px 12px; }

.e6a-conv {
  flex: 1;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.e6a-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  min-height: 0;
}

.e6a-hint { color: var(--text-dim); font-size: var(--ui-fs); }

.e6a-status {
  font-size: var(--ui-fs);
  font-weight: 600;
  margin-bottom: 4px;
}
.e6a-status.run  { color: var(--attn); }
.e6a-status.ok   { color: var(--ok); }
.e6a-status.err  { color: var(--danger-tx); }
.e6a-status.idle { color: var(--text-dim); }

.e6a-question {
  color: var(--text-strong);
  white-space: pre-wrap;
  font-size: var(--ui-fs);
  margin-bottom: 6px;
}

.e6a-rule { border: none; border-top: 1px solid var(--rule); margin: 6px 0; }

.e6a-muted { color: var(--text-muted); font-size: var(--ui-fs); margin-bottom: 4px; }

.e6a-output {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  color: var(--text);
  font-size: var(--ui-fs);
  margin: 0;
}

.e6a-insert {
  align-self: flex-start;
  margin: 0 12px 8px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 4px 10px;
  font-size: var(--ui-fs);
  cursor: pointer;
}
.e6a-insert:hover { background: var(--hover); }

/* #0000-0755: the status strip docked above the input bar -- running count, elapsed
 * time, engine/model, a stop button. One row, small text, same family as e6a-listhead. */
.e6a-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-top: 1px solid var(--rule);
  font-size: calc(var(--ui-fs) * 11 / 13);
  color: var(--text-dim);
  flex: none;
}
.e6a-bardot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); flex: none; }
.e6a-bardot.on { background: var(--ok); }
.e6a-barrun { color: var(--text); }
.e6a-barmodel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e6a-bartime { margin-left: auto; }
.e6a-barqueue { color: var(--attn); }
.e6a-bardone { color: var(--muted, inherit); }
.e6a-barstop {
  background: none;
  border: 1px solid var(--rule);
  color: var(--danger-tx);
  font-size: calc(var(--ui-fs) * 11 / 13);
  padding: 1px 8px;
  border-radius: 2px;
  cursor: pointer;
}
.e6a-barstop:hover { border-color: var(--danger); }

.e6a-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--rule);
  flex: none;
}

.e6a-input {
  flex: 1;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 4px 8px;
  font-size: var(--ui-fs);
}
.e6a-input:focus { outline: none; border-color: var(--focus); }

.e6a-send {
  background: var(--accent);
  color: var(--accent-tx);
  border: none;
  border-radius: 2px;
  padding: 4px 14px;
  font-size: var(--ui-fs);
  cursor: pointer;
}
.e6a-send:hover { background: var(--accent-hi); }
.e6a-send:disabled { opacity: .5; cursor: default; }

/* ---- #0000-0837: the result of a finished run, and the notice when it ends ---------- */
.e6a-result {
  margin: 6px 0 8px;
  padding: 6px 8px;
  border-left: 3px solid var(--ok, #3fb950);
  background: var(--surface2);
  border-radius: 3px;
}
.e6a-result.bad { border-left-color: var(--danger); }
.e6a-result-head { font-weight: 600; margin-bottom: 2px; }
.e6a-result-line { color: var(--text); }
.e6a-file { color: var(--accent, #4fa3ff); text-decoration: none; cursor: pointer; }
.e6a-file:hover { text-decoration: underline; }
/* the cards of finished agents: a row at the bottom of #editor, in room #editor keeps free for it (e6a.js layoutDone, #0000-1967) */
.e6a-donestack {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  box-sizing: border-box;
}
#editor.donespace { padding-bottom: var(--done-h, 0); box-sizing: border-box; }
.e6a-donestack .e6a-donecard { flex: 1 1 0; min-width: 0; max-width: 360px; }
/* a card never takes the screen: a long file list made one 445px tall, #editor gave all of that away and the screen above
   kept 0px while its buttons stayed under the card. The row is at most ~a third of the editor; the card's file list scrolls. */
.e6a-donestack { max-height: min(160px, 35%); }
.e6a-donestack .e6a-donecard { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.e6a-donestack .e6a-donecard .e6a-donetext { min-height: 0; overflow: auto; flex: 0 1 auto; }
.e6a-donecard {
  background: var(--surface2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ok, #3fb950);
  border-radius: 3px;
  padding: 8px 10px;
}
.e6a-donecard.bad { border-left-color: var(--danger); }
.e6a-donehead { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.e6a-donekind { font-size: calc(var(--ui-fs) * 10 / 13); letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
.e6a-doneticket { font-family: var(--font-code); font-size: calc(var(--ui-fs) * 11 / 13); color: var(--syn-ident); }
.e6a-doneclose { margin-left: auto; background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: calc(var(--ui-fs) * 14 / 13); }
.e6a-donetext { margin-bottom: 6px; }
.e6a-doneactions { display: flex; gap: 6px; }
.e6a-donebtn { font: inherit; font-size: calc(var(--ui-fs) * 12 / 13); padding: 2px 8px; cursor: pointer; }
.e6a-donereport { margin-bottom: 6px; color: var(--text); font-size: calc(var(--ui-fs) * 12 / 13);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.e6a-donereport:empty { display: none; }

/* #0000-0838: WHAT AN AGENT SAID IS TEXT YOU CAN SELECT. body is user-select: none
 * (core.css: the chrome is not a document), and this panel never turned it back on -- the
 * transcript, the question and the result could not be selected or copied at all. The
 * list of slots and the buttons stay unselectable: those are controls. */
.e6a-messages, .e6a-donetext, .e6a-donereport {
  -webkit-user-select: text; user-select: text;
  cursor: auto;
}
.e6a-gap { color: var(--text-dim); font-style: italic; }

/* ---- layer 1: one prompt line and Start (#0000-1020) ---------------------------------- */
.e6a-prompt { display: flex; gap: 8px; align-items: center; padding: 8px 10px 6px; }
.e6a-prompt-in {
  flex: 1; min-width: 0; background: var(--surface2); color: var(--text-strong);
  border: 1px solid var(--rule); border-radius: 4px; padding: 6px 10px; font: var(--ui-fs) var(--font-ui);
}
.e6a-prompt-in:focus { outline: 1px solid var(--focus); border-color: var(--focus); }
.e6a-prompt-go { background: var(--accent); color: var(--accent-tx); border: 0; border-radius: 4px; padding: 6px 16px; font: var(--ui-fs) var(--font-ui); cursor: pointer; }
.e6a-prompt-go:hover { background: var(--accent-hi); }
.e6a-prompt-go:disabled { opacity: .6; }
.e6a-prompt-more { background: var(--surface2); color: var(--text); border: 1px solid var(--rule); border-radius: 4px; padding: 5px 10px; font: var(--ui-fs) var(--font-ui); cursor: pointer; white-space: nowrap; }
.e6a-prompt-msg { padding: 0 12px 6px; color: var(--text); }
.e6a-prompt-msg.bad { color: var(--danger-tx); }
.e6a-more[hidden] { display: none; }

/* #0000-0990: what the agent is doing now, on top of STEPS; orange when a step takes long */
.e6a-stepnow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 6px 0 10px 0; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface2); font-size: calc(var(--ui-fs) * 1.1); }
.e6a-stepnow-kind { color: var(--text-dim); white-space: nowrap; }
.e6a-stepnow-what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-code); }
.e6a-stepnow-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* #0000-1872: the step in plain words; the raw step one click away under Details */
.e6a-stepnow-plain { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e6a-stepnow-details { flex-basis: 100%; font-size: var(--ui-fs); color: var(--text-dim); }
.e6a-stepnow-details summary { cursor: pointer; }
.e6a-stepnow-raw { display: flex; gap: 8px; align-items: baseline; margin-top: 4px; min-width: 0; }
.e6a-says { padding: 6px 2px; color: var(--text); font-style: italic; }
.e6a-says[hidden] { display: none; }
.e6a-stepnow.long { border-color: var(--attn); background: color-mix(in srgb, var(--attn) 16%, var(--surface2)); }
.e6a-stepnow.long .e6a-stepnow-time { color: var(--attn); font-weight: 600; }
.e6a-steplist { margin: 0 0 10px 0; max-height: 40vh; overflow-y: auto; }
.e6a-steprow { display: flex; gap: 8px; align-items: baseline; padding: 2px 10px; }
.e6a-steprow-kind { color: var(--text-dim); min-width: 5.5em; white-space: nowrap; }
.e6a-steprow-what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-code); }
.e6a-steprow-more { color: var(--text-dim); padding: 2px 10px; font-style: italic; }

/* #0000-1020: a card per agent in simple mode (the mockup of DEC-0000-0178) */
.e6a-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding: 8px 0; align-content: start; }
.e6a-cards[hidden] { display: none; }
.e6a-cards-empty { color: var(--text-dim); padding: 10px 2px; }
.e6a-card { border: 1px solid var(--rule); border-radius: 6px; background: var(--surface2); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.e6a-card.wait { border-color: var(--attn); }
.e6a-card-name { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-strong); min-width: 0; }
.e6a-card-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e6a-card-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-dim); }
.e6a-card.run .e6a-card-dot { background: var(--ok); }
.e6a-card.wait .e6a-card-dot { background: var(--attn); }
.e6a-card.done .e6a-card-dot { background: var(--accent-hi); }
.e6a-card.fail .e6a-card-dot { background: var(--danger); }
.e6a-card-state { color: var(--text-dim); }
.e6a-card.wait .e6a-card-state { color: var(--attn); }
.e6a-card.nobuild .e6a-card-state, .e6a-card-build.bad, .e6a-build-bad { color: var(--attn); }
.e6a-card.nobuild { border-color: var(--attn); }
.e6a-card-line { color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-break: break-word; }
.e6a-card-acts { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.e6a-card-btn { background: var(--surface2); color: var(--text); border: 1px solid var(--rule); border-radius: 4px; padding: 4px 12px; font: var(--ui-fs) var(--font-ui); cursor: pointer; }
.e6a-card-btn.primary { background: var(--accent); color: var(--accent-tx); border-color: var(--accent); }
.e6a-steprow-dur { margin-left: auto; padding-left: 10px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.e6a-steprow.failed .e6a-steprow-dur { color: var(--danger-tx); }

/* #0000-1148/#0000-1150: the status-bar notice (a resume, an engine that took over) */
.e6a-notice { cursor: pointer; max-width: 70ch; overflow: hidden; text-overflow: ellipsis; }
.e6a-notice[hidden] { display: none; }

/* a colleague's turn (#0000-1643): a card like an agent's, with the label colleague */
.e6a-card-tag { margin-left: 6px; font-size: 11px; padding: 0 6px; border-radius: 8px; background: var(--rule, rgba(127,127,127,.25)); opacity: .9; }
.e6a-card-sum { opacity: .8; }
.e6a-turnview { display: flex; flex-direction: column; height: 100%; }
.e6a-turnhead { padding: 6px 10px; font-weight: 600; border-bottom: 1px solid var(--rule, rgba(127,127,127,.25)); }
.e6a-turntext { flex: 1; overflow: auto; margin: 0; padding: 10px; white-space: pre-wrap; }
/* #0000-1679: a turn's report (formatted Markdown) and its conversation, as two tabs */
.e6a-turntabs { display: flex; gap: 2px; padding: 4px 8px 0; border-bottom: 1px solid var(--rule, rgba(127,127,127,.25)); }
.e6a-turntab { border: 0; background: none; padding: 5px 10px; cursor: pointer; color: inherit; opacity: .7; border-bottom: 2px solid transparent; font: inherit; }
.e6a-turntab.on { opacity: 1; border-bottom-color: var(--accent, #4a9); font-weight: 600; }
.e6a-turnresult { flex: 1; overflow: auto; padding: 12px 18px; line-height: 1.55; max-width: 60rem; font: var(--ui-fs)/1.55 var(--font-ui); color: var(--text); }
.md-report code, .md-report pre.md-code { font-family: var(--font-code); }
.md-report h2 { font-size: 1.35em; margin: .2em 0 .5em; }
.md-report h3 { font-size: 1.15em; margin: 1.1em 0 .4em; }
.md-report h4, .md-report h5 { font-size: 1em; margin: 1em 0 .3em; }
.md-report p { margin: .45em 0; }
.md-report ul, .md-report ol { margin: .4em 0 .6em 1.4em; padding: 0; }
.md-report li { margin: .2em 0; }
.md-report a { color: var(--accent, #4a9); }
.md-report code { font-size: .92em; padding: 0 3px; border-radius: 3px; background: rgba(127,127,127,.15); }
.md-report pre.md-code { padding: 8px 10px; border-radius: 4px; background: rgba(127,127,127,.12); overflow: auto; white-space: pre; }
.md-report blockquote { margin: .5em 0; padding: 2px 10px; border-left: 3px solid rgba(127,127,127,.4); opacity: .9; }
.md-report table.md-table { border-collapse: collapse; margin: .6em 0; }
.md-report table.md-table th, .md-report table.md-table td { border: 1px solid rgba(127,127,127,.3); padding: 3px 8px; text-align: left; vertical-align: top; }
.md-report hr { border: 0; border-top: 1px solid rgba(127,127,127,.3); margin: 1em 0; }

/* #0000-1477: "Chosen by Jev (82%)" and its Change button */
.e6a-jev-change, .agm-jev-change, .mob-jev-change { margin-left: 8px; background: none; border: none; padding: 0; color: var(--accent-hi, var(--accent)); font: inherit; text-decoration: underline; cursor: pointer; }

/* Agents is a screen next to the side panel (#0000-2947): on a narrow window (the desktop client at 390 px) the agents and the
 * conversation sit under each other instead of side by side. */
@media (max-width: 760px) {
  .e6a-body { flex-direction: column; overflow-y: auto; }
  .e6a-list { flex: 0 0 auto; max-width: none; max-height: 45%; border-bottom: 1px solid var(--rule); }
  .e6a-conv { flex: 1 0 60%; min-width: 0; }
}
.e3bview.e6a-panel { background: var(--bg); color: var(--text); font: var(--ui-fs)/1.4 var(--font-ui); }
