/* The Help menu (helpMenu.js), Getting started (gettingStarted.js), Send
   feedback (feedbackDialog.js), Request a model (modelRequestUI.js) and the
   Platform tab's Model requests and Feedback pages (platformModelRequests.js,
   platformFeedback.js). */

.help-menu { min-width: 250px; }
.help-menu button[hidden] { display: none; }
.help-menu .help-menu-request { border-top: 1px solid var(--border); }
/* The Terms and the Privacy Policy, on riserdraft.com in a new tab. */
.help-menu a { display: block; padding: 6px 12px; color: var(--text); text-decoration: none; font-size: 13px; }
.help-menu a:hover { background: var(--accent-dim); }
.help-menu .help-menu-legal { border-top: 1px solid var(--border); }

/* A link-looking button: under a search that found nothing, and at the
   foot of the Symbols panel. */
.request-model-link,
.palette-request-model {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: left;
}
.request-model-link:hover,
.palette-request-model:hover { background: none; color: var(--accent-hover); }
.symbol-list > .request-model-link { grid-column: 1 / -1; justify-self: start; margin: 0 0 8px; }
/* Always in view at the foot of the panel, over the list as it scrolls. */
.palette-request-model {
  position: sticky;
  bottom: -10px;
  display: block;
  width: calc(100% + 20px);
  margin: 10px -10px -10px;
  padding: 8px 10px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  text-decoration: none;
  font-size: 11.5px;
}
.palette-request-model:hover { background: var(--panel); text-decoration: underline; }
/* Not twice: a search that found nothing has its own, just above. */
#palette:has(.symbol-list > .request-model-link) .palette-request-model { display: none; }

