/* Keyboard shortcuts in the Code Lab (founder 2026-11-06). Pairs with code-labkb.js. */

/* What just happened, bottom left so it never sits under the preview or the toolbar. */
.labkb-toast {
  position: fixed; left: 18px; bottom: 18px; z-index: 99999; max-width: min(78vw, 330px);
  padding: 10px 15px; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .3);
  background: rgba(2, 11, 31, .96); color: #e8eeff;
  font: 700 .85rem/1.35 var(--font-head, system-ui); letter-spacing: .01em;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .9); opacity: 1; transition: opacity .35s ease;
}
.labkb-toast.is-out { opacity: 0; }

.labkb {
  position: fixed; z-index: 100000; right: 18px; bottom: 18px; width: min(92vw, 330px);
  padding: 16px 17px 13px; border-radius: 14px; border: 1px solid rgba(148, 163, 184, .32);
  background: linear-gradient(165deg, rgba(15, 23, 42, .99), rgba(2, 11, 31, .99)); color: #e8eeff;
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .95);
}
.labkb-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.labkb-h strong { font: 800 .98rem/1.2 var(--font-head, system-ui); }
.labkb-x { background: none; border: 0; color: #94a3b8; font-size: 1rem; line-height: 1; cursor: pointer; padding: 4px; }
.labkb-x:hover, .labkb-x:focus-visible { color: #fff; outline: none; }
.labkb-l { display: flex; flex-direction: column; gap: 1px; }
.labkb-r { display: flex; align-items: center; gap: 11px; padding: 5px 0; font-size: .86rem; color: #cbd5e1; }
/* A shortcut whose button is not on this page is shown, but shown as unavailable: the list stays the
   same length wherever you are, which is what makes it learnable. */
.labkb-r.is-off { opacity: .4; }
.labkb-r kbd {
  flex: none; display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 6px;
  border-radius: 6px; border: 1px solid rgba(148, 163, 184, .4); border-bottom-width: 2px;
  background: rgba(255, 255, 255, .05); color: #fff;
  font: 800 .76rem/1 ui-monospace, Menlo, monospace;
}
.labkb-f { margin: 11px 0 0; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .75rem; line-height: 1.45; color: #94a3b8; }

@media (max-width: 640px) {
  .labkb { right: 10px; left: 10px; bottom: 10px; width: auto; }
  .labkb-toast { left: 10px; right: 10px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .labkb-toast { transition: none; } }
