/* ============================================================================
   feedback.css — Feedback-Widget (Schritt 4)
   ----------------------------------------------------------------------------
   Schwebender Knopf + Panel für Zentrale & Onboarding. Nur Tokens (theme.css),
   nutzt die geteilten Bausteine .btn / .field__input. z-index unter der
   Foto-Lightbox der Zentrale (50), damit diese den Knopf bei Bedarf überdeckt.
   ============================================================================ */
.fb-root {
  position: fixed;
  right: var(--s-5);
  bottom: var(--s-5);
  z-index: 40;
  font-family: var(--font-ui);
}

.fb-fab {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: var(--c-accent-contrast);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.fb-fab:hover { transform: translateY(-2px); }
.fb-fab:active { transform: translateY(0); }
.fb-root--open .fb-fab { background: var(--c-primary); }

.fb-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: 320px;
  max-width: calc(100vw - 2 * var(--s-5));
  max-height: min(70vh, 480px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--c-surface);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.fb-panel[hidden] { display: none; }

.fb-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.fb-panel__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-xl);
  letter-spacing: var(--tracking-tight);
}
.fb-x {
  border: 0;
  background: transparent;
  color: var(--c-text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 var(--s-1);
}
.fb-x:hover { color: var(--c-text); }

.fb-panel__hint { margin: 0; font-size: var(--fs-sm); color: var(--c-text-muted); }

.fb-textarea {
  resize: vertical;
  min-height: 92px;
  font-family: var(--font-ui);
}

.fb-status { margin: 0; min-height: 1.1em; font-size: var(--fs-sm); color: var(--c-text-muted); }
.fb-status--error { color: var(--c-danger); }
.fb-status--success { color: var(--c-success); }

.fb-actions { display: flex; gap: var(--s-2); }
.fb-mic { flex: 0 0 auto; display: inline-flex; align-items: center; gap: var(--s-2); }
.fb-send { flex: 1 1 auto; }
.fb-mic--rec {
  background: var(--c-danger);
  color: var(--c-primary-contrast);
  border-color: var(--c-danger);
  animation: fb-pulse 1.3s ease-in-out infinite;
}
@keyframes fb-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-danger) 45%, transparent); }
  50%      { box-shadow: 0 0 0 7px color-mix(in srgb, var(--c-danger) 0%, transparent); }
}

.fb-kbd { margin: 0; font-size: var(--fs-xs); color: var(--c-text-muted); }
.fb-kbd kbd {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 1px 5px;
}

@media (max-width: 480px) {
  .fb-root { right: var(--s-4); bottom: var(--s-4); }
  .fb-panel { width: calc(100vw - 2 * var(--s-4)); }
}

@media (prefers-reduced-motion: reduce) {
  .fb-fab, .fb-mic--rec { transition: none; animation: none; }
}
