/* Phase 7 — Keyboard shortcuts cheat sheet overlay */

.kbd-cheatsheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: kbd-fade-in 0.15s ease-out;
}

@keyframes kbd-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.kbd-cheatsheet {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: 1rem;
  width: min(560px, 92vw);
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.kbd-cheatsheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-default);
}

.kbd-cheatsheet__header h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.kbd-cheatsheet__close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-tertiary);
  cursor: pointer;
}

.kbd-cheatsheet__close:hover {
  color: var(--text-primary);
}

.kbd-cheatsheet__body {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 540px) {
  .kbd-cheatsheet__body { grid-template-columns: 1fr 1fr; }
}

.kbd-cheatsheet__body section h3 {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin: 0 0 0.625rem 0;
}

.kbd-cheatsheet__body dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 0.75rem;
  margin: 0;
  font-size: 0.875rem;
}

.kbd-cheatsheet__body dt {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

.kbd-cheatsheet__body dd {
  margin: 0;
  color: var(--text-secondary);
}

.kbd-cheatsheet__body kbd {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-default);
  border-bottom-width: 2px;
  font-size: 0.75rem;
  color: var(--text-primary);
  min-width: 22px;
  text-align: center;
}

.kbd-cheatsheet__footer {
  padding: 0.75rem 1.25rem 1rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin: 0;
  text-align: center;
}
