/* help.css - the RFP Helper chat content: message bubbles, thinking indicator,
   composer, report-issue link. The docked panel FRAME (FAB, card, header,
   footer chrome) lives in helper.css; this file is shared, class-level
   styling that doesn't care whether it's sitting in that docked card. */

/* ---------- conversation ---------- */
.help-log { display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }

.help-bubble {
  max-width: 88%; padding: 10px 13px; border-radius: var(--r-md);
  font-size: 13.5px; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere;
}
.help-bubble p { margin: 0; }
.help-bubble p + p { margin-top: 8px; }
.help-bubble .help-gap { height: 6px; }
.help-ul { margin: 4px 0 0; padding-left: 18px; }
.help-ul li { margin: 2px 0; }
.help-ul + p { margin-top: 8px; }

.help-assistant {
  align-self: flex-start; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-bottom-left-radius: var(--r-xs);
}
.help-user {
  align-self: flex-end; background: var(--navy); color: var(--on-navy);
  border-bottom-right-radius: var(--r-xs);
}

/* Thinking indicator: three dots at once, a clock only after 3s (set in JS). */
.help-thinking { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); }
.help-thinking-txt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.help-thinking-txt .ic { width: 15px; height: 15px; }
.help-dots { display: inline-flex; gap: 4px; }
.help-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: help-blink 1.2s var(--ease) infinite; }
.help-dots i:nth-child(2) { animation-delay: .18s; }
.help-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes help-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

/* ---------- composer ---------- */
.help-composer { display: flex; align-items: flex-end; gap: 8px; }
.help-composer textarea {
  flex: 1; min-height: 44px; max-height: 160px; resize: none; line-height: 1.5;
  padding: 11px 12px;
}
.help-send { flex: none; height: 44px; width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.help-send .ic { width: 18px; height: 18px; }

.help-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; min-height: 16px; }
.help-hint { font-size: 11.5px; color: var(--muted); }
.help-count { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.help-count.at-cap { color: var(--primary-text); font-weight: 700; }

.help-report {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 12.5px; color: var(--muted); font-weight: 600;
}
.help-report .ic { width: 14px; height: 14px; }
.help-report:hover { color: var(--primary-text); }

/* Slightly wider reading area, still a docked helper in both themes. */
#helper-panel { width: 440px; height: min(680px, calc(100dvh - 112px)); max-height: calc(100dvh - 112px); }
#helper-panel .help-log { min-height: 90px; scroll-behavior: auto; }
.help-bubble { flex-shrink: 0; }
.help-composer textarea { min-width: 0; }
.help-composer textarea::placeholder { color: var(--muted); opacity: 1; }
.help-new { margin-left: auto; border: 0; background: var(--on-navy-fill); color: var(--on-navy); border-radius: var(--r-xs); padding: 7px 9px; white-space: nowrap; cursor: pointer; }
.help-attach { flex: none; width: 36px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: var(--r-sm); cursor: pointer; }
.help-attach .ic { width: 19px; height: 19px; }
.help-copy { display: block; margin-top: 8px; padding: 3px 0; border: 0; background: transparent; color: var(--muted); font-size: 11.5px; cursor: pointer; }
.help-starters { display: flex; flex-direction: column; gap: 7px; padding-bottom: 8px; }
.help-starters button { text-align: left; border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink-2); background: var(--surface); padding: 9px 12px; cursor: pointer; }
.help-file-hint { font-size: 11px; line-height: 1.4; color: var(--muted); margin: 8px 0; }
.help-footer-links { display: flex; gap: 10px; justify-content: space-between; align-items: center; font-size: 10.5px; color: var(--muted); }
.help-footer-links .help-report { margin: 0; white-space: nowrap; font-size: 11.5px; }
.help-files { display: flex; flex-direction: column; gap: 4px; max-height: 120px; overflow-y: auto; }
.help-files:not(:empty) { margin-bottom: 8px; }
.help-file-chip { display: flex; align-items: center; gap: 5px; background: var(--brand-tint); border: 1px solid var(--line); border-radius: var(--r-xs); color: var(--ink-2); padding: 3px 5px 3px 9px; font-size: 11.5px; }
.help-file-chip span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.help-file-chip button { border: 0; background: transparent; color: var(--muted); width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer; }
.help-file-chip .ic { width: 14px; height: 14px; }
.help-error { font-size: 12px; color: var(--danger-text); background: var(--danger-bg); border-radius: var(--r-xs); padding: 8px; margin: 0 0 8px; }
#helper-panel.help-drop { outline: 3px solid var(--info); outline-offset: -3px; }
#helper-panel button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 480px) {
  #helper-panel { width: auto; height: calc(100dvh - 108px); max-height: calc(100dvh - 108px); }
  .help-footer-links { flex-wrap: wrap; gap: 3px; }
}
