/* Auffi — Floating Feedback Action Button + Modal.
   Calm Fresh recast. Tokens come from topbar-footer.css (which
   is loaded first on the marketing-subpages) or from the SPA bundle
   on viewer/index.html. */

.feedback-fab {
  position: fixed;
  right: 1.25rem;
  bottom: calc(var(--footer-height, 48px) + 1rem);
  z-index: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5625rem 1rem;
  background: var(--brand-strong, #047857);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill, 999px);
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15,31,26,0.05), 0 2px 8px rgba(16,185,129,0.06));
  transition: transform 150ms ease, background 120ms ease, box-shadow 150ms ease;
}
.feedback-fab:hover {
  background: var(--brand, #10b981);
  color: var(--ink-on-brand, #06231b);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift, 0 4px 12px rgba(15,31,26,0.08), 0 8px 24px rgba(16,185,129,0.10));
}
.feedback-fab:focus-visible {
  outline: 2px solid var(--focus, #10b981);
  outline-offset: 3px;
}
@media (max-width: 480px) {
  .feedback-fab-label { display: none; }
  .feedback-fab { padding: 0.5625rem; }
}

/* Modal overlay + card */
.feedback-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(15, 31, 26, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.feedback-modal {
  background: var(--surface, #ffffff);
  color: var(--ink, #0f1f1a);
  border: 1px solid var(--line, #e3ece8);
  border-radius: var(--radius-card, 16px);
  box-shadow: var(--shadow-lift, 0 4px 12px rgba(15,31,26,0.08), 0 8px 24px rgba(16,185,129,0.10));
  width: 100%;
  max-width: 32rem;
  display: grid;
  gap: 0.875rem;
  padding: 1.25rem 1.5rem 1.5rem;
}
.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--line, #e3ece8);
}
.feedback-modal-header h2 {
  margin: 0;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink, #0f1f1a);
}
.feedback-modal-header h2::before { content: "/ "; color: var(--brand, #10b981); }

.feedback-modal-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.125rem 0.5rem;
  color: var(--muted, #5b6b64);
}
.feedback-modal-close:hover { color: var(--ink, #0f1f1a); }

.feedback-modal-form {
  display: grid;
  gap: 0.625rem;
}
.feedback-modal-label {
  display: grid;
  gap: 0.375rem;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted, #5b6b64);
}
.feedback-modal-label textarea {
  width: 100%;
  font-family: var(--font-sans, -apple-system, sans-serif);
  font-size: 0.9375rem;
  color: var(--ink, #0f1f1a);
  background: var(--paper, #f6faf8);
  border: 1px solid var(--line, #e3ece8);
  border-radius: var(--radius-input, 12px);
  padding: 0.5625rem 0.75rem;
  resize: vertical;
  min-height: 6rem;
  letter-spacing: 0;
  text-transform: none;
}
.feedback-modal-label textarea:focus {
  outline: 2px solid var(--focus, #10b981);
  outline-offset: 0;
  border-color: var(--brand, #10b981);
}
.feedback-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.375rem;
}
.feedback-modal-btn {
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-pill, 999px);
  cursor: pointer;
  border: 1px solid var(--line, #e3ece8);
  background: transparent;
  color: var(--ink, #0f1f1a);
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.feedback-modal-btn:hover {
  background: color-mix(in srgb, var(--brand, #10b981) 10%, transparent);
  border-color: var(--brand, #10b981);
  color: var(--brand-strong, #047857);
}
.feedback-modal-btn-primary {
  background: var(--brand-strong, #047857);
  border-color: var(--brand-strong, #047857);
  color: #fff;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15,31,26,0.05));
}
.feedback-modal-btn-primary:hover {
  background: var(--brand, #10b981);
  border-color: var(--brand, #10b981);
  color: var(--ink-on-brand, #06231b);
  box-shadow: var(--shadow-lift, 0 4px 12px rgba(15,31,26,0.08));
}
.feedback-modal-btn:disabled { opacity: 0.45; cursor: not-allowed; }
@media (prefers-color-scheme: dark) {
  .feedback-fab { color: var(--ink-on-brand, #06231b); }
  .feedback-modal-btn-primary { color: var(--ink-on-brand, #06231b); }
}

.feedback-modal-status {
  margin: 0;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  min-height: 1.2em;
  color: var(--muted, #5b6b64);
}
.feedback-modal-status.err { color: var(--error, #b91c1c); }
.feedback-modal-status.info { color: var(--muted, #5b6b64); }

/* Toast after successful send */
.feedback-toast {
  position: fixed;
  right: 1.25rem;
  bottom: calc(var(--footer-height, 48px) + 4.5rem);
  z-index: 800;
  background: var(--ink, #0f1f1a);
  color: var(--paper, #f6faf8);
  padding: 0.5625rem 1rem;
  border: none;
  border-radius: var(--radius-pill, 999px);
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: var(--shadow-lift, 0 4px 12px rgba(15,31,26,0.08));
  animation: feedback-toast-in 200ms ease-out;
}
@keyframes feedback-toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
