.overlay {
  /* --chip-font-size is set at runtime by SuggestOverlay.tsx. It starts at
   * the preferred size (var(--font-sm)) and is scaled down when the longest
   * chip would overflow the available width. Floor: 11px. */
  --chip-font-size: var(--font-sm);
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  max-width: calc(100% - 32px);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  /* Must beat .terminal-pane.active z-index:20 (styles.css) */
  z-index: 30;
  animation: fadeIn 0.15s ease-out;
  pointer-events: auto;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .overlay {
    animation: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: min(40ch, 22vw);
  font-family: var(--font-ui);
  font-size: var(--chip-font-size);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--fg-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s ease, border-color 0.1s ease, font-size 0.08s ease;
}

.chipLabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip:hover {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}

.chip:hover .shortcut {
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-on-accent);
}

.closeBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-tertiary);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.1s ease, background 0.1s ease;
}

.closeBtn:hover {
  color: var(--fg-primary);
  background: var(--bg-highlight);
}

.shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  font-family: var(--font-mono);
  font-size: var(--font-sm);
  font-weight: 600;
  line-height: 1;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: var(--bg-highlight);
  color: var(--fg-secondary);
}
