/* panel-keyboard.css — the keyboard journey's chrome (lib/panel-keyboard.js): the row cursor, the ⌘K palette,
   the ? cheat-sheet. Structural + role hues via tokens only. */

/* The row cursor — a guaranteed, always-visible "you are here" ring as you move with ↑/↓ or J/K (not the browser's
   faint default). Distinct from the open state (which tints the row). */
.row-host.cursor > patient-row {
  border-radius: 8px;
  box-shadow: 0 0 0 2px var(--ui-selection);
  background: var(--ui-selection-bg);
}
.row-host.cursor.open > patient-row { background: var(--band); } /* open wins the fill; the ring still marks the cursor */

/* ── ⌘K palette + ? cheat-sheet share a scrim + centered box ─────────────────────────────────────────────────── */
.pk-palette,
.pk-sheet {
  position: fixed;
  inset: 0;
  z-index: 9500; /* above the depth-2 overlay (9000) */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  box-sizing: border-box;
}
.pk-palette[hidden],
.pk-sheet[hidden] { display: none; }

.pk-scrim {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 30%, transparent);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.pk-box,
.pk-sheet-box {
  position: relative;
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: 0 24px 70px -12px color-mix(in srgb, var(--ink) 45%, transparent);
  overflow: hidden;
}

/* palette */
.pk-input {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  outline: none;
}
.pk-input::placeholder { color: var(--faint); }
.pk-results { max-height: 46vh; overflow-y: auto; }
.pk-opt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
}
.pk-opt.on { background: var(--ui-selection-bg); }
.pk-badge {
  flex: 0 0 auto;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1px 5px;
}
.pk-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-sub { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.pk-empty { padding: 16px; color: var(--faint); font-size: 13px; }

/* cheat-sheet */
.pk-sheet-box { padding: 18px 20px 8px; }
.pk-sheet-box:focus { outline: none; }
.pk-sheet-box h2 { font-size: 14px; font-weight: 700; margin: 0 0 12px; color: var(--ink); }
.pk-sheet-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
}
.pk-sheet-row:first-of-type { border-top: 0; }
.pk-sheet-desc { color: var(--mid); }
.pk-key {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--ink);
  background: var(--band);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 2px 7px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
