/* ============================================
   HELPER.CSS — NuvixAI guided help (desktop window and phone page)
   Everything is scoped under .nxh. No animation is used, so there is
   nothing to reduce for prefers-reduced-motion.
   ============================================ */

.nxh {
  --nxh-ink: #1A1A1A;
  --nxh-muted: #555;
  --nxh-line: #d5d6d0;
  --nxh-paper: #F5F5F0;
  --nxh-teal: #12675f;
  --nxh-teal-bg: #e6f6f4;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--nxh-ink);
  background: var(--nxh-paper);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.nxh--desktop { height: 100%; }

.nxh *, .nxh *::before, .nxh *::after { box-sizing: border-box; }
.nxh p { margin: 0 0 8px; }
.nxh p:last-child { margin-bottom: 0; }

/* Top bar: what this is, and the two ways out */
.nxh__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: linear-gradient(180deg, #fbfbf8 0%, #e9eae5 100%);
  border-bottom: 1px solid var(--nxh-line);
  flex-shrink: 0;
}
.nxh__note { flex: 1 1 200px; font-size: 12px; color: var(--nxh-muted); margin: 0; }
.nxh__top { display: flex; gap: 6px; }
.nxh__topbtn,
.nxh__chip,
.nxh__action,
.nxh__send,
.nxh__edit {
  font: inherit;
  font-size: 13px;
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid #b9bbb5;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffffff 0%, #e4e5e0 100%);
  color: var(--nxh-ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1.25;
  text-align: left;
}
.nxh__topbtn--go,
.nxh__chip--go,
.nxh__send {
  background: linear-gradient(180deg, #1c7d89 0%, #234650 100%);
  border-color: #1d4a52;
  color: #fff;
}
.nxh__topbtn:hover, .nxh__chip:hover, .nxh__action:hover, .nxh__edit:hover { background: linear-gradient(180deg, #ffffff 0%, #c9f5f1 100%); }
.nxh__topbtn--go:hover, .nxh__chip--go:hover, .nxh__send:hover { background: linear-gradient(180deg, #2390a0 0%, #28535e 100%); }
.nxh button:focus-visible,
.nxh a:focus-visible,
.nxh input:focus-visible,
.nxh textarea:focus-visible,
.nxh__log:focus-visible {
  outline: 2px solid #176e79;
  outline-offset: 2px;
}
.nxh__chip[aria-pressed="true"] { border-color: #176e79; box-shadow: inset 0 0 0 1px #176e79; font-weight: 600; }

/* Conversation log */
.nxh__log {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nxh--desktop .nxh__log { flex: 1 1 auto; overflow-y: auto; min-height: 120px; }
.nxh__msg { max-width: 92%; }
.nxh__msg--user { align-self: flex-end; }
.nxh__msg--bot { align-self: flex-start; }
.nxh__who {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--nxh-muted);
  margin-bottom: 2px;
}
.nxh__msg--user .nxh__who { text-align: right; }
.nxh__text {
  background: var(--nxh-teal-bg);
  border: 1px solid #b7e2dd;
  border-radius: 10px 10px 2px 10px;
  padding: 8px 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.nxh__card {
  background: #fff;
  border: 1px solid var(--nxh-line);
  border-radius: 10px 10px 10px 2px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.nxh__title { font-weight: 600; }
.nxh__sub { font-size: 12px; color: var(--nxh-muted); margin-top: 8px !important; }
.nxh__steps { margin: 6px 0 8px; padding-left: 20px; }
.nxh__steps li { margin-bottom: 4px; }
.nxh__links { list-style: none; margin: 4px 0 0; padding: 0; }
.nxh__links li { margin: 2px 0; }
.nxh__link { color: var(--nxh-teal); text-decoration: underline; display: inline-block; padding: 3px 0; }
.nxh__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* Brief review */
.nxh__review { margin: 8px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 10px; }
.nxh__review dt { font-weight: 600; font-size: 13px; }
.nxh__review dd { margin: 0; display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.nxh__review dd span { overflow-wrap: anywhere; }
.nxh__edit { min-height: 28px; padding: 2px 8px; font-size: 12px; flex-shrink: 0; }

/* Notices, chips and input */
.nxh__notice:empty { display: none; }
.nxh__noticebox {
  margin: 0 12px 8px;
  padding: 10px 12px;
  border: 1px solid #e0c78a;
  background: #fff8e6;
  border-radius: 4px;
}
.nxh__copybox { width: 100%; margin-top: 6px; font: 13px/1.4 'Space Mono', monospace; }
.nxh__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 10px;
  flex-shrink: 0;
}
.nxh__form {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--nxh-line);
  background: #fff;
  flex-shrink: 0;
}
.nxh__label { display: block; font-size: 12px; font-weight: 600; color: var(--nxh-muted); margin-bottom: 4px; }
.nxh__row { display: flex; gap: 6px; }
.nxh__input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  padding: 7px 9px;
  border: 1px solid #a9aba5;
  border-radius: 3px;
  background: #fff;
  color: var(--nxh-ink);
}
.nxh__input::placeholder { color: var(--nxh-muted); }
.nxh__input:disabled { background: #eeeee9; }
.nxh__count { display: block; font-size: 11px; color: var(--nxh-muted); margin-top: 3px; min-height: 1em; }

/* Phone: part of the scrolling page, larger targets, 16px text in the field
   so iOS does not zoom. */
.nxh--phone {
  border: 1px solid #56626b;
  border-radius: 8px;
  overflow: hidden;
}
.nxh--phone .nxh__log { padding: 10px; }
.nxh--phone .nxh__chips { padding: 0 10px 12px; }
.nxh--phone .nxh__noticebox { margin: 0 10px 10px; }
.nxh--phone .nxh__input { font-size: 16px; }
.nxh--phone .nxh__topbtn,
.nxh--phone .nxh__chip,
.nxh--phone .nxh__action,
.nxh--phone .nxh__send { min-height: 44px; font-size: 14px; }
.nxh--phone .nxh__edit { min-height: 44px; }
.nxh--phone .nxh__msg { max-width: 100%; }
@media (pointer: coarse) {
  .nxh__topbtn, .nxh__chip, .nxh__action, .nxh__send, .nxh__edit { min-height: 44px; }
}
.nxh__form[hidden] { display: none; }
