/* As-you-type search suggestions dropdown.
 *
 * Pure CSS using the pt-editorial theme variables (the consumer surface is
 * light-only — the editorial cream theme — so no dark-mode variants needed).
 * The dropdown is anchored to the .pt-search-input via a relatively-positioned
 * wrapper that pt-suggest.js injects around the input at init. */

.pt-suggest-anchor {
  position: relative;
  display: flex;
  flex: 1 1 380px;
  min-width: 0;
}
.pt-suggest-anchor > .pt-search-input {
  flex: 1 1 auto;
  width: 100%;
}

.pt-suggest-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 120;
  margin: 0;
  padding: 0.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-strong);
  border-radius: 7px;
  box-shadow: var(--shadow-pop);
  max-height: 23rem;
  overflow-y: auto;
  font-family: var(--font-body);
  -webkit-overflow-scrolling: touch;
}
.pt-suggest-dropdown[hidden] { display: none; }

.pt-suggest-hint {
  padding: 0.4rem 0.6rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-tertiary);
}

.pt-suggest-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.55rem;
  border-radius: 5px;
  cursor: pointer;
  color: var(--ink-primary);
  font-size: 0.95rem;
  line-height: 1.3;
}
.pt-suggest-item.is-active,
.pt-suggest-item:hover {
  background: var(--bg-data-hover);
}

.pt-suggest-badge {
  flex: none;
  min-width: 4.6rem;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.16rem 0.4rem;
  border-radius: 3px;
  color: #fff;
}
.pt-suggest-badge.is-phrase   { background: var(--accent-primary); }
.pt-suggest-badge.is-category { background: var(--accent-info); }
.pt-suggest-badge.is-code     { background: var(--ink-tertiary); }
/* DRG bundles tinted apart (ochre) from line-item CPT/HCPCS codes. */
.pt-suggest-badge.is-code.is-drg { background: var(--accent-caution); }

.pt-suggest-label {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-suggest-label mark {
  background: transparent;
  color: var(--accent-primary);
  font-weight: 700;
}

/* Always-visible code chip on the right (never ellipsis-clipped like the label). */
.pt-suggest-code {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-tertiary);
  background: var(--bg-data);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  margin-left: auto;
}

.pt-suggest-empty {
  padding: 0.55rem 0.6rem;
  color: var(--ink-tertiary);
  font-size: 0.9rem;
}
