/* SAIDS — header search results panel */
.header-search-results {
  max-height: min(62vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 0 18px;
  border-top: 1px solid var(--keyline, #e3e9f2);
}
.header-search-results[hidden] { display: none; }

.header-search-results .ss-status {
  margin: 14px 0 6px;
  font-size: .9rem;
  color: var(--text-soft, #5a6680);
}
.header-search-results .ss-status strong { color: var(--navy, #1c3c70); }
.header-search-results .ss-loading::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border: 2px solid var(--teal, #2fb5ad); border-right-color: transparent; border-radius: 50%;
  animation: ss-spin .7s linear infinite;
}
@keyframes ss-spin { to { transform: rotate(360deg); } }

.header-search-results .ss-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

.header-search-results .ss-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px;
  border-radius: var(--r, 10px);
  text-decoration: none; color: var(--text, #1a2740);
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.header-search-results .ss-item:hover,
.header-search-results .ss-item:focus-visible,
.header-search-results .ss-item.is-active {
  background: var(--pale-teal, #e6f7f5);
  border-color: rgba(47, 181, 173, .35);
  outline: none;
}

.header-search-results .ss-meta { display: flex; align-items: center; gap: 10px; font-size: .75rem; min-width: 0; }
.header-search-results .ss-tag {
  flex-shrink: 0; padding: 2px 8px; border-radius: 999px;
  background: var(--pale-navy, #eef2f8); color: var(--navy, #1c3c70);
  font-weight: 600; letter-spacing: .02em; text-transform: uppercase; font-size: .68rem;
}
.header-search-results .ss-url { color: var(--teal-dark, #178078); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.header-search-results .ss-title { font-weight: 600; font-size: 1.02rem; color: var(--navy, #1c3c70); line-height: 1.35; }
.header-search-results .ss-snippet {
  font-size: .9rem; color: var(--text-soft, #5a6680); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.header-search-results mark {
  background: rgba(47, 181, 173, .22); color: inherit; padding: 0 2px; border-radius: 3px;
}

/* Hide the browser's own clear "x" so it doesn't clash with the close button */
#headerSearchInput::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

@media (max-width: 640px) {
  .header-search-results { max-height: 70vh; }
  .header-search-results .ss-item { padding: 10px; }
  .header-search-results .ss-url { display: none; }
}
