/**
 * Keyboard Shortcuts Help Dialog Styles
 * FFXP-55: Add Keyboard Shortcuts
 */

/* Help Dialog Overlay */
.shortcuts-help-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.shortcuts-help-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Help Dialog Box */
.shortcuts-help-dialog {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Dark theme support */
[data-theme="dark"] .shortcuts-help-dialog {
  background: #1e293b;
  border: 1px solid #334155;
}

/* Header */
.shortcuts-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="dark"] .shortcuts-help-header {
  border-color: #334155;
}

.shortcuts-help-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
}

[data-theme="dark"] .shortcuts-help-header h2 {
  color: #f1f5f9;
}

.shortcuts-help-close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.shortcuts-help-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

[data-theme="dark"] .shortcuts-help-close:hover {
  background: #334155;
  color: #f1f5f9;
}

/* Content */
.shortcuts-help-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Category */
.shortcuts-category {
  margin-bottom: 24px;
}

.shortcuts-category:last-child {
  margin-bottom: 0;
}

.shortcuts-category h3 {
  font-size: 14px;
  font-weight: 600;
  color: #538d83;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #538d83;
}

[data-theme="dark"] .shortcuts-category h3 {
  color: #6ba89e;
  border-color: #6ba89e;
}

/* Shortcuts List */
.shortcuts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

/* Shortcut Item */
.shortcut-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  transition: background 0.2s;
}

.shortcut-item:hover {
  background: #f1f5f9;
}

[data-theme="dark"] .shortcut-item {
  background: #0f172a;
}

[data-theme="dark"] .shortcut-item:hover {
  background: #334155;
}

.shortcut-item kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

[data-theme="dark"] .shortcut-item kbd {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

.shortcut-item span {
  color: #4b5563;
  font-size: 14px;
}

[data-theme="dark"] .shortcut-item span {
  color: #94a3b8;
}

/* Footer */
.shortcuts-help-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

[data-theme="dark"] .shortcuts-help-footer {
  border-color: #334155;
}

.shortcuts-help-footer span {
  font-size: 13px;
  color: #6b7280;
}

[data-theme="dark"] .shortcuts-help-footer span {
  color: #64748b;
}

.shortcuts-help-footer kbd {
  display: inline-block;
  padding: 2px 8px;
  background: #e5e7eb;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: #374151;
  margin: 0 2px;
}

[data-theme="dark"] .shortcuts-help-footer kbd {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

/* Scrollbar styling for help content */
.shortcuts-help-content::-webkit-scrollbar {
  width: 8px;
}

.shortcuts-help-content::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.shortcuts-help-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.shortcuts-help-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

[data-theme="dark"] .shortcuts-help-content::-webkit-scrollbar-track {
  background: #1e293b;
}

[data-theme="dark"] .shortcuts-help-content::-webkit-scrollbar-thumb {
  background: #475569;
}

[data-theme="dark"] .shortcuts-help-content::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Responsive */
@media (max-width: 600px) {
  .shortcuts-help-dialog {
    max-height: 90vh;
  }

  .shortcuts-list {
    grid-template-columns: 1fr;
  }

  .shortcut-item kbd {
    min-width: 80px;
  }
}
