/* The command card (command-view.js): a claude-ask question with a command, in the inbox and
   in the session dialog of its row, and the dialog of the output of a run (home-command.js).
   In the tokens of home.css. */

.cc { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cc p { margin: 0; }
.cc-why { line-height: 1.45; }
/* The command exactly as it runs: never cut, never wrapped; a long one scrolls in its box. */
.cc-code { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--sunk); font-size: .8rem; line-height: 1.45;
  white-space: pre; overflow: auto; max-height: 16em; min-width: 0; }
.cc-code:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* The result of a run on a paired device: the exit line and the end of the output, as text. */
.cc-tail { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--sunk); font-family: var(--f-mono); font-size: .78rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto; }
.cc-tail:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cc-where { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .82rem; }
.cc-where code { overflow-wrap: anywhere; color: var(--ink); }
/* The warn colour: the blocked line and the marks. A mark never blocks. */
.cc-warn { color: var(--warn); }
.cc-blocked { padding: 5px 9px; border: 1px solid var(--warn); border-radius: 8px; background: var(--warn-soft); font-weight: 600; overflow-wrap: anywhere; }
.cc-marks { margin: 0; padding: 5px 9px 5px 26px; border: 1px solid var(--warn); border-radius: 8px; background: var(--warn-soft); font-size: .84rem; }
.cc-marks b { font-family: var(--f-mono); font-weight: 700; margin-right: 4px; }
.cc-note { color: var(--muted); font-size: .84rem; }
.cc-acts { flex-wrap: wrap; }
.cc-state { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.cc-state.ran { color: var(--ok); }
.cc-state.failed, .cc-state.still { color: var(--warn); }
.cc-state .ic { flex: none; }
/* Why Run is off (a stale terminal host) and why the last Run did not start. */
.cc-block, .cc-error { padding: 5px 9px; border: 1px solid var(--warn); border-radius: 8px; background: var(--warn-soft); overflow-wrap: anywhere; }
.cc-error { font-weight: 600; }

/* The output of a run: the terminal frame (term-frame.js) in a dialog of its own. */
dialog.cc-out { width: min(980px, calc(100vw - 24px)); }
.cc-out .d-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cc-out-cmd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; color: var(--muted); }
.cc-out-state { margin: 2px 0 6px; font-size: .84rem; color: var(--muted); }
/* The end of the run at the top: how it ended, whether the result went to the session, Close. */
.cc-out-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 6px; padding: 6px 10px; border-radius: 8px; background: var(--sunk); }
.cc-out-result[hidden] { display: none; }
.cc-out-result p { flex: 1 1 16em; margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.cc-term { flex: 1 1 auto; min-height: 0; display: flex; padding: 10px 14px 4px; }
.cc-term[hidden] { display: none; }
.cc-term .term-frame { flex: 1 1 auto; width: 100%; min-height: 260px; border: 0; border-radius: 10px; background: #0c1016; }
.cc-term .term-screen { flex: 1 1 auto; margin: 0; }
.cc-out-note { margin: 0; padding: 0 14px 10px; }

/* The hidden field of the browser's own copy command (home-command.js). */
.cc-copy-field { position: fixed; left: -9999px; top: 0; opacity: 0; }
