#compose {
  position: relative;
  display: block;
}

#command-picker {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  /* Sit ABOVE the composer. max-height is capped against the visual viewport so a long
     command list cannot grow up over the on-screen key row (mobile) on short screens. */
  bottom: 100%;
  max-height: min(240px, 34dvh);
  overflow: auto;
  padding: 6px;
  border: 1px solid #2a4350;
  border-radius: 10px;
  background: #101c27;
  box-shadow: 0 12px 30px #0008;
}

#command-picker button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  background: transparent;
  text-align: left;
}

#command-picker button:hover,
#command-picker button.selected {
  background: #1b3440;
  border-color: transparent;
}

#command-picker strong {
  min-width: 100px;
  color: var(--accent);
  font: 13px monospace;
}

#command-picker span {
  color: #9cb4c6;
  font-size: 12px;
}

.command-picker-empty {
  padding: 9px 10px;
  color: #9cb4c6;
  font-size: 12px;
}

@media (max-width: 560px) {
  #command-picker strong {
    min-width: 84px;
  }
}

/* While the command picker is open the on-screen key row is both unusable (focus is in
   the textarea) and the only thing the panel would otherwise overlap. Retract it so the
   picker gets the terminal area to itself. Falls back gracefully on browsers without :has(). */
body:has(#command-picker:not([hidden])) .keys {
  display: none;
}

/* Apple-white light theme — 2026-10-03 */
html[data-theme="light"] .command-picker{background:#fff;border-color:#d2d2d7;box-shadow:0 12px 30px #00000014}
html[data-theme="light"] .command-picker button{background:transparent;color:#1d1d1f}
html[data-theme="light"] .command-picker button:hover,html[data-theme="light"] .command-picker button.is-active{background:#eef1f5;border-color:transparent}
html[data-theme="light"] .command-picker small{color:#6e6e73}
html[data-theme="light"] .command-picker b{color:#0071e3}
