/* The public search results page, /search — vanilla CSS (project preference).
   One thing stands out: the Bible word entry when the query names one. The list
   below it is quiet: title, two lines of excerpt, a byline. */

.search {
  max-width: 44rem;
  padding-top: 0.5rem;
}

.search__prompt,
.search__empty {
  padding: 1.5rem 0 3rem;
  color: #57534e; /* stone-600 */
  font-size: 1rem;
  line-height: 1.6;
}

/* Heading and count */

.search__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.search__heading {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  color: #1e3a8a; /* the site's heading blue */
  overflow-wrap: anywhere;
}

.search__count {
  font-size: 0.875rem;
  color: #78716c; /* stone-500 */
  white-space: nowrap;
}

/* The guess notice: the one thing on the page that must not be missed, so it takes
   the amber the site already uses for attention (the search box focus, the banner). */

.search__guess {
  margin: 0.25rem 0 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid #f59e0b; /* amber-500 */
  background: #fffbeb; /* amber-50 */
  color: #292524;
  font-size: 0.9375rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.search__guess strong {
  font-weight: 700;
}

.search__guess-link {
  font-weight: 700;
  color: #1e3a8a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Type links: plain words, the current one underlined in the heading blue */

.search__types {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e7e5e4; /* stone-200 */
}

.search__type {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #57534e; /* stone-600 */
  padding-bottom: 0.6rem;
  margin-bottom: -0.6rem;
  border-bottom: 2px solid transparent;
}

.search__type:hover {
  color: #1c1917; /* stone-900 */
}

.search__type[aria-current="page"] {
  color: #1e3a8a;
  font-weight: 700;
  border-bottom-color: #1e3a8a;
}

/* The lead entry */

.search__lead {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #1e3a8a;
  background: #f8fafc; /* slate-50 */
}

.search__lead-kind {
  font-size: 0.8125rem;
  color: #78716c;
  margin-bottom: 0.35rem;
}

/* Terms are shown in capitals, as the Bible words pages show them. */

.search__lead-term {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1e3a8a;
  margin-bottom: 0.6rem;
}

.search__lead-term a:hover {
  text-decoration: underline;
}

.search__lead-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #292524; /* stone-800 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search__lead-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e3a8a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The list */

.search__results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search__result {
  padding: 1rem 0;
  border-bottom: 1px solid #f5f5f4; /* stone-100 */
}

.search__result:last-child {
  border-bottom: 0;
}

.search__title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1c1917;
  margin-bottom: 0.3rem;
}

.search__title a:hover {
  color: #1e3a8a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.search__excerpt {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #57534e;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search__byline {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: #78716c; /* stone-500: the lightest grey that still passes contrast on white */
}

.search__pagination {
  margin-top: 1rem;
}

/* Empty state */

.search__empty-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1c1917;
  margin-bottom: 0.75rem;
  overflow-wrap: anywhere;
}

.search__empty p {
  margin-bottom: 0.5rem;
}

.search__empty a {
  color: #1e3a8a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Keyboard focus, everywhere on the page */

.search a:focus-visible {
  outline: 2px solid #1e3a8a;
  outline-offset: 2px;
  border-radius: 2px;
}
