/* ─── Search results dropdown ─── */
#search-results {
  position: fixed;
  top: 62px;
  left: 8px;
  z-index: 1100;
  width: 380px;
  max-height: 400px;
  overflow-y: auto;
  background: rgba(19, 41, 75, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(44, 78, 138, 0.4);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  display: none;
}

#search-results.open {
  display: block;
}

#sr-select-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(19, 41, 75, 0.5);
  gap: 8px;
}

#sr-select-bar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .65rem;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

#sr-select-bar input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(100, 140, 200, 0.4);
  border-radius: 3px;
  background: rgba(29, 59, 107, 0.35);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

#sr-select-bar input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

#sr-select-bar input[type="checkbox"]:checked::after {
  content: '\2713';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
}

#sr-selected-count {
  font-size: .62rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}

.search-result-item:hover {
  background: var(--surface-2);
}

.search-result-item.sr-checked {
  background: rgba(255, 95, 5, 0.06);
}

.search-result-item:last-child {
  border-bottom: none;
}

.sr-cb {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(100, 140, 200, 0.35);
  border-radius: 3px;
  background: rgba(29, 59, 107, 0.3);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
}

.sr-cb:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.sr-cb:checked::after {
  content: '\2713';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
}

.sr-content {
  flex: 1;
  min-width: 0;
}

.search-result-item .sr-title {
  font-size: .72rem;
  font-weight: 600;
}

.search-result-item .sr-meta {
  font-size: .62rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.sr-highlight {
  color: var(--gold);
  font-weight: 700;
}
