/*
 * The "Need help?" guide (js/ofo-guide.js): the topbar button, the question
 * dialog (built on .ofo-dialog / .ofo-dialog-overlay from dialog.css) and the
 * notice on a page opened from the guide (.ofo-notice from special-notice.css).
 * Always loaded (lib/nav.php ofo_css()): the button sits in every topbar of a
 * section with a tree, and the notice can open on any page.
 *
 * @author Sander Tamaela
 * @created 2026-11-21
 * @modified 2026-11-21
 */

/* Topbar button: the Logout button's shape (navigation.css .nav-btn-logout). */
.nav-btn-help {
  background: var(--tb-ffffff, #fff);
  border: 1px solid var(--tl-d1d5db, var(--gray-300));
  color: var(--tc-374151, var(--gray-700));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  line-height: inherit;
}
.nav-btn-help:hover { border-color: var(--tl-9ca3af, var(--gray-400)); }
.nav-btn-help svg { display: block; }
@media (max-width: 767px) {
  .ofo-topbar .nav-btn-help .nav-btn-label { display: none; }
}

/* Dialog: wider than a confirm, the steps scroll inside it. */
.ofo-dialog.ofo-guide { max-width: 580px; max-height: calc(86vh / var(--ofo-zoom, 1)); padding: 18px 22px 16px; }
.ofo-guide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ofo-guide-head .ofo-dialog-title { margin: 0 0 6px; }
/* Same values as the chart-notes bar close (chart-notes.css .ofo-cn-bar-close). */
.ofo-guide-close, .ofo-guide-arrival-close {
  flex: 0 0 auto; border: none; background: none; padding: 3px; cursor: pointer; line-height: 0;
  color: var(--tc-6b7280, #6b7280); border-radius: 4px;
}
.ofo-guide-close:hover, .ofo-guide-arrival-close:hover { color: var(--tc-111827, #111827); }
.ofo-guide-close:focus-visible, .ofo-guide-arrival-close:focus-visible { outline: var(--focus-ring); outline-offset: 1px; }

.ofo-guide-loading { font-size: 13px; color: var(--tc-6b7280, #6b7280); padding: 12px 0; }
.ofo-guide-crumbs { min-height: 4px; }
.ofo-guide-path { display: block; font-size: 12px; color: var(--tc-6b7280, #6b7280); margin-bottom: 4px; }
.ofo-guide-q { margin: 6px 0 10px; font-size: 15px; font-weight: 600; color: var(--tc-111827, #111827); }
.ofo-guide-text { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--tc-374151, #374151); }
.ofo-guide-muted { color: var(--tc-6b7280, #6b7280); font-size: 13px; }
.ofo-guide-error { margin: 6px 0; font-size: 13px; color: var(--tc-b91c1c, #b91c1c); }

/* Choices: full-width rows, the border and radius of a card (cards.css). */
.ofo-guide-choices { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.ofo-guide-choice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 9px 12px; cursor: pointer; font-family: inherit;
  background: var(--tb-ffffff, #fff); border: 1px solid var(--tl-e5e7eb, #e5e7eb); border-radius: 8px;
}
.ofo-guide-choice:hover { border-color: var(--tl-2563eb, #2563eb); background: var(--tb-f9fafb, #f9fafb); }
.ofo-guide-choice:focus-visible { outline: 2px solid var(--blue-500, #2563eb); outline-offset: 1px; }
.ofo-guide-choice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ofo-guide-choice-label { font-size: 14px; font-weight: 600; color: var(--tc-111827, #111827); }
.ofo-guide-choice-hint { font-size: 12px; color: var(--tc-6b7280, #6b7280); }
.ofo-guide-chip { flex: 0 0 auto; }

/* Facts of the client: a page notice with one block per fact. */
.ofo-guide-facts { margin: 0 0 12px; }
.ofo-guide-facts-head { font-weight: 600; margin-bottom: 4px; }
.ofo-guide-fact + .ofo-guide-fact { margin-top: 6px; }
.ofo-guide-fact-label { font-size: 12px; font-weight: 600; text-transform: none; }
.ofo-guide-lock { margin: 0 0 12px; }

/* "Why can't I": one block per reason, the answers it locks as a plain list. */
.ofo-guide-why { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--tc-374151, #374151); }
.ofo-guide-why-group + .ofo-guide-why-group { margin-top: 8px; }
.ofo-guide-why-reason { font-weight: 600; color: var(--tc-111827, #111827); }
.ofo-guide-why-titles { color: var(--tc-4b5563, #4b5563); }

.ofo-guide-send { margin: 0 0 12px; }
.ofo-guide-send-label { display: block; font-size: 13px; font-weight: 600; color: var(--tc-374151, #374151); margin-bottom: 4px; }
.ofo-guide-send .ofo-dialog-input { margin: 0 0 8px; resize: vertical; }

.ofo-guide-nav { margin-top: 8px; flex-wrap: wrap; }

/* Notice on the page opened from the guide, under the page title. */
.ofo-guide-arrival { margin: 0 0 16px; }
.ofo-guide-arrival-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
