/* =========================================== */
/* KEYBOARD SHORTCUTS OVERLAY */
/* Beautiful modal showing all keyboard shortcuts */
/* Created: 2025-11-06 */
/* =========================================== */

/* ===== OVERLAY ===== */
.shortcuts-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.shortcuts-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== MODAL CONTAINER ===== */
.shortcuts-modal {
  background: white;
  border-radius: 24px;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(99, 102, 241, 0.2);
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  transform: scale(0.9) translateY(30px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.shortcuts-overlay.active .shortcuts-modal {
  transform: scale(1) translateY(0);
}

[data-bs-theme="dark"] .shortcuts-modal {
  background: #1e293b;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(99, 102, 241, 0.3);
}

/* ===== HEADER ===== */
.shortcuts-header {
  padding: 2rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  color: white;
  position: relative;
}

.shortcuts-title {
  font-size: 1.75rem;
  font-weight: 900;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.shortcuts-title i {
  font-size: 2rem;
}

.shortcuts-subtitle {
  margin: 0;
  opacity: 0.95;
  font-size: 0.95rem;
}

.shortcuts-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.shortcuts-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1) rotate(90deg);
}

/* ===== CONTENT ===== */
.shortcuts-content {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.shortcuts-content::-webkit-scrollbar {
  width: 8px;
}

.shortcuts-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

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

/* ===== SHORTCUT GROUPS ===== */
.shortcut-group {
  margin-bottom: 2rem;
}

.shortcut-group:last-child {
  margin-bottom: 0;
}

.shortcut-group-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6366f1;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(99, 102, 241, 0.1);
}

/* ===== INDIVIDUAL SHORTCUTS ===== */
.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  margin: 0.5rem 0;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.02);
  border: 1px solid rgba(99, 102, 241, 0.08);
  transition: all 0.2s ease;
}

.shortcut-item:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.15);
  transform: translateX(4px);
}

[data-bs-theme="dark"] .shortcut-item {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.12);
}

.shortcut-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #1e293b;
  font-weight: 500;
  font-size: 0.95rem;
}

[data-bs-theme="dark"] .shortcut-label {
  color: #e2e8f0;
}

.shortcut-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border-radius: 8px;
  font-size: 1rem;
  flex-shrink: 0;
}

.shortcut-keys {
  display: flex;
  gap: 0.375rem;
}

.shortcut-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 0.375rem 0.625rem;
  background: white;
  border: 2px solid #e5e7eb;
  border-bottom-width: 4px;
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
  font-size: 0.813rem;
  font-weight: 700;
  color: #1e293b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .shortcut-key {
  background: #334155;
  border-color: #475569;
  border-bottom-color: #64748b;
  color: #e2e8f0;
}

.shortcut-key.modifier {
  font-size: 0.75rem;
  color: #6366f1;
}

/* ===== FOOTER ===== */
.shortcuts-footer {
  padding: 1.5rem 2rem;
  background: rgba(99, 102, 241, 0.03);
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}

.shortcuts-footer-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  border-radius: 999px;
  font-weight: 700;
  margin: 0 0.25rem;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  .shortcuts-overlay {
    padding: 1rem;
  }

  .shortcuts-modal {
    max-height: 90vh;
    border-radius: 16px;
  }

  .shortcuts-header {
    padding: 1.5rem;
  }

  .shortcuts-title {
    font-size: 1.5rem;
  }

  .shortcuts-content {
    padding: 1.5rem;
  }

  .shortcut-item {
    padding: 0.75rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .shortcut-keys {
    margin-left: auto;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes shortcutSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shortcut-item {
  animation: shortcutSlideIn 0.3s ease;
}

.shortcut-item:nth-child(1) { animation-delay: 0s; }
.shortcut-item:nth-child(2) { animation-delay: 0.05s; }
.shortcut-item:nth-child(3) { animation-delay: 0.1s; }
.shortcut-item:nth-child(4) { animation-delay: 0.15s; }
.shortcut-item:nth-child(5) { animation-delay: 0.2s; }

/* ===== PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
  .shortcuts-overlay,
  .shortcuts-modal,
  .shortcut-item,
  .shortcuts-close {
    animation: none !important;
    transition: none !important;
  }
}

