/* Command palette (js/palette.js). The kbd key cap is one rule in
   css/base.css (issue #16 F-88). */

/* ---------- Command palette (js/palette.js) ---------- */
.palette-backdrop { align-items: flex-start; padding-top: 12vh; }
.palette {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(16, 24, 40, 0.3);
  overflow: hidden;
}
.palette > input {
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  /* A bigger search field than a form input: opt out of the shared
     --control-h so its padding sets the height (issue #16 F-25). */
  height: auto;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-lg);
  background: transparent;
}
.palette > input:focus { outline: none; }
.palette-results { max-height: 46vh; overflow-y: auto; padding: var(--sp-1); }
.palette-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2);
  border-radius: 8px;
  cursor: pointer;
}
.palette-item.active { background: var(--accent-soft); }
.palette-item .pal-icon { flex-shrink: 0; }
.palette-item .pal-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.palette-item .pal-sub { font-size: var(--fs-xs); color: var(--text-muted); flex-shrink: 0; }
.palette-empty { padding: var(--sp-4); text-align: center; color: var(--text-muted); font-size: var(--fs-md); }
.palette-hint {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}
/* Key caps back in the hint (issue #16 F-58): each key and its word. */
.palette-hint > span { display: inline-flex; align-items: center; gap: var(--sp-1); }
