/* SCP Cockpit · Feedback & Fragen — eigenständig, nutzt nur die vorhandenen Design-Tokens */

.fb-panel, .fb-panel *, .fb-launch { box-sizing: border-box; }

.fb-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: inline-flex; align-items: center; gap: 0;
  height: 40px; padding: 0 11px;
  background: var(--bg-card); color: var(--accent-deep);
  border: 1px solid var(--line-strong); border-radius: 999px;
  box-shadow: var(--shadow-md);
  font: 500 13px/1 var(--font-display); letter-spacing: -0.005em;
  cursor: pointer;
  transition: box-shadow 160ms, border-color 160ms, gap 200ms;
}
.fb-launch svg { width: 17px; height: 17px; flex: none; }
.fb-launch .fb-launch-label {
  max-width: 0; overflow: hidden; white-space: nowrap; color: var(--fg-2);
  transition: max-width 220ms cubic-bezier(.4,0,.2,1);
}
.fb-launch:hover, .fb-launch:focus-visible, .fb-launch[aria-expanded="true"] {
  gap: 8px; border-color: var(--accent); box-shadow: var(--shadow-lg);
}
.fb-launch:hover .fb-launch-label,
.fb-launch:focus-visible .fb-launch-label,
.fb-launch[aria-expanded="true"] .fb-launch-label { max-width: 160px; }
.fb-launch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.fb-panel {
  position: fixed; right: 20px; bottom: 72px; z-index: 90;
  width: 372px; max-height: calc(100vh - 110px);
  display: flex; flex-direction: column;
  background: var(--bg-card); color: var(--fg);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg);
  transform-origin: bottom right;
  animation: fb-in 200ms cubic-bezier(.2,.8,.2,1);
}
.fb-panel[hidden] { display: none; }
@keyframes fb-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

.fb-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); position: relative; }
.fb-title { font: 600 16px/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--fg); }
.fb-sub { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--fg-3); padding-right: 24px; }
.fb-close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  display: grid; place-items: center; border: 0; background: none; color: var(--fg-3);
  border-radius: 8px; cursor: pointer;
}
.fb-close:hover { background: var(--bg-hover); color: var(--fg); }
.fb-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.fb-close svg { width: 16px; height: 16px; }

.fb-body { padding: 14px 20px 18px; overflow-y: auto; }

/* Themen */
.fb-topics { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.fb-topic {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 8px; border: 0; background: none; text-align: left;
  border-radius: 10px; cursor: pointer; color: var(--fg);
  font: inherit;
}
.fb-topic:hover { background: var(--bg-hover); }
.fb-topic:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fb-topic-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fb-topic-label { font: 500 13.5px/1.35 var(--font-display); color: var(--fg); }
.fb-topic-to { font-size: 12px; color: var(--fg-3); }
.fb-topic-chev { margin-left: auto; color: var(--fg-4); width: 14px; height: 14px; flex: none; }

.fb-avatar {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 11px/1 var(--font-display); letter-spacing: -0.02em; color: #fff;
}
.fb-avatar.kvd { background: var(--ish-navy); }
.fb-avatar.nh  { background: var(--ish-akademie); }
.fb-avatar.kd  { background: var(--accent-deep); }
[data-theme="dark"] .fb-avatar.kvd { background: #2c5b6d; }

/* Schreiben */
.fb-back {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 2px; margin: -4px 0 10px -2px;
  border: 0; background: none; color: var(--fg-3); font: 500 12.5px/1 var(--font-body);
  border-radius: 6px; cursor: pointer;
}
.fb-back:hover { color: var(--fg); }
.fb-back:focus-visible { outline: 2px solid var(--accent); }
.fb-back svg { width: 13px; height: 13px; }

.fb-to { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fb-to-text { font-size: 12.5px; color: var(--fg-3); line-height: 1.4; }
.fb-to-text strong { display: block; font: 500 13.5px/1.35 var(--font-display); color: var(--fg); }

.fb-textarea {
  width: 100%; min-height: 128px; resize: vertical;
  padding: 11px 13px; font: 14px/1.5 var(--font-body); color: var(--fg);
  background: var(--bg-card); border: 1px solid var(--line-strong); border-radius: 10px;
  transition: border-color 120ms, box-shadow 120ms;
}
.fb-textarea::placeholder { color: var(--fg-4); }
.fb-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.fb-count { text-align: right; font-size: 11px; color: var(--fg-4); margin-top: 4px; font-variant-numeric: tabular-nums; }
.fb-count.over { color: var(--danger); }

.fb-consent {
  display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start;
  margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--bg-2);
  cursor: pointer;
}
.fb-consent input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent-deep); cursor: pointer; }
.fb-consent-main { font-size: 13px; line-height: 1.45; color: var(--fg); font-weight: 500; }
.fb-consent-hint { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; color: var(--fg-3); font-weight: 400; }

.fb-note { margin-top: 12px; font-size: 12px; line-height: 1.55; color: var(--fg-3); }
.fb-note a, .fb-consent a, .fb-legal a { color: var(--accent-deep); text-underline-offset: 2px; }

.fb-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.fb-send {
  height: 38px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--ish-navy);
  background: var(--ish-navy); color: #fff; font: 500 13.5px/1 var(--font-display); cursor: pointer;
  transition: opacity 120ms;
}
[data-theme="dark"] .fb-send { background: var(--ish-teal); border-color: var(--ish-teal); color: #00242f; }
.fb-send:disabled { opacity: .45; cursor: not-allowed; }
.fb-send:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.fb-error { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--danger); }

/* Gesendet */
.fb-done { padding: 12px 0 4px; }
.fb-done-mark {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--success-bg); color: var(--success); margin-bottom: 12px;
}
.fb-done-mark svg { width: 20px; height: 20px; }
.fb-done-title { font: 600 16px/1.3 var(--font-display); }
.fb-done-text { margin-top: 4px; font-size: 13px; line-height: 1.55; color: var(--fg-3); }

.fb-legal { padding: 10px 20px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--fg-4); display: flex; gap: 14px; }

@media (max-width: 600px) {
  .fb-launch { right: 14px; bottom: 14px; }
  .fb-panel { left: 10px; right: 10px; bottom: 64px; width: auto; max-height: calc(100vh - 90px); }
}
@media (prefers-reduced-motion: reduce) {
  .fb-panel { animation: none; }
  .fb-launch, .fb-launch .fb-launch-label { transition: none; }
}
@media print { .fb-launch, .fb-panel { display: none !important; } }

/* Rechtliche Links unter der App */
.legal-foot {
  display: flex; gap: 18px; padding: 14px 48px 22px;
  font-size: 11.5px; color: var(--fg-4); background: var(--bg);
}
.legal-foot a { color: var(--fg-3); text-decoration: none; }
.legal-foot a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 900px) { .legal-foot { padding: 12px 18px 72px; } }
@media print { .legal-foot { display: none; } }
