/* ============================================================
   PeekABaby — Search Overlay
   ============================================================ */

/* Search trigger button — matches burger style exactly */
.search-btn {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  background: var(--blush, #BEE3DF);
  border: none;
  border-radius: 13px;
  cursor: pointer;
  color: var(--aubergine, #1D3557);
  padding: 0;
  flex-shrink: 0;
  transition: background .2s, transform .15s;
  position: relative;
  z-index: 10;
}
.search-btn:hover {
  background: var(--blush-deep, #8DD0C9);
  transform: scale(1.05);
}
.search-btn svg { display: block; }

/* ── Overlay backdrop ── */
.search-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: clamp(60px, 10vh, 120px);
  background: rgba(14,39,64,.78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.search-overlay.open {
  opacity: 1; pointer-events: all;
}

/* ── Search panel ── */
.search-panel {
  width: min(680px, calc(100vw - 32px));
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 32px 80px rgba(0,0,0,.35), 0 0 0 1px rgba(60,191,172,.18);
  overflow: hidden;
  transform: translateY(-20px) scale(.97);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1);
}
.search-overlay.open .search-panel {
  transform: translateY(0) scale(1);
}

/* ── Input row ── */
.search-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1.5px solid #c5e8e5;
}
.search-input-row svg { flex-shrink: 0; color: #3CBFAC; }
.search-input-row input {
  flex: 1; border: none; outline: none;
  font-size: 17px; font-weight: 500;
  font-family: inherit; color: #142740;
  background: transparent;
}
.search-input-row input::placeholder { color: #4A6880; }
.search-close-btn {
  background: #E2F5F2; border: none;
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #1D3557; font-size: 16px;
  transition: background .15s;
}
.search-close-btn:hover { background: #BEE3DF; }

/* ── Results ── */
.search-results {
  max-height: 420px; overflow-y: auto;
  padding: 0 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: #8DD0C9 transparent;
}
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-track { background: transparent; }
.search-results::-webkit-scrollbar-thumb { background: #8DD0C9; border-radius: 4px; }

.search-no-results {
  text-align: center; padding: 40px 20px;
  color: #4A6880; font-size: 15px;
}
.search-no-results strong { display: block; font-size: 32px; margin-bottom: 8px; }

.search-group-label {
  font-size: 10px; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: #3CBFAC;
  padding: 14px 8px 6px; display: block;
}

.sr-item {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 11px 10px;
  border-radius: 13px;
  text-decoration: none;
  transition: background .12s;
  cursor: pointer;
}
.sr-item:hover, .sr-item.focused { background: #EBF7F5; }

.sr-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #E2F5F2, #C5E8E4);
  color: #3CBFAC;
}

.sr-text { flex: 1; min-width: 0; }
.sr-title {
  font-size: 14px; font-weight: 700; color: #142740;
  margin: 0 0 3px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.sr-title mark {
  background: linear-gradient(90deg,#C5E8E4,#A8EDE7);
  color: #1D3557; border-radius: 3px; padding: 0 2px;
  font-style: normal;
}
.sr-desc {
  font-size: 12px; color: #4A6880; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.sr-tag {
  font-size: 11px; color: #4A6880; background: #E2F5F2;
  border-radius: 100px; padding: 2px 8px;
  align-self: center; white-space: nowrap; flex-shrink: 0;
}
