/* Stylings for the search bar and search results */

/* Search bar */
.search-container {
  margin: 0.625rem auto;
  position: relative;
}

.search-container .glyphicon {
  position: absolute;
  top: 0.375rem;
  left: 0.75rem;
  color: #8c9caf;
  font-size: 0.875rem;
}

.search-container .st-default-search-input {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 0.25rem;
  background-color: hsla(0,0%,100%,.1);
  background-image: none;
  padding-left: 2.25rem;
  font-size: 1rem;
  font-family: inherit;
  color: #8c9caf;
}

.st-default-search-input::placeholder {
  color: #8c9caf;
  opacity: 1;
  font-weight: 400;
}

/* Autocomplete */
.st-default-autocomplete
.st-autocomplete-results
.st-query-present {
  padding: 0.25rem 0 1rem 0;
  margin: 0;
}

.st-default-autocomplete
.st-autocomplete-results
.st-query-present
.st-ui-result {
  padding: 0.75rem 1rem;
}

.st-autocomplete-results
.st-query-present
.st-ui-result:last-of-type {
  /* Extra border to separate the last result from '::after' text */
  border-bottom: 1px solid #e9eDf2;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0.5rem;
}

.st-default-autocomplete
.st-autocomplete-results
.st-query-present::after {
  margin-left: 1rem;
  color: #8c9caf;
  font-family: 'Lato';
  font-size: 0.8125rem;
  content: 'Press enter to see all results';
}

.st-query-present
.st-ui-result:hover,
/* Be specific to maintain styling for autocomplete */
.st-default-autocomplete
.st-autocomplete-results
.st-query-present
.st-ui-result:hover {
  background-color: rgba(93, 111, 133, 0.1);
}

.st-ui-result
.st-ui-type-heading,
/* Be specific to maintain styling for autocomplete */
.st-default-autocomplete
.st-autocomplete-results
.st-query-present
.st-ui-result
.st-ui-type-heading {
  font-family: 'Lato';
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.375rem;
}

.st-ui-result
.st-ui-type-detail,
/* Be specific to maintain styling for autocomplete */
.st-default-autocomplete
.st-autocomplete-results
.st-query-present
.st-ui-result
.st-ui-type-detail {
  font-family: 'Lato';
  color: #8c9caf;
  font-size: 0.8125rem;
  line-height: 1.125rem;
}

/* Search results */
.st-search-results .st-query-present .st-ui-result {
  padding-left: 1rem;
  border-radius: 0.25rem;
}

.st-search-results .st-query-present .st-ui-result::before {
  /* Hide unnecessary caret in search results card */
  display: none;
}

.st-query-present .st-ui-result .st-ui-type-detail {
  max-height: 2.5rem;
}

/* Footer */
.st-ui-footer .st-query-present {
  text-align: center;
}

.st-result-pagination-link {
  font-family: 'Lato';
  padding: 0.25rem 0.5rem;
}
.st-result-pagination-link:hover {
  text-decoration: none;
}

/* Hack: Hide the "previous" and "next" text and move the margins inward to only show the carats */
.st-result-pagination-link:first-of-type, .st-result-pagination-link:last-of-type {
  visibility: hidden;
}
.st-result-pagination-link:first-of-type {
  margin-right: -4rem;
}
.st-result-pagination-link:last-of-type {
  margin-left: -2rem;
}
.st-result-pagination-link .st-ui-arrow {
  visibility: visible;
  height: 0.5rem;
  width: 0.5rem;
}

.st-ui-footer .active {
  visibility: visible;
  margin-right: 0;
  background-color: #e9edf1;
  color: #6290c3;
  border-radius: 3px;
}
