/* Beta feedback widget — fixed corner button + modal. Mirrors the tokens and
   modal scaffolding used by .help-overlay / .help-card (tour.css) so it inherits
   every theme automatically. */

/* ── Fixed affordance: stacked just ABOVE the round #fab (bottom:28px, 52px
   tall) on the right edge, so it clears both the FAB and the left sidebar. ── */
.feedback-fab {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 1001;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  font: 600 13px/1 var(--font-body);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: transform var(--speed) ease, box-shadow var(--speed) ease, background var(--speed) ease;
}
.feedback-fab:hover {
  background: var(--gold-soft);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
/* Hidden while the FAB choice popup is open — both sit in the bottom-right
   corner, so the menu would otherwise cover the pill. Toggled by auto-upload.js. */
.feedback-fab.is-hidden { display: none; }

.feedback-fab-label { white-space: nowrap; }

/* Collapse to just the icon on narrow viewports so it never crowds the UI. */
@media (max-width: 640px) {
  .feedback-fab-label { display: none; }
  .feedback-fab { padding: 10px; }
}

/* ── Modal ── */
.feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000020;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tour-pop-in 0.16s ease both;
}

.feedback-card {
  width: 420px;
  max-width: calc(100vw - 24px);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  font-family: var(--font-body);
  padding: 0 0 14px;
  overflow: hidden;
}

.feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}
.feedback-title { font-size: 16px; font-weight: 600; color: var(--text); }
.feedback-close {
  background: none; border: none; font-size: 16px; line-height: 1;
  color: var(--text-dim); cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.feedback-close:hover { color: var(--text); background: var(--bg-warm); }

.feedback-sub {
  margin: 12px 16px 4px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.feedback-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px 4px;
}
.feedback-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  font: 600 13px/1 var(--font-body);
  color: var(--text);
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--speed) ease, border-color var(--speed) ease;
}
.feedback-chip:hover { background: var(--gold-soft); }
.feedback-chip.is-active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--text);
}

.feedback-text {
  display: block;
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  padding: 10px 12px;
  font: 14px/1.45 var(--font-body);
  color: var(--text);
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 10px;
  resize: vertical;
  box-sizing: border-box;
}
.feedback-text:focus { outline: none; border-color: var(--gold); }

.feedback-status {
  margin: 10px 16px 0;
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: 8px;
}
.feedback-status.is-pending { color: var(--text-muted); background: var(--bg-warm); }
.feedback-status.is-ok      { color: var(--green, #2e7d52); background: var(--green-soft, rgba(46,125,82,0.10)); }
.feedback-status.is-error   { color: var(--red, #8a4a40);   background: var(--red-soft, rgba(138,74,64,0.10)); }

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px 0;
}
