/* ============================================
   Spotlight Search Component
   Global search overlay with Apple-style design
   ============================================ */

.spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--blur-sm);
  z-index: var(--z-spotlight);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  animation: spotlightFadeIn var(--duration-fast) var(--ease-out);
}

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

.spotlight-modal {
  width: 600px;
  max-width: 90vw;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--glass-medium);
  backdrop-filter: var(--backdrop-modal);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: spotlightSlideIn var(--duration-base) var(--ease-spring);
}

@keyframes spotlightSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Search Input */
.spotlight-input {
  width: 100%;
  padding: var(--space-6) var(--space-6);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: var(--text-2xl);
  font-weight: var(--weight-medium);
  outline: none;
}

.spotlight-input::placeholder {
  color: var(--text-tertiary);
}

/* Results Container */
.spotlight-results {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2);
}

/* Empty state */
.spotlight-empty {
  padding: var(--space-12);
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

/* Results Group */
.spotlight-group {
  margin-bottom: var(--space-4);
}

.spotlight-group-title {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* Result Item */
.spotlight-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.spotlight-item:hover,
.spotlight-item.selected {
  background: var(--glass-light);
}

.spotlight-item.selected {
  background: var(--accent-blue);
}

.spotlight-item.selected .spotlight-item-title,
.spotlight-item.selected .spotlight-item-description {
  color: white;
}

/* Result Icon */
.spotlight-item-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--glass-light);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.spotlight-item.selected .spotlight-item-icon {
  background: rgba(255, 255, 255, 0.2);
}

/* Result Text */
.spotlight-item-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  overflow: hidden;
}

.spotlight-item-title {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-item-description {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keyboard shortcut hint */
.spotlight-item-shortcut {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  padding: var(--space-1) var(--space-2);
  background: var(--glass-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.spotlight-item.selected .spotlight-item-shortcut {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Footer (optional hint text) */
.spotlight-footer {
  padding: var(--space-2) var(--space-4);
  border-top: 1px solid var(--border-light);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spotlight-hint {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.spotlight-hint-key {
  padding: 2px var(--space-1);
  background: var(--glass-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10px;
}