/* Getting started */
.help-guide-overlay .unit-picker-box { width: min(760px, calc(100vw - 32px)); display: flex; flex-direction: column; }
.help-guide-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.help-guide-jump { font-size: 11.5px; padding: 3px 8px; }
.help-guide-body { overflow-y: auto; max-height: min(60vh, 560px); padding-right: 4px; border-top: 1px solid var(--border); }
.help-guide-section h3 { font-size: 13.5px; margin: 14px 0 6px; outline: none; }
.help-guide-steps { margin: 0; padding-left: 20px; font-size: 12.5px; line-height: 1.5; color: var(--text); }
.help-guide-steps li + li { margin-top: 4px; }
.help-guide-download { margin: 8px 0 0 20px; font-size: 12px; }
.help-guide-keys { border-collapse: collapse; font-size: 12.5px; }
.help-guide-keys th { text-align: left; font-weight: normal; padding: 3px 14px 3px 0; white-space: nowrap; vertical-align: top; }
.help-guide-keys td { padding: 3px 0; color: var(--text-dim); }
.help-guide-keys kbd {
  font-family: inherit;
  font-size: 11.5px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

/* Send feedback */
.feedback-kinds { display: flex; gap: 0; border: none; margin: 0 0 8px; padding: 0; }
.feedback-kinds-legend { font-size: 12px; color: var(--text-dim); padding: 0; margin-bottom: 4px; }
.feedback-kind { position: relative; }
.feedback-kind input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.feedback-kind span {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  background: var(--panel-alt);
}
.feedback-kind:first-of-type span { border-radius: var(--radius) 0 0 var(--radius); }
.feedback-kind:last-of-type span { border-radius: 0 var(--radius) var(--radius) 0; }
.feedback-kind + .feedback-kind span { border-left: none; }
.feedback-kind input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.feedback-kind input:focus-visible + span { outline: 2px solid var(--accent-hover); outline-offset: 1px; }
/* The dialogs' text boxes, as the Account page's dialogs draw theirs. */
.form-dialog .feedback-message,
.form-dialog .model-request-field input,
.form-dialog .model-request-field textarea,
.form-dialog .model-request-field select {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  margin: 0;
}
.feedback-message { resize: vertical; min-height: 110px; }
.model-request-field textarea { resize: vertical; }
.feedback-include-design { display: block; margin: 8px 0 0; font-size: 12px; color: var(--text-dim); }
.feedback-sent-with { margin: 10px 0 4px; font-size: 12px; color: var(--text-dim); }
.feedback-sent-with summary { cursor: pointer; }
.feedback-details { margin: 6px 0 0; padding-left: 18px; }
.feedback-details-key { color: var(--text); }

/* Request a model */
.model-request-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.model-request-form .model-request-field:nth-child(n + 3) { grid-column: 1 / -1; }
.model-request-field { display: flex; flex-direction: column; gap: 3px; }
.model-requests-box:not(:empty) { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.model-requests-head { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.model-requests-mine { list-style: none; margin: 0; padding: 0; font-size: 12px; max-height: 180px; overflow-y: auto; }
.model-requests-mine li { padding: 4px 0; border-bottom: 1px solid var(--border); }
.model-request-status {
  display: inline-block;
  min-width: 72px;
  margin-right: 8px;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  text-align: center;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.model-request-status.status-new { color: var(--accent); border-color: var(--accent-dim); }
.model-request-status.status-in_progress { color: var(--warn-fg); border-color: var(--warn-border); }
.model-request-status.status-added { color: var(--ok-fg); border-color: var(--ok-border); }
.model-request-status.status-cant_add { color: var(--disc-fg); border-color: var(--disc-border); }
.model-request-name { font-weight: 600; }
.model-request-note { margin: 2px 0 0; white-space: pre-wrap; font-size: 11.5px; }
.model-request-confirm { font-size: 13px; line-height: 1.5; margin: 0; }

/* Platform → Model requests */
.model-requests-table td { vertical-align: top; }
.model-request-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.model-request-actions button { font-size: 11.5px; padding: 3px 8px; }

/* Platform → Feedback: its status pills in the model requests' colours, its
   kind, and the message as it was written, line breaks and all. */
.feedback-table td { vertical-align: top; }
.feedback-table td:first-child { max-width: 520px; }
.feedback-head { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.feedback-kind-pill,
.feedback-status {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  text-align: center;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.feedback-status { min-width: 64px; margin-right: 8px; }
.feedback-kind-pill.kind-problem { color: var(--warn-fg); border-color: var(--warn-border); }
.feedback-kind-pill.kind-idea { color: var(--accent); border-color: var(--accent-dim); }
.feedback-status.status-new { color: var(--accent); border-color: var(--accent-dim); }
.feedback-status.status-planned { color: var(--warn-fg); border-color: var(--warn-border); }
.feedback-status.status-done { color: var(--ok-fg); border-color: var(--ok-border); }
.feedback-status.status-wont_do { color: var(--disc-fg); border-color: var(--disc-border); }
.feedback-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; line-height: 1.45; }
.feedback-dialog-text {
  max-height: 160px;
  overflow-y: auto;
  margin: 0 0 10px;
  padding: 8px 10px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.feedback-note { white-space: pre-wrap; margin-top: 2px; }
.feedback-table .feedback-sent-with { margin: 6px 0 0; }
.feedback-not-emailed {
  display: inline-block;
  margin-top: 3px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--warn-fg);
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  cursor: help;
}
.form-dialog .feedback-field + .feedback-field,
.form-dialog .feedback-tell { margin-top: 8px; }
.feedback-tell-tick { display: block; font-size: 12.5px; }
.feedback-tell-box { margin-top: 6px; }
.feedback-tell-box[hidden] { display: none; }
.form-dialog .feedback-tell-box textarea,
.form-dialog .feedback-copy-box {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  resize: vertical;
}

/* In the ☰ menu on a phone, which scrolls (and so clips what hangs out of
   it), the Help menu opens in place, under its button. */
@media (max-width: 700px) {
  .topbar-secondary .help-menu { position: static; margin-top: 6px; }
  .topbar-secondary .help-menu button, .topbar-secondary .help-menu a { padding: 10px 12px; }
  /* Big enough to tap. */
  .help-guide-jump, .help-guide-download, .model-request-actions button { min-height: 40px; padding: 8px 12px; font-size: 13px; }
  .feedback-table td:first-child { max-width: none; }
}
.help-guide-phone { margin: 0 0 8px; padding: 8px 10px; font-size: 12.5px; color: var(--warn-fg); background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 6px; }
