/* Shortcuts Modal */
.shortcuts-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.shortcuts-modal.open {
  display: flex;
}

.shortcuts-modal-content {
  background: var(--ntabs-bg-primary, #ffffff);
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.shortcuts-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--ntabs-border, #e5e7eb);
}

.shortcuts-modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--ntabs-text-primary, #111827);
}

.shortcuts-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  color: var(--ntabs-text-secondary, #6b7280);
  transition: all 0.15s;
}

.shortcuts-modal-close:hover {
  background: var(--ntabs-bg-tertiary, #f3f4f6);
  color: var(--ntabs-text-primary, #111827);
}

.shortcuts-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.shortcuts-section h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ntabs-text-secondary, #6b7280);
  margin: 0 0 0.75rem 0;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.shortcut-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--ntabs-bg-tertiary, #f3f4f6);
  border: 1px solid var(--ntabs-border, #e5e7eb);
  border-radius: 4px;
  color: var(--ntabs-text-primary, #374151);
}

.shortcut-description {
  font-size: 0.875rem;
  color: var(--ntabs-text-secondary, #6b7280);
}

.shortcuts-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--ntabs-border, #e5e7eb);
  text-align: center;
}

.shortcuts-hint {
  font-size: 0.75rem;
  color: var(--ntabs-text-secondary, #9ca3af);
}

.shortcuts-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 500;
  background: var(--ntabs-bg-tertiary, #f3f4f6);
  border: 1px solid var(--ntabs-border, #e5e7eb);
  border-radius: 3px;
  color: var(--ntabs-text-primary, #374151);
}

/* Dark mode support */
.mark-dark .shortcuts-modal-content {
  background: #1a1a2e;
}

.mark-dark .shortcuts-modal-header {
  border-color: #2d2d44;
}

.mark-dark .shortcuts-modal-header h2 {
  color: #e5e5e5;
}

.mark-dark .shortcuts-modal-close {
  color: #9ca3af;
}

.mark-dark .shortcuts-modal-close:hover {
  background: #2d2d44;
  color: #e5e5e5;
}

.mark-dark .shortcuts-section h3 {
  color: #9ca3af;
}

.mark-dark .shortcut-keys kbd {
  background: #2d2d44;
  border-color: #3d3d5c;
  color: #e5e5e5;
}

.mark-dark .shortcut-description {
  color: #9ca3af;
}

.mark-dark .shortcuts-modal-footer {
  border-color: #2d2d44;
}

.mark-dark .shortcuts-hint kbd {
  background: #2d2d44;
  border-color: #3d3d5c;
  color: #e5e5e5;
}

@media (max-width: 640px) {
  .shortcuts-modal-body {
    grid-template-columns: 1fr;
  }
}
