/* ════════════════════════════════════════════════════════════
   Saphia Labs — Buscador global ⌘K · estilos
   ════════════════════════════════════════════════════════════ */

/* Trigger en el nav */
.nav-search {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px; padding: 6px 12px; cursor: pointer;
  color: rgba(255,255,255,.55); font-family: var(--font-body, sans-serif);
  transition: border-color .2s, color .2s, background .2s;
}
.nav-search:hover { border-color: rgba(232,0,122,.5); color: #fff; background: rgba(255,255,255,.1); }
.nav-search svg { flex: 0 0 15px; }
.nav-search-kbd { font-size: 11px; font-weight: 600; letter-spacing: .03em; }

/* Overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(8,8,8,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 12vh 20px 20px;
}
.search-overlay.open { display: flex; }

/* Panel */
.search-panel {
  width: 100%; max-width: 600px;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.4);
  display: flex; flex-direction: column; max-height: 70vh;
  animation: searchIn .18s ease;
}
@keyframes searchIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }

/* Input */
.search-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid #EFEFEF; }
.search-head svg { flex: 0 0 20px; color: var(--pink, #E8007A); }
.search-input {
  flex: 1; border: none; outline: none; font-family: var(--font-body, sans-serif);
  font-size: 17px; color: #1A1A1A; background: transparent;
}
.search-input::placeholder { color: #9CA3AF; }
.search-esc { font-size: 11px; font-weight: 600; color: #9CA3AF; border: 1px solid #E5E7EB; border-radius: 6px; padding: 3px 8px; }

/* Results */
.search-results { overflow-y: auto; padding: 8px; }
.search-results::-webkit-scrollbar { width: 8px; }
.search-results::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 8px; }
.search-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border-radius: 11px; cursor: pointer; text-decoration: none; color: inherit;
}
.search-item.active, .search-item:hover { background: var(--pink-pale, #FFF0F7); }
.search-item-ico { flex: 0 0 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--pink-pale, #FFF0F7); color: var(--pink, #E8007A); }
.search-item.active .search-item-ico, .search-item:hover .search-item-ico { background: #fff; }
.search-item-main { min-width: 0; flex: 1; }
.search-item-tl { display: block; font-family: var(--font-display, sans-serif); font-size: 15px; font-weight: 600; color: #1A1A1A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-ds { display: block; font-size: 12.5px; color: #6B7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.search-item-type { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pink, #E8007A); background: var(--pink-pale, #FFF0F7); border: 1px solid var(--pink-light, #F5A0CC); padding: 3px 9px; border-radius: 999px; }
.search-item.active .search-item-type { background: #fff; }

.search-empty { padding: 40px 22px; text-align: center; color: #9CA3AF; font-size: 14.5px; }

/* Footer hints */
.search-foot { display: flex; align-items: center; gap: 18px; padding: 11px 20px; border-top: 1px solid #EFEFEF; font-size: 11.5px; color: #9CA3AF; }
.search-foot .kbd { font-weight: 600; border: 1px solid #E5E7EB; border-radius: 5px; padding: 1px 6px; margin-right: 5px; color: #6B7280; }

@media (max-width: 640px) {
  .nav-search-kbd { display: none; }
  .nav-search { padding: 7px; }
  .search-foot { display: none; }
}
