/* AiOrbit Keyboard Shortcuts Styles */

/* ===========================================
   TOAST NOTIFICATIONS
   =========================================== */

.keyboard-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(24, 24, 31, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.keyboard-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.keyboard-toast-icon {
  font-size: 1rem;
}

.keyboard-toast-message {
  color: var(--text-primary, #f8fafc);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===========================================
   HELP MODAL
   =========================================== */

.keyboard-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.keyboard-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.keyboard-modal {
  background: var(--bg-secondary, #111117);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.keyboard-modal-overlay.show .keyboard-modal {
  transform: scale(1);
}

/* Header */
.keyboard-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
}

.keyboard-modal-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
  margin: 0;
}

.keyboard-modal-icon {
  font-size: 1.3rem;
}

.keyboard-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.keyboard-modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #f8fafc);
}

/* Body */
.keyboard-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

/* Shortcut Sections */
.shortcut-section {
  margin-bottom: 24px;
}

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

.shortcut-section h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #64748b);
  margin-bottom: 12px;
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--glass-bg, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.05));
  border-radius: 10px;
  transition: background 0.15s ease;
}

.shortcut-item:hover {
  background: var(--glass-hover, rgba(255, 255, 255, 0.06));
}

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.85rem;
}

.shortcut-desc {
  color: var(--text-primary, #f8fafc);
  font-size: 0.9rem;
}

/* Keyboard key styling */
.shortcut-keys kbd,
.keyboard-modal-footer kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary, #f8fafc);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Footer */
.keyboard-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
  text-align: center;
}

.keyboard-modal-footer p {
  color: var(--text-muted, #64748b);
  font-size: 0.85rem;
  margin: 0;
}

.keyboard-modal-footer kbd {
  margin: 0 2px;
}

/* ===========================================
   SEARCH BOX KEYBOARD FOCUS HIGHLIGHT
   =========================================== */

.search-input.keyboard-focused {
  border-color: var(--primary, #6366f1) !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25), 0 0 20px rgba(99, 102, 241, 0.15) !important;
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 640px) {
  .keyboard-modal {
    max-width: 100%;
    border-radius: 12px;
    max-height: 80vh;
  }
  
  .keyboard-modal-header {
    padding: 16px 20px;
  }
  
  .keyboard-modal-body {
    padding: 16px 20px;
  }
  
  .shortcut-item {
    padding: 8px 12px;
  }
  
  .shortcut-keys {
    font-size: 0.8rem;
  }
  
  .shortcut-desc {
    font-size: 0.85rem;
  }
  
  .keyboard-toast {
    left: 16px;
    right: 16px;
    transform: translateX(0) translateY(100px);
    bottom: 16px;
  }
  
  .keyboard-toast.show {
    transform: translateX(0) translateY(0);
  }
}

/* ===========================================
   ANIMATION PREFERENCE
   =========================================== */

@media (prefers-reduced-motion: reduce) {
  .keyboard-toast,
  .keyboard-modal,
  .keyboard-modal-overlay {
    transition: none;
  }
  
  .keyboard-toast {
    transform: translateX(-50%) translateY(0);
  }
  
  .keyboard-modal {
    transform: scale(1);
  }
}
