/* The help panel (partials/help_panel.html) and the header button that opens
   it. Tokens from app.css; blue only on the open state of the button, which
   is the "you are here" dot for the panel. 44px targets on touch: the panel
   is used from the iPad too. */
.help-open {
  margin-left: auto;
  flex: 0 0 auto;
  width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--ink-dim);
  cursor: pointer;
}
.session-chip + .help-open { margin-left: .2rem; }
.help-open:hover { color: var(--ink); }
.help-open.is-open { color: var(--chrome); }
.help-open .icon { width: 20px; height: 20px; }
/* 32px under a mouse keeps the header slim; touch gets its 44pt back. */
@media (pointer: coarse) { .help-open { width: 44px; height: 44px; } }

.help-panel {
  position: fixed; top: 64px; right: 1rem;
  width: min(420px, calc(100vw - 2rem));
  max-height: calc(100vh - 80px);
  display: flex; flex-direction: column;
  background: var(--g2); border: 1px solid var(--line-strong);
  box-shadow: 0 12px 36px rgba(0,0,0,.5);
  z-index: 150;
}
.help-panel[hidden] { display: none; }
/* app.css gives every button display:inline-flex, which beats the hidden
   attribute: Flag and Clear showed on an empty thread. */
.help-panel [hidden] { display: none; }
.help-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .3rem .4rem .3rem .9rem; border-bottom: 1px solid var(--line);
}
.help-title { margin: 0; }
.help-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.help-thread {
  flex: 1 1 auto; overflow: auto; min-height: 120px;
  padding: .8rem .9rem; display: flex; flex-direction: column; gap: .7rem;
}
.help-msg { margin: 0; white-space: pre-wrap; line-height: 1.45; font-size: .92rem; }
.help-msg.you { color: var(--ink-dim); border-left: 2px solid var(--line-strong); padding-left: .6rem; }
.help-msg.err { color: var(--warn); }
/* An answer is markdown help.js has turned into blocks (vault/47 A3). */
.help-msg.answer { white-space: normal; }
.help-msg.answer > p, .help-msg.answer > ol, .help-msg.answer > ul { margin: 0 0 .55em; }
.help-msg.answer > :last-child { margin-bottom: 0; }
.help-msg.answer ol, .help-msg.answer ul { padding-left: 1.3em; }
.help-msg.answer li + li { margin-top: .3em; }
.help-msg.answer code { font-family: var(--mono, ui-monospace, monospace); font-size: .88em; }
.help-intro { margin: 0; font-size: .85rem; }
.help-form {
  border-top: 1px solid var(--line); padding: .6rem .9rem .7rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.help-form textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 44px;
  background: var(--g1); color: var(--ink); border: 1px solid var(--line);
  padding: .5rem .6rem; font: inherit; font-size: .92rem;
}
.help-form textarea:focus { outline: none; border-color: var(--chrome); }
.help-actions { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.help-actions .btn { min-height: 44px; min-width: 72px; }
.help-actions .linklike { min-height: 44px; }
.help-status { margin-left: auto; font-size: .75rem; }
@media (max-width: 600px) {
  .help-panel {
    top: auto !important; bottom: 0; right: 0; left: 0;
    width: auto; max-height: 70vh; border-left: 0; border-right: 0;
  }
}

/* Ask / Do (Co-work). The on mode reads as the selected tab: ink, with the
   chrome underline the rest of the app uses for "you are here". */
.help-modes { display: flex; gap: .2rem; }
.help-mode {
  min-height: 44px; padding: 0 .7rem; background: transparent; border: 0;
  border-bottom: 2px solid transparent; color: var(--ink-dim);
  font: inherit; font-weight: 600; cursor: pointer;
}
.help-mode:hover { color: var(--ink); }
.help-mode.is-on { color: var(--ink); border-bottom-color: var(--chrome); }
.help-msg.step { color: var(--ink-dim); font-size: .8rem; padding-left: .6rem; }
.help-msg .help-resume { margin-left: .5rem; }
.help-cost { font-size: .75rem; }
.help-thumbs { display: flex; gap: .2rem; margin-top: -.4rem; }
.help-thumb {
  width: 44px; height: 44px; padding: 0; background: transparent; border: 0;
  color: var(--ink-dim); display: inline-flex; align-items: center; justify-content: center;
}
.help-thumb .icon { width: 18px; height: 18px; }
.help-thumb.is-down .icon { transform: scaleY(-1); }
.help-thumb:hover { color: var(--ink); }
.help-thumb.is-on { color: var(--chrome); }

/* The press card: what would be started and what it costs, before anything
   is. A ruled box so it reads as a thing to decide, not as more answer. */
.help-card {
  white-space: normal; border: 1px solid var(--line-strong);
  background: var(--g1); padding: .7rem .8rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.help-card-title { margin: 0; font-weight: 600; }
.help-card-arms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.help-card-arms li { display: flex; justify-content: space-between; gap: 1rem; }
.help-card-note { margin: 0; font-size: .8rem; }
.help-card-actions { display: flex; align-items: center; gap: .9rem; }
.help-card-actions .btn { min-height: 44px; height: auto; }
.help-card-actions .linklike { min-height: 44px; height: auto; }

/* A pressed compare: one tile per model, two across. */
.help-arms { white-space: normal; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.help-arm { margin: 0; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.help-arm img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.help-arm-wait {
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); font-size: .78rem; padding: .4rem; text-align: center;
}
.help-arm-wait.err { color: var(--warn); border-style: solid; }
.help-arm figcaption { display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; }
.help-arm .help-tick { min-height: 44px; height: auto; text-align: left; }
.help-arm-on { color: var(--chrome); }
