/* The feedback modal and page; shared by every page. The colour tokens are in tokens.css, the
   header's Feedback button in header.css. */
.feedback-dialog {
  width: min(32rem, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 16px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border, var(--muted));
  border-radius: 8px;
}
.feedback-dialog::backdrop { background: rgb(0 0 0 / 0.5); }
/* The survey is non-modal: a panel in the corner, the page stays usable. */
.survey-panel { position: fixed; inset: auto 12px 12px auto; margin: 0; width: min(22rem, calc(100vw - 24px)); }
.survey-rating { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.survey-rating legend { padding: 0; margin-bottom: 4px; font-weight: 600; }
.survey-wants { border: 0; padding: 0; margin: 12px 0 0; }
.survey-wants legend { padding: 0; margin-bottom: 4px; font-weight: 600; }
.survey-want { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 2px; }
.survey-want input { margin-top: 3px; }
.survey-star { display: inline-flex; align-items: center; gap: 2px; }
.survey-star label { color: var(--accent); font-size: 1.1rem; cursor: pointer; }
:is(.feedback-dialog, .fb-page) h2 { margin-top: 0; }
:is(.feedback-dialog, .fb-page) .muted { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }
:is(.feedback-dialog, .fb-page) .error { color: var(--error); margin: 4px 0 0; }
:is(.feedback-dialog, .fb-page) .general { padding: 8px 12px; border: 1px solid var(--error); border-radius: 4px; }
:is(.feedback-dialog, .fb-page) fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
:is(.feedback-dialog, .fb-page) fieldset[hidden], :is(.feedback-dialog, .fb-page) [hidden] { display: none; }
/* The mobile page behind the QR code: one column that never scrolls sideways. */
.fb-page { box-sizing: border-box; max-width: calc(36rem + 32px); margin: 0 auto; padding: 16px; overflow-wrap: anywhere; }
.fb-page a { color: var(--accent); }
.fb-page h1 { font-size: 1.4rem; margin: 0 0 4px; }
.fb-stages { margin: 0 0 16px; padding-left: 1.5rem; }
/* An information box: border and panel tokens, and a leading "i" that assistive technology skips. */
.fb-notice { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel); color: var(--fg); }
.fb-notice::before { content: "i" / ""; flex: none; width: 1.25rem; height: 1.25rem; border: 1px solid currentColor; border-radius: 50%; font: italic 700 0.8rem/1.2rem serif; text-align: center; }
.fb-field { margin: 0.75rem 0; display: grid; gap: 2px; }
.fb-field label { font-weight: 600; }
.fb-field input, .fb-field select, .fb-field textarea {
  box-sizing: border-box; width: 100%; padding: 6px 8px; font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--control-border); border-radius: 4px;
}
.fb-field textarea { resize: vertical; }
.fb-field [aria-invalid="true"] { border-color: var(--error); }
.fb-check { display: flex; gap: 8px; align-items: flex-start; margin: 0.75rem 0; }
.fb-check input { margin-top: 0.3rem; }
.fb-count { margin: 0; text-align: right; }
.fb-count.over { color: var(--error); font-weight: 600; }
.fb-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.fb-actions button {
  font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
}
.fb-actions button[type="submit"] { color: var(--on-accent); background: var(--accent); }
.fb-actions button:disabled { opacity: 0.6; cursor: default; }
