/* ============================================================
   spotlight.css — Spotlight Search Overlay
   macOS Desktop Website
   ============================================================ */

#spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#spotlight-overlay[hidden] {
  display: none;
}

#spotlight-dialog {
  width: 100%;
  max-width: 620px;
  background: var(--spotlight-bg);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border-radius: 14px;
  box-shadow: var(--spotlight-shadow);
  overflow: hidden;
  animation: spotlight-in 0.18s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes spotlight-in {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.spotlight-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-window);
}

.spotlight-search-icon {
  flex-shrink: 0;
  color: var(--text-tertiary);
}

#spotlight-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 20px;
  font-weight: 300;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-system);
  caret-color: var(--accent);
}

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

.spotlight-clear-btn {
  background: var(--sidebar-hover);
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}

#spotlight-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 0;
}

#spotlight-results:empty {
  display: none;
}

.spotlight-section-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 18px 4px;
  font-family: var(--font-system);
}

.spotlight-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.08s ease;
  font-family: var(--font-system);
}

.spotlight-result:hover,
.spotlight-result.active {
  background: var(--spotlight-hover);
}

.spotlight-result:hover .spotlight-result-title,
.spotlight-result.active .spotlight-result-title {
  color: #fff;
}

.spotlight-result:hover .spotlight-result-sub,
.spotlight-result.active .spotlight-result-sub {
  color: rgba(255,255,255,0.75);
}

.spotlight-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.spotlight-result-text {
  flex: 1;
  min-width: 0;
}

.spotlight-result-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-result-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-no-results {
  padding: 20px 18px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  font-family: var(--font-system);
}

/* Scrollbar */
#spotlight-results::-webkit-scrollbar { width: 6px; }
#spotlight-results::-webkit-scrollbar-track { background: transparent; }
#spotlight-results::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  #spotlight-dialog { animation: none; }
}
