/* oplex-autosuggest — wspólny dropdown autosuggest (topbar + picker) */

.oplex-as__panel {
  background: #fff;
  border: 1px solid var(--oplex-pm-border-strong, #d1d5db);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  font-size: 14px;
  color: var(--oplex-pm-text, #1f2937);
}

.oplex-as__list {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 480px;
  overflow-y: auto;
}

.oplex-as__item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  align-items: center;
  transition: background 0.1s;
}
.oplex-as__item:hover,
.oplex-as__item--active {
  background: #f3f4f6;
}

.oplex-as__thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #f9fafb;
  border-radius: 4px;
}
.oplex-as__thumb--empty {
  display: block;
}

.oplex-as__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.oplex-as__name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.oplex-as__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 11px;
  color: #6b7280;
}

.oplex-as__ref {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}
.oplex-as__oe {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  color: #4b5563;
}

.oplex-as__panel mark {
  background: #fef3c7;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.oplex-as__empty {
  padding: 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

@media (max-width: 600px) {
  .oplex-as__panel { font-size: 13px; }
  .oplex-as__name { -webkit-line-clamp: 3; }
  .oplex-as__thumb { width: 40px; height: 40px; }
  .oplex-as__item { grid-template-columns: 40px minmax(0, 1fr); }
}
