/* features/feedback-widget/feedback-widget.css — floating "Send feedback"
   button (café owners; ported from inventory-tracking-system). */

/* Leave room so the fixed button never covers the last row of a page. */
body.has-feedback:not(.is-guest-page) #view { padding-bottom: 96px; }
/* Guest pages look like the guest's (lib/app.js toggles is-guest-page). */
.is-guest-page .fb { display: none; }

.fb {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 90; /* above page content, below dialogs (100) and toasts (1000) */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  /* On phones the container spans the width; only its children take taps. */
  pointer-events: none;
}
.fb > * { pointer-events: auto; }

.fb__fab {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-dark);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.12s ease, background 0.12s ease;
}
.fb__fab svg { width: 26px; height: 26px; }
.fb__fab:hover { background: var(--color-primary-ink); transform: translateY(-1px); }
.fb__fab:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

.fb__panel {
  width: 340px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
}
.fb__panel[hidden] { display: none; }
.fb__form { display: flex; flex-direction: column; gap: 10px; }
.fb__title { margin: 0; font-weight: 600; font-size: 1rem; }
.fb__sub { margin: -4px 0 2px; font-size: 0.8rem; color: var(--color-muted); line-height: 1.4; }

.fb__kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fb__kind { position: relative; }
.fb__kind input { position: absolute; opacity: 0; pointer-events: none; }
.fb__kind span {
  display: block;
  text-align: center;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.fb__kind input:checked + span {
  border-color: var(--color-primary);
  background: var(--color-tint);
  color: var(--color-text);
}
.fb__kind input:focus-visible + span { outline: 3px solid var(--color-focus); outline-offset: 2px; }

.fb__form textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
.fb__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 0.75rem; color: var(--color-muted); }
.fb__from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb__count { font-variant-numeric: tabular-nums; flex: none; }
.fb__error { margin: 0; font-size: 0.8rem; color: var(--color-danger-text); }
.fb__wait { margin: 0; font-size: 0.8rem; line-height: 1.4; color: var(--color-text-2); }
.fb__send { align-self: flex-end; }

@media (max-width: 640px) {
  .fb { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); left: 16px; }
  .fb__fab { width: 52px; height: 52px; }
  .fb__panel { width: 100%; box-sizing: border-box; }
}
