/* The feedback card under a result. Quiet on purpose: it sits below the report, not over it. */

/* A quiet card in the corner: it never pushes the page around and can be closed. */
.feedback {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 18px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(14, 16, 15, 0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  animation: fb-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) 1.2s backwards;
}
@keyframes fb-in { from { opacity: 0; transform: translateY(14px); } }
.fb-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
}
.fb-close::before, .fb-close::after { content: ""; position: absolute; left: 8px; top: 13px; width: 12px; height: 1.5px; background: currentColor; transform: rotate(45deg); }
.fb-close::after { transform: rotate(-45deg); }
.fb-close:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.fb-close:focus-visible { outline: 1px solid var(--sage); outline-offset: 1px; }

.feedback[hidden], .fb-step[hidden], .fb-next[hidden], .fb-error[hidden] { display: none; }
.fb-next { margin: 0 0 14px; border-top: 1px solid var(--line); }
.fb-next summary { display: flex; align-items: center; margin: 0; padding: 10px 0; font: 400 13.5px var(--sans); color: var(--ink-2); cursor: pointer; list-style: none; }
.fb-next summary::-webkit-details-marker { display: none; }
.fb-next summary::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(45deg); transition: transform 0.15s; }
.fb-next[open] summary::after { transform: rotate(-135deg); }
.fb-next .fb-chips { margin: 0 0 6px; }
.fb-title { margin: 0 28px 4px 0; font: 500 16px/1.3 var(--sans); letter-spacing: -0.01em; }
.fb-sub { margin: 0 0 16px; color: var(--ink-3); font-size: 13.5px; }
.fb-ratings { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--glass);
  color: var(--ink);
  font: 500 14px var(--sans);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.fb-rating:hover { background: var(--glass-2); border-color: rgba(255, 255, 255, 0.28); }
.fb-rating[aria-pressed="true"] { background: var(--ink); color: #0b0d0c; border-color: var(--ink); }
.fb-face { font-size: 20px; line-height: 1; }

.fb-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.fb-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 400 13.5px var(--sans);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.fb-chip:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.28); }
.fb-chip[aria-pressed="true"] { background: rgba(169, 216, 189, 0.14); color: var(--ink); border-color: rgba(169, 216, 189, 0.6); }
.fb-label { display: block; margin: 4px 0 6px; font: 500 13.5px var(--sans); }
.feedback textarea, .feedback input[type="email"] {
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink);
  font: 400 14px/1.5 var(--sans);
  resize: vertical;
}
.feedback input[type="email"] { border-radius: 999px; font-family: var(--mono); font-size: 13px; }
.feedback ::placeholder { color: var(--ink-3); }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-privacy { margin: 0 0 14px; color: var(--ink-3); font-size: 12.5px; }
.fb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.fb-error { margin: 0; color: var(--missing); font-size: 13.5px; }
.fb-done .fb-title { margin: 0; color: var(--ok); }
@media (max-width: 560px) { .feedback { right: 12px; bottom: 12px; padding: 16px; } .fb-rating { flex: 1 1 30%; justify-content: center; padding: 0 10px; } }
@media (prefers-reduced-motion: reduce) { .fb-rating, .fb-chip { transition: none; } .feedback { animation: none; } }

.fb-pane[hidden] { display: none; }
.fb-pane .fb-title { display: block; margin: 0 28px 12px 0; }
.fb-pane .fb-chips { margin: 0 0 18px; }
.fb-pane textarea { margin-bottom: 12px; }
.fb-actions { justify-content: space-between; flex-wrap: nowrap; }
.fb-actions .button { min-height: 40px; }
.fb-dots { display: inline-flex; gap: 6px; margin: 0 auto; }
.fb-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: background 0.2s; }
.fb-dots i.on { background: var(--sage); }
.fb-error { margin: 0 0 10px; }
.fb-ratings { flex-wrap: nowrap; gap: 8px; }
.fb-rating { flex: 1 1 0; justify-content: center; gap: 8px; padding: 0 8px; white-space: nowrap; }
.fb-actions [hidden] { display: none !important; }
.fb-back:empty { display: none; }

/* Settled at the end of the report: the same card, laid out in the page. */
.feedback.inline {
  position: static;
  width: auto;
  max-height: none;
  margin: 18px 0 0;
  padding: 22px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  animation: none;
}
.feedback.inline .fb-close { display: none; }
.feedback.inline .fb-ratings { flex-wrap: wrap; }
.feedback.inline .fb-rating { flex: 0 0 auto; padding: 0 18px 0 12px; }
.feedback.inline .fb-pane .fb-title, .feedback.inline .fb-title { margin-right: 0; }
.feedback.inline .fb-form { max-width: 520px; }
