/* search-suggest.css — type-ahead panel under the main header search
 * (rendered by assets/search-suggest.js). Convention matches the app: bare
 * rules are the LIGHT theme, `.dark` on <html> is the dark theme. Colours
 * come from the same slate ramp the frozen bundle uses; contrasts checked
 * against their surfaces (title 16:1, sub 4.8:1 light / 7:1 dark).
 */

.ss-panel {
  position: fixed;
  z-index: 2147482500;
  overflow: hidden;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(2, 6, 23, .18), 0 2px 8px rgba(2, 6, 23, .08);
  font: 13px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: left;
}
.dark .ss-panel {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #293548;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .4);
}

.ss-panel, .ss-panel * { box-sizing: border-box; }

.ss-body {
  max-height: min(60vh, 420px);
  overflow-y: auto;
  padding: 6px;
  overscroll-behavior: contain;
}

.ss-group {
  padding: 8px 10px 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}
.dark .ss-group { color: #94a3b8; }

.ss-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.ss-item:hover { text-decoration: none; background: #f1f5f9; }
.dark .ss-item:hover { background: #1e293b; }
.ss-item.is-active { background: #e2e8f0; }
.dark .ss-item.is-active { background: #1e293b; }
.ss-item:focus-visible { outline: 2px solid #4f46e5; outline-offset: -1px; }

.ss-ico {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
.dark .ss-ico { background: #1e293b; color: #cbd5e1; }
.ss-ico-thumb { width: 48px; border-radius: 8px; }
.ss-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ss-main { min-width: 0; flex: 1; }
.ss-title {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ss-sub {
  display: block;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .ss-sub { color: #94a3b8; }

.ss-title mark {
  background: #e0e7ff;
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.dark .ss-title mark { background: rgba(129, 140, 248, .35); color: #eef2ff; }

.ss-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #e2e8f0;
  padding: 8px 12px;
  font-size: 11px;
  color: #64748b;
}
.dark .ss-foot { border-color: #1e293b; color: #94a3b8; }

.ss-corrected { flex: none; }
.ss-all {
  margin-left: auto;
  color: #4f46e5;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.dark .ss-all { color: #818cf8; }
.ss-all:hover { text-decoration: underline; }

.ss-empty, .ss-loading {
  padding: 16px 12px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}
.dark .ss-empty, .dark .ss-loading { color: #94a3b8; }
