/* Global search (js/ui/search.js): a panel at the top of the screen, full width on a phone. Above the invitations and the toasts (z-index 2000), which would otherwise cover it. */

.search-overlay {
  position: fixed; inset: 0; z-index: 2100; display: flex; justify-content: center; align-items: flex-start;
  padding: 72px 16px 16px; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(3px); animation: fadeIn 0.15s ease;
}
.search-panel {
  display: flex; flex-direction: column; width: min(560px, 100%); max-height: min(70dvh, 560px);
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden;
}
.search-bar { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.search-bar svg { flex: none; }
.search-bar input {
  flex: 1; min-width: 0; height: 44px; padding: 0; border: none; outline: none; background: none;
  font: inherit; font-size: 1rem; color: var(--text-primary);
}
.search-bar input::-webkit-search-cancel-button { display: none; }
.search-results { overflow-y: auto; padding: 4px 8px 10px; }
.search-group { padding: 12px 8px 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.search-item {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 8px; border-radius: var(--radius-sm);
  color: var(--text-secondary); text-decoration: none; font-weight: 600;
}
.search-item:hover, .search-item:focus-visible { background: var(--bg-card-hover); color: var(--text-primary); outline: none; }
.search-item:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-teal); }
.search-ico { display: inline-flex; width: 28px; justify-content: center; flex: none; }
.search-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-cover { width: 28px; height: 38px; border-radius: 4px; object-fit: cover; flex: none; }
.search-cover-empty { display: flex; align-items: center; justify-content: center; background: var(--bg-card); font-size: 0.9rem; }
.search-empty { padding: 24px 8px; text-align: center; color: var(--text-muted); }

@media (max-width: 640px) {
  .search-overlay { padding: 0; }
  .search-panel { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; border: none; }
}
