/* line-item-autocomplete.css */

.pb-autocomplete-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-1);
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.pb-ac-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}
.pb-ac-item:last-child { border-bottom: none; }
.pb-ac-item:hover,
.pb-ac-item.pb-ac-active {
  background: #eff6ff;
}

.pb-ac-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pb-ac-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #1a1a2e;
}
.pb-ac-name mark {
  background: #fef08a;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.pb-ac-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.pb-ac-badge-live {
  background: #d1fae5;
  color: #065f46;
}
.pb-ac-badge-default {
  background: #e5e7eb;
  color: #4b5563;
}
.pb-ac-badge-custom {
  background: #dbeafe;
  color: #1e40af;
}

.pb-ac-item-details {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 0.78rem;
  color: #6b7280;
}

.pb-ac-csi {
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.72rem;
}

.pb-ac-empty {
  padding: 16px;
  text-align: center;
  color: #6b7280;
  font-size: 0.88rem;
}
.pb-ac-add-btn {
  display: block;
  margin: 10px auto 0;
  padding: 6px 16px;
  background: #2563eb;
  color: var(--text-1);
  border: none;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.pb-ac-add-btn:hover { background: #1d4ed8; }

/* Responsive: full-width on mobile */
@media (max-width: 640px) {
  .pb-autocomplete-dropdown {
    position: fixed;
    left: 8px;
    right: 8px;
    top: auto;
    max-height: 50vh;
    border-radius: 8px;
    border: 1px solid #d1d5db;
  }
}