/* Feedback button (web/feedback.js). A tab on the right edge of every page,
   clear of bottom save bars, chat composers and toasts. The panel reuses the
   DS drawer (.h-drawer); only what is specific to feedback lives here. */

.fb-launch {
  position: fixed; right: 0; top: 50%; z-index: calc(var(--z-drawer) - 1);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 8px; border: 1px solid var(--line-strong); border-right: 0;
  border-radius: var(--r-md) 0 0 var(--r-md);
  background: var(--bg-surface); color: var(--text); box-shadow: var(--shadow-2);
  font: 500 var(--fs-12)/1 var(--font-sans, inherit); letter-spacing: .01em;
  writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg);
  cursor: pointer; transition: background var(--dur-1, .12s) ease, padding var(--dur-1, .12s) ease;
}
.fb-launch .h-i { width: 14px; height: 14px; transform: rotate(90deg); color: var(--brand); }
.fb-launch:hover { background: var(--bg-hover); padding-left: 11px; }
.fb-launch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.fb-layer[hidden] { display: none; }
.fb-scrim { position: fixed; inset: 0; z-index: calc(var(--z-drawer) - 1); background: var(--overlay); animation: h-fade var(--dur-2) var(--ease); }
.fb-panel { width: min(440px, 100%); }
.fb-panel.is-settled, .fb-scrim.is-settled { animation: none; }
.fb-sub { margin-top: 4px; }
.fb-form { gap: var(--s-4); }
.fb-text { min-height: 180px; resize: vertical; line-height: 1.5; }
.fb-err { color: var(--danger); }
.fb-error { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-md); background: var(--danger-tint); color: var(--danger); font-size: var(--fs-13); }
.fb-foot { justify-content: space-between; align-items: center; }
.fb-meta { flex: 1 1 180px; min-width: 0; }
.fb-done { align-items: center; justify-content: center; text-align: center; gap: var(--s-2); }
.fb-done__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--tint); color: var(--on-tint); margin-bottom: var(--s-2); }
.fb-done__icon .h-i { width: 20px; height: 20px; }
.fb-done__title { font: 400 var(--fs-20)/1.25 var(--font-display); letter-spacing: var(--track-title); }

/* Settings > Feedback (platform admin only). */
#feedback-admin .h-card__head { align-items: center; }
#feedback-admin .h-select { width: auto; }
.fba-list { padding: var(--s-4) var(--s-5); gap: 0; }
.fba-item { padding: var(--s-3) 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.fba-item:first-child { border-top: 0; padding-top: 0; }
.fba-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.fba-msg { white-space: pre-wrap; font-size: var(--fs-14); line-height: 1.5; }
.fba-links a { color: var(--link); }

@media (max-width: 820px) {
  /* Phones: icon-only tab, lower on the edge so it clears the top bar and the thumb zone's content. */
  .fb-launch { top: 62%; padding: 10px 6px; }
  .fb-launch__label { display: none; }
  .fb-panel { width: 100%; }
  .fb-foot { flex-direction: column; align-items: stretch; }
  .fb-meta { flex: none; }
  .fb-send { width: 100%; }
}
@media print { .fb-root { display: none; } }
