/* Dedicated search results page. Scoped under #search-page. */

/* Hide the small header search bar while on /search/ so the big
   on-page input is the only one visible. */
body.on-search-page .md-search {
  display: none;
}

#search-page {
  margin-top: 0.5rem;
  max-width: 920px;
}

.search-page__form {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 6px 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  margin: 0 0 1.25rem;
}
.search-page__form:focus-within {
  border-color: #7f77dd;
  box-shadow: 0 0 0 3px rgba(127, 119, 221, 0.18);
}

.search-page__form-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  padding: 0 6px;
}

.search-page__input {
  flex: 1;
  font-size: 16px;
  font-family: inherit;
  color: #1f2937;
  background: transparent;
  border: 0;
  outline: none;
  padding: 10px 6px;
}
.search-page__input::placeholder {
  color: #9ca3af;
}

.search-page__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #6b7280;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.search-page__clear:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.search-page__toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.5rem;
  font-size: 13px;
  color: #4b5563;
}
.search-page__toolbar-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
}
.search-page__toolbar-label svg { color: #6b7280; }

.search-page__pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.search-page__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: #4b5563;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.search-page__pill:hover {
  border-color: #7f77dd;
  color: #534AB7;
}
.search-page__pill.is-active {
  background: #EEEDFE;
  border-color: #7f77dd;
  color: #3C3489;
  font-weight: 600;
}
.search-page__pill-count {
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 1px 7px;
}
.search-page__pill.is-active .search-page__pill-count {
  background: #ffffff;
  color: #534AB7;
}

.search-page__summary {
  margin: 0 0 1rem;
  font-size: 14px;
  color: #6b7280;
}

.search-page__results {
  margin-top: 0.5rem;
}

.search-page__result {
  padding: 1.25rem 0;
  border-bottom: 1px solid #f1f3f7;
}
.search-page__result:first-child { padding-top: 0; }
.search-page__result:last-child  { border-bottom: none; }

.search-page__crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: #6b7280;
  margin-bottom: 6px;
}
.search-page__crumb-sep {
  color: #d1d5db;
}

.md-typeset .search-page__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}
.md-typeset .search-page__title a {
  color: #2F80ED;
  border-bottom: none;
  text-decoration: none;
}
.md-typeset .search-page__title a:hover {
  text-decoration: underline;
}

.md-typeset .search-page__snippet {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}
.md-typeset .search-page__snippet mark,
.md-typeset .search-page__title mark {
  background: #FEF3C7;
  color: #92400E;
  padding: 0 2px;
  border-radius: 3px;
}

/* Persistent highlight on the destination page after clicking a result.
   Material's `search.highlight` feature wraps matched terms in <mark>
   elements when the URL has `?h=...`. Style them so the highlight is
   clearly visible and does not visually decay. */
.md-typeset mark,
.md-content mark,
.md-content [data-md-highlight] {
  background: #FEF3C7 !important;
  color: #92400E !important;
  padding: 0 3px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(146, 64, 14, 0.15);
  -webkit-text-fill-color: #92400E;
}
