/* ask_sheet.css — the owner chat's popup bottom sheet (NET-1609).
 *
 * Every class starts with `nask-`, on purpose: this is a stylesheet linked
 * alongside every other one the console already loads, and a shared
 * stylesheet is a shared namespace, not a module — see
 * docs/solutions/a-stylesheet-shared-is-a-namespace-shared.md, which is
 * exactly the mistake a bare `.row` or `.foot` in here would repeat.
 *
 * Colour comes only from the --nt-* custom properties in
 * netron-tokens.css — no hex anywhere below — so the sheet is right in
 * light and dark without a rule of its own.
 */

/* The host sits where the composer sits: a flex child of #p-chat that
   never gets squeezed by the transcript above it (the same flex:0 0 auto
   as .oin), hidden entirely when there is nothing to show. */
.nask-host{flex:0 0 auto;min-width:0;display:flex;flex-direction:column;gap:8px}
.nask-host[hidden]{display:none}

/* Set-aside asks: a question or an approval minimised by an outside tap or
   a branch switch, waiting above the composer to be restored. */
.nask-pills{display:flex;flex-wrap:wrap;gap:8px;
 padding:0 max(16px,calc((100% - 820px)/2))}
.nask-pills:empty{display:none}
.nask-pill{border:1px solid var(--nt-line);background:var(--nt-raised);
 color:var(--nt-ink);border-radius:999px;padding:7px 14px;font-size:12.5px;
 font-weight:700;cursor:pointer;max-width:100%;overflow:hidden;
 text-overflow:ellipsis;white-space:nowrap;font-family:inherit}
.nask-pill:hover{border-color:var(--nt-action)}

/* The sheet itself. It replaces the composer while open (console.py hides
   #oin-wrap, never removes it, so a staged file survives). */
.nask-sheet{border-top:1px solid var(--nt-line);background:var(--nt-surface);
 padding:14px max(16px,calc((100% - 820px)/2)) calc(14px + env(safe-area-inset-bottom,0px));
 display:flex;flex-direction:column;gap:10px;min-width:0;
 animation:nask-up .18s ease-out}
.nask-sheet[hidden]{display:none}
@keyframes nask-up{from{transform:translateY(16px);opacity:.4}to{transform:translateY(0);opacity:1}}
@media (prefers-reduced-motion: reduce){
 .nask-sheet{animation:none}
}

.nask-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.nask-chip{display:inline-block;min-width:0;max-width:100%;overflow:hidden;
 text-overflow:ellipsis;white-space:nowrap;border-radius:999px;padding:4px 12px;
 font-size:11.5px;font-weight:800;letter-spacing:.02em;text-transform:uppercase;
 background:var(--nt-raised);color:var(--nt-action-text);
 border:1px solid var(--nt-line)}
/* The money stage (cost > 0 review) — a warning tone, the same family the
   platform already uses for "waiting"/pending, not a new colour. */
.nask-chip.nask-money{background:color-mix(in oklab, var(--nt-waiting) 22%, var(--nt-surface));
 color:var(--nt-waiting-text);
 border-color:color-mix(in oklab, var(--nt-waiting) 45%, var(--nt-surface))}
.nask-x{border:none;background:transparent;color:var(--nt-ink-2);font-size:16px;
 cursor:pointer;padding:4px 6px;line-height:1;border-radius:8px}
.nask-x:hover{background:var(--nt-raised);color:var(--nt-ink)}
.nask-x:disabled{opacity:.5;cursor:default}

.nask-q{font-size:15.5px;font-weight:800;color:var(--nt-ink)}
.nask-desc{font-size:13px;color:var(--nt-ink-2);line-height:1.4}

.nask-what{display:flex;flex-direction:column;gap:4px;min-width:0}
.nask-what-row{display:flex;align-items:baseline;gap:8px;font-size:13px;
 flex-wrap:wrap}
.nask-what-label{color:var(--nt-ink-2);min-width:0}
.nask-what-from{color:var(--nt-ink-3);text-decoration:line-through}
.nask-what-arrow{color:var(--nt-ink-3)}
.nask-what-to{color:var(--nt-ink);font-weight:800}
.nask-what-line{font-size:13px;color:var(--nt-ink-2)}
/* A table scrolls INSIDE its own box, so a wide "what will happen" table
   never pushes the page sideways at 360px (AE14). */
.nask-what-table-wrap{overflow-x:auto;max-width:100%;border:1px solid var(--nt-line);
 border-radius:8px}
table.nask-what-table{border-collapse:collapse;width:100%;font-size:12.5px}
table.nask-what-table th{text-align:left;font-weight:700;color:var(--nt-ink-2);
 padding:6px 10px;border-bottom:1px solid var(--nt-line);white-space:nowrap}
table.nask-what-table td{padding:6px 10px;color:var(--nt-ink);
 border-bottom:1px solid var(--nt-line);white-space:nowrap}

.nask-opts{display:flex;flex-direction:column;gap:8px;min-width:0}
.nask-opt{display:flex;align-items:center;gap:10px;text-align:left;
 border:1px solid var(--nt-line);background:var(--nt-surface);color:var(--nt-ink);
 border-radius:12px;padding:10px 14px;font:inherit;cursor:pointer;
 min-height:var(--nt-tap);min-width:0;width:100%}
.nask-opt:hover{border-color:var(--nt-action)}
.nask-opt:disabled{opacity:.5;cursor:default}
.nask-opt.nask-opt-primary{border-color:var(--nt-action);
 background:color-mix(in oklab, var(--nt-action) 8%, var(--nt-surface))}
.nask-opt-n{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
 width:22px;height:22px;border-radius:6px;background:var(--nt-raised);
 color:var(--nt-ink-2);font-size:11.5px;font-weight:800}
.nask-opt-label{flex:1 1 auto;font-size:14px;font-weight:700;min-width:0}
.nask-opt-detail{flex:0 0 auto;font-size:12px;color:var(--nt-ink-2)}

.nask-typed{display:flex;gap:8px;align-items:center;min-width:0}
.nask-typed[hidden]{display:none}
.nask-input{flex:1 1 auto;min-width:0;border:1px solid var(--nt-line);
 background:var(--nt-surface);color:var(--nt-ink);border-radius:12px;
 padding:10px 12px;font-size:16px;font-family:inherit}
.nask-input:disabled{opacity:.6}
.nask-send{flex:0 0 auto;border:1px solid var(--nt-action);
 background:color-mix(in oklab, var(--nt-action) 12%, var(--nt-surface));
 color:var(--nt-action-text);border-radius:12px;padding:10px 16px;font-size:13px;
 font-weight:800;cursor:pointer;min-height:var(--nt-tap);font-family:inherit}
.nask-send:disabled{opacity:.6;cursor:default}

.nask-status{font-size:12px;color:var(--nt-ink-2);min-height:14px}

.nask-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.nask-hint{font-size:11.5px;color:var(--nt-ink-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nask-notnow{border:none;background:transparent;color:var(--nt-ink-2);
 font-size:12.5px;font-weight:700;cursor:pointer;padding:6px 4px;font-family:inherit}
.nask-notnow:hover{color:var(--nt-ink)}
.nask-notnow:disabled{opacity:.5;cursor:default}

@media (max-width:640px){
 .nask-pills{padding:0 16px}
 .nask-sheet{padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));
  max-height:calc(70vh * var(--nt-vu,1));overflow-y:auto}
 .nask-hint{display:none}
 .nask-opt{min-height:44px}
}
