/* Feedback button and modal.
   Built on the design-system primitives (.ds-btn, .ds-input, .ds-field) so it
   matches the redesigned pages rather than introducing a second visual
   language for one dialog. */

.fb-fab {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  background: var(--surface-raised);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgb(0 0 0 / .35);
  cursor: pointer;
}
.fb-fab:hover { border-color: var(--brand); color: var(--brand); }
.fb-fab:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
/* The <noscript> fallback is a link, so it needs the anchor colour asserted —
   `[data-theme="dark"] a` would otherwise win over .fb-fab. */
[data-theme="dark"] a.fb-fab--static { color: var(--text-primary); text-decoration: none; }

.fb-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: rgb(0 0 0 / .62);
  backdrop-filter: blur(2px);
}
.fb-overlay[hidden] { display: none; }
body.fb-locked { overflow: hidden; }

.fb-panel {
  width: min(520px, 100%);
  max-height: calc(100vh - var(--space-10));
  overflow-y: auto;
  padding: var(--space-6);
  background: var(--surface-raised);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgb(0 0 0 / .5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.fb-panel__head { display: flex; align-items: center; gap: var(--space-3); }
.fb-panel__head h2 { margin: 0; font-size: var(--text-lg); }
.fb-close {
  margin-left: auto;
  display: inline-flex;
  padding: var(--space-2);
  color: var(--text-tertiary);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.fb-close:hover { color: var(--text-primary); }

#fb-form { display: flex; flex-direction: column; gap: var(--space-4); }
.fb-textarea { min-height: 120px; resize: vertical; font-family: inherit; line-height: var(--leading-sm); }

/* Off-screen rather than display:none — some bots skip anything hidden. */
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.fb-note { margin: 0; font-size: var(--text-xs); color: var(--text-tertiary); }
.fb-actions { display: flex; align-items: center; gap: var(--space-3); }
.fb-error { margin-right: auto; font-size: var(--text-xs); color: var(--danger); }

.fb-done { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.fb-done p { margin: 0; color: var(--text-secondary); font-size: var(--text-sm); }

@media (max-width: 560px) {
  .fb-fab { right: var(--space-4); bottom: var(--space-4); }
  .fb-fab span { display: none; }
  .fb-fab { padding: var(--space-3); }
}
@media (prefers-reduced-motion: reduce) {
  .fb-overlay { backdrop-filter: none; }
}
