/* css/views/console.css — director's console (presenter layer, option 6). Deliberately NOT product-styled: dark strip.
   guide/console.js sets html[data-console="open|collapsed"] and html[data-guide-hidden="1"].

   Space reservation: while the console is open it sets the shell's --app-inset-bottom (shell.css) to its own height.
   The shell layout, footer, drawers, toasts and the guide engine (runtime.js inset option) all honour that variable,
   so nothing here overrides their sizes. */

html[data-console="open"] { --app-inset-bottom: 100px; }
html[data-console="collapsed"] { --app-inset-bottom: 56px; }
/* the console replaces the guide's own notes panel */
html[data-console] .gd-notes { display: none !important; }
/* Guide off: the walkthrough keeps running (state machine, drift detection, keyboard); only the overlay is invisible */
html[data-guide-hidden="1"] .gd-root, html[data-guide-hidden="1"] .gd-root * { visibility: hidden !important; }

/* ---------------- strip ---------------- */
.dc {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 81; /* above the app, menus and the modal scrim (80, so the presenter can always step away); below ⌘K (85) */
  height: var(--app-inset-bottom, 100px); background: #161514; color: #EDEAE6; box-shadow: 0 -8px 24px rgba(0,0,0,.18);
  font-family: var(--sans); font-size: 13px; user-select: none;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 560px);
}
.dc button { font-family: var(--sans); color: inherit; }
.dc button:focus-visible { outline: 2px solid #F3A39B; outline-offset: 2px; }
.dc button:disabled { opacity: .38; cursor: default; }
.dc-left { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 16px; min-width: 0; }
.dc-row { display: flex; align-items: center; gap: 10px; min-width: 0; height: 40px; }
.dc-row2 { display: flex; align-items: center; gap: 14px; min-width: 0; font-size: 12px; color: #BDB8B2; white-space: nowrap; }

.dc .rec { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: #F3A39B; flex: none; }
.dc .rec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: dc-pulse 1.4s infinite; }
@keyframes dc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.dc .sel { display: inline-flex; align-items: center; gap: 7px; background: #2A2725; border-radius: 9px; padding: 6px 10px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; max-width: 300px; overflow: hidden; text-overflow: ellipsis; flex: none; }
.dc .sel:hover, .dc .sel[aria-expanded="true"] { background: #3A3633; }
.dc .sel .car { color: #9A948E; font-size: 11px; }
.dc-tag { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; border-radius: 20px; padding: 1px 7px; font-weight: 600; line-height: 1.5; }
.dc-p-full { background: #F7E3E3; color: #9B0D22; }
.dc-p-light { background: #E4EBF1; color: #0F3A85; }
.dc-p-touch { background: #DCEBE9; color: #2F6E6B; }
.dc-p-pay { background: #F6DDC9; color: #8A4210; }
.dc-p-risk { background: #3A1E22; color: #F3A39B; box-shadow: inset 0 0 0 1px #6B2A33; }

.dc .vd { width: 1px; height: 22px; background: #3A3633; flex: none; }
.dc-stp { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dc-stp .n { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: #9A948E; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-stp .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.dc-stp .segs { display: flex; gap: 3px; margin-top: 4px; }
.dc-stp .segs > i, .dc-stp .segs > button { flex: 1; height: 9px; padding: 3px 0; border: 0; background: none; cursor: pointer; display: block; min-width: 6px; }
.dc-stp .segs > i { height: 3px; padding: 0; border-radius: 2px; background: #3A3633; cursor: default; }
.dc-stp .segs > i.d { background: #8A847C; }
.dc-stp .segs > button i { display: block; height: 3px; border-radius: 2px; background: #3A3633; }
.dc-stp .segs > button.d i { background: #8A847C; }
.dc-stp .segs > button.c i { background: #F3A39B; }
.dc-stp .segs > button:hover i { background: #CFC9C2; }

.dc .b { width: 32px; height: 32px; border-radius: 9px; background: #2A2725; border: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; flex: none; }
.dc .b:hover:not(:disabled) { background: #3A3633; }
.dc .b.pri { background: #fff; color: #161514; width: auto; padding: 0 12px; font-weight: 700; font-size: 12.5px; gap: 6px; white-space: nowrap; }
.dc .b.pri:hover { background: #F1EEEA; }
.dc kbd { font-family: var(--mono); font-size: 10px; background: #2A2725; border: 1px solid #3A3633; border-radius: 4px; padding: 1px 5px; color: #BDB8B2; }
.dc .b kbd { background: transparent; border: 0; padding: 0; }

.dc .tg { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #BDB8B2; cursor: pointer; white-space: nowrap; background: none; border: 0; padding: 4px 2px; flex: none; }
.dc .tg i { width: 28px; height: 16px; border-radius: 10px; background: var(--red); position: relative; flex: none; }
.dc .tg i::after { content: ""; position: absolute; right: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.dc .tg.off i { background: #4A4541; }
.dc .tg.off i::after { right: auto; left: 2px; }
.dc .tg.sm i { width: 24px; height: 14px; }
.dc .tg.sm i::after { width: 10px; height: 10px; }

.dc-off { display: inline-flex; align-items: center; gap: 8px; background: #3A2A1E; color: #F6C79F; border-radius: 9px; padding: 6px 10px; font-size: 12.5px; white-space: nowrap; flex: 1; min-width: 0; }
.dc-off button { background: none; border: 0; color: #fff; font-weight: 700; text-decoration: underline; cursor: pointer; font-size: 12.5px; padding: 0; }
.dc-off.dc-paused { background: #23303F; color: #BCD0EA; }

.dc-seg { display: inline-flex; align-items: center; gap: 2px; background: #2A2725; border-radius: 20px; padding: 2px; }
.dc-seg .lab { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #9A948E; padding: 0 6px 0 8px; }
.dc-seg button { border: 0; background: none; border-radius: 20px; padding: 2px 10px; font-size: 11.5px; font-weight: 600; color: #BDB8B2; cursor: pointer; }
.dc-seg button.on { background: #EDEAE6; color: #161514; }
.dc-lnk { background: none; border: 0; color: #EDEAE6; font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 0; }
.dc-lnk:hover:not(:disabled) { text-decoration: underline; }
.dc-hint { color: #8A847C; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dc-hint kbd { padding: 0 4px; }
.dc-x { margin-left: auto; color: #9A948E; }

/* ---------------- notes (SAY / CLICK / IF ASKED) ---------------- */
.dc-notes { border-left: 1px solid #2A2725; padding: 8px 20px; align-content: center; display: grid; grid-template-columns: 70px 1fr; gap: 3px 12px; font-size: 12px; line-height: 1.35; overflow: hidden; min-width: 0; }
.dc-notes .k { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: #9A948E; padding-top: 2px; }
.dc-notes .say { font-family: var(--serif); font-size: 14.5px; line-height: 1.3; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-notes .say .mut { color: #BDB8B2; }
.dc-notes .dc-ask { color: #BDB8B2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------- collapsed: one row, no notes ---------------- */
.dc.collapsed { grid-template-columns: minmax(0, 1fr) 0; }
.dc.collapsed .dc-notes, .dc.collapsed .dc-row2 { display: none; }

/* ---------------- popovers (scenario picker, jump list) ---------------- */
.dc-pop { position: absolute; bottom: calc(100% + 8px); left: 120px; z-index: 2; background: #1F1D1B; color: #EDEAE6; border: 1px solid #3A3633; border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.35); padding: 6px; max-height: min(60vh, 520px); overflow-y: auto; width: 380px; }
.dc-pop-jump { left: 300px; width: 420px; }
.dc-pg + .dc-pg { border-top: 1px solid #2A2725; margin-top: 4px; padding-top: 4px; }
.dc-pg-h { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #9A948E; padding: 8px 10px 4px; }
.dc-pi { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; text-align: left; background: none; border: 0; border-radius: 9px; padding: 8px 10px; cursor: pointer; }
.dc-pop-pick .dc-pi { grid-template-columns: 1fr; }
.dc-pi:hover, .dc-pi:focus-visible { background: #2A2725; }
.dc-pi.on { background: #3A2A2D; }
.dc-pi-n { font-family: var(--mono); font-size: 11px; color: #9A948E; width: 18px; }
.dc-pi-t { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.dc-pi-s { font-family: var(--mono); font-size: 10.5px; color: #9A948E; }

@media (max-width: 1440px) {
  .dc { grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); }
  .dc .sel { max-width: 220px; }
  .dc-stp { min-width: 150px; }
  .dc-row { gap: 8px; }
}
@media (max-width: 1180px) {
  .dc { grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); }
  .dc .sel { max-width: 200px; }
  .dc-hint { display: none; }
}
@media (max-width: 860px) {
  .dc { grid-template-columns: minmax(0, 1fr) 0; }
  .dc-notes { display: none; }
}
@media (prefers-reduced-motion: reduce) { .dc .rec::before { animation: none; } }
