/* Typeahead search dropdown styles
 * Hangs below the existing .search-input-row form inside .search-modal.
 * Loaded as part of header.css (concatenated) or as a sibling file.
 *
 * Tokens reuse the header.css palette where possible:
 *   --teal: #287A77, --teal-light: #48A9A6, --teal-soft, --border, --gray, --charcoal
 */

.search-typeahead {
  max-height: min(60vh, 540px);
  overflow-y: auto;
  border-top: 1px solid var(--border, #e5e7eb);
  background: #fff;
}
.search-typeahead[hidden] { display: none; }

/* Section: header + rows */
.ta-section { padding: 8px 0; }
.ta-section + .ta-section { border-top: 1px solid var(--border, #e5e7eb); }
.ta-section-h {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray, #6b7280);
  margin: 0;
  padding: 12px 20px 6px;
}
.ta-rows { display: flex; flex-direction: column; }

/* Row: icon | text (title + path or pill+date) | optional kind label */
.ta-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 20px;
  text-decoration: none;
  color: var(--charcoal, #1A2A35);
  border-radius: 0;
  transition: background-color .12s ease;
}
.ta-row:hover,
.ta-row:focus-visible,
.ta-row.is-active {
  background: rgba(40, 122, 119, 0.08);
  outline: none;
}
.ta-row.is-active {
  background: rgba(40, 122, 119, 0.12);
}
.ta-row-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(40, 122, 119, 0.08);
  color: #287A77;
  flex-shrink: 0;
}
.ta-row-icon svg { width: 16px; height: 16px; }
.ta-row-text { min-width: 0; }
.ta-row-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal, #1A2A35);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ta-row-title mark {
  background: rgba(72, 169, 166, 0.22);
  color: inherit;
  padding: 0;
  border-radius: 2px;
  font-weight: 700;
}
.ta-row-path {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--gray, #6b7280);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ta-row-pill {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray, #6b7280);
  padding: 3px 8px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 4px;
  flex-shrink: 0;
  margin-left: 8px;
}
.ta-row[data-external="1"]:hover .ta-row-pill,
.ta-row[data-external="1"].is-active .ta-row-pill {
  border-color: #287A77;
  color: #287A77;
}

/* Release-note row meta: version pill + date */
.ta-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  flex-wrap: wrap;
}
.ta-pill {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--gray, #6b7280);
  padding: 2px 6px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 99px;
}
.ta-meta-date {
  font-size: 12px;
  color: var(--gray, #6b7280);
}

/* Loading + empty states */
.ta-loading {
  padding: 16px 20px;
  font-size: 13.5px;
  color: var(--gray, #6b7280);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ta-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(40, 122, 119, 0.18);
  border-top-color: #287A77;
  border-radius: 50%;
  display: inline-block;
  animation: ta-spin 0.7s linear infinite;
}
@keyframes ta-spin { to { transform: rotate(360deg); } }
.ta-empty { padding: 20px; text-align: center; }
.ta-empty-h {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0;
  color: var(--charcoal, #1A2A35);
}
.ta-empty-sub {
  font-size: 13px;
  color: var(--gray, #6b7280);
  margin: 6px 0 0;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .search-typeahead { max-height: 70vh; }
  .ta-row { padding: 12px 16px; gap: 12px; }
  .ta-section-h { padding: 12px 16px 6px; }
  .ta-row-pill { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ta-row { transition: none; }
  .ta-spinner { animation: none; }
}
