/* "Report a bug": corner button and dialog (assets/bug-report.js). */
.bug-report-button {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: auto;
  min-height: 22px;
  padding: 5px 8px 5px 6.5px;
  border: 1px solid var(--pp-line, #ffffff26);
  border-radius: 999px;
  background: #141417f0;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 5px 14px #0008;
  color: var(--pp-text, #f2f2f4);
  font: 600 7px/1 Manrope, system-ui, sans-serif;
  cursor: pointer;
  transition: border-color .16s, background .16s, bottom .28s;
}
.bug-report-button:hover { border-color: #fb7185; background: #1b1b20f5; }
.bug-report-button:focus-visible { outline: 1px solid #8abaff; outline-offset: 2px; }
.bug-report-button svg { width: 9px; height: 9px; fill: none; stroke: #fb7185; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Clear of the analysis progress bar at the bottom of the page. */
body:has(.analysis-session:not([hidden])) .bug-report-button { bottom: 94px; }

.bug-report-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--pp-line, #ffffff26);
  border-radius: 12px;
  background: #141417;
  color: var(--pp-text, #f2f2f4);
  box-shadow: 0 24px 60px #000c;
}
.bug-report-dialog::backdrop { background: #000a; }
.bug-report-form,.bug-report-done { display: grid; gap: 10px; padding: 20px 22px 22px; }
.bug-report-form[hidden],.bug-report-done[hidden] { display: none; }
.bug-report-form header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bug-report-dialog h2 { margin: 0; font: 600 20px/1.3 Outfit, system-ui, sans-serif; }
.bug-report-lead,.bug-report-account,.bug-report-done p { margin: 0; color: var(--pp-muted, #a1a1aa); font-size: 14px; line-height: 1.5; }
.bug-report-form label { margin-top: 6px; font-size: 14px; font-weight: 600; }
.bug-report-form label span { color: var(--pp-muted, #a1a1aa); font-weight: 400; }
.bug-report-form label[hidden],.bug-report-form input[hidden] { display: none; }
.bug-report-form textarea,.bug-report-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--pp-line, #ffffff26);
  border-radius: 8px;
  background: #0c0c0e;
  color: inherit;
  font: 400 15px/1.45 Manrope, system-ui, sans-serif;
  resize: vertical;
}
.bug-report-form textarea:focus,.bug-report-form input:focus { outline: 2px solid #8abaff; outline-offset: 1px; }
.bug-report-error { margin: 0; color: #fb7185; font-size: 14px; }
.bug-report-form footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.bug-report-close,.bug-report-cancel,.bug-report-send {
  height: auto;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font: 600 14px/1 Manrope, system-ui, sans-serif;
  cursor: pointer;
}
.bug-report-close { min-width: 44px; padding: 0; border: 0; background: none; color: var(--pp-muted, #a1a1aa); font-size: 24px; }
.bug-report-cancel { border: 1px solid var(--pp-line, #ffffff26); background: none; color: var(--pp-text, #f2f2f4); }
.bug-report-send { border: 0; background: #62e6b1; color: #06110d; }
.bug-report-send:disabled { opacity: .6; cursor: default; }
.bug-report-done .bug-report-send { justify-self: end; }

@media (max-width: 640px) {
  .bug-report-button { right: 6px; bottom: 6px; padding: 5px 7px 5px 6px; }
  body:has(.analysis-session:not([hidden])) .bug-report-button { bottom: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .bug-report-button { transition: none; }
}
