/* Voice-of-customer contextual feedback widget.
   Panel chrome extended by rmc-assist-dock.css when mounted in the assist dock. */

.voc-widget {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  right: calc(1rem + env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  z-index: 10440;
}

.voc-widget__panel {
  display: none;
  flex-direction: column;
  width: min(360px, calc(100vw - 2rem));
  background: var(--surface-elevated, var(--bs-body-bg));
  border: 1px solid var(--hairline);
  box-shadow: var(--elev-3, 0 18px 45px var(--surface-overlay));
  border-radius: 16px;
  overflow: hidden;
}

.voc-widget[data-open="true"] .voc-widget__panel,
.rmc-assist-panel--feedback.rmc-assist-panel--open {
  display: flex;
}

.voc-widget__header {
  flex-shrink: 0;
}

.voc-widget__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.voc-widget textarea {
  min-height: 84px;
}

/* When the assist dock mounts and ADOPTS this widget, it moves the panel +
   toggle into the dock rail and removes the original .voc-widget node entirely
   (rmc-assist-dock.js: voc.remove()). So a .voc-widget that still exists after
   the dock mounted means adoption did NOT complete. It must stay a collapsed,
   bottom-right floating button — never be un-floated into the page flow, which
   was the regression that splashed the expanded feedback panel across the
   bottom of every operator page. (Previously: position: static.) */
body[data-rmc-assist-dock="mounted"] .voc-widget {
  position: fixed;
}
