/* Shared polling-unit autocomplete widget.
   Used on /upload, /admin/ (regenerate code), /admin/ (submission filter). */

.pu-wrap { position: relative; }
.pu-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border: 1px solid #e3e7ec; border-top: none;
  max-height: 280px; overflow-y: auto; display: none;
  z-index: 20; border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 18px rgba(28,37,48,.08);
}
.pu-dropdown.open { display: block; }
.pu-item {
  padding: 8px 10px; cursor: pointer;
  border-bottom: 1px solid #f4f6f8;
}
.pu-item:last-child { border-bottom: none; }
.pu-item:hover, .pu-item.hl { background: #f0f4f8; }
.pu-item .n { font-size: 13px; color: #1c2530; }
.pu-item .m { font-size: 11px; color: #6b7785; margin-top: 2px; }
.pu-empty { padding: 10px; font-size: 12px; color: #6b7785; text-align: center; }

.pu-chosen {
  display: none; align-items: center; gap: 8px;
  padding: 10px; border: 1px solid #e3e7ec; border-radius: 6px;
  background: #fafbfc;
}
.pu-chosen.has { display: flex; }
.pu-chosen .name { font-size: 13px; flex: 1; }
.pu-chosen .meta { font-size: 11px; color: #6b7785; }
.pu-chosen button {
  width: auto; margin: 0; padding: 4px 10px; font-size: 11px;
  background: transparent; color: #6b7785;
  border: 1px solid #e3e7ec; border-radius: 4px; cursor: pointer;
}
.pu-chosen button:hover { color: #1c2530; }
