/* Apachesolr search results
-------------------------------------------------------------- */

.search-results-header,
.search-results-wrapper {
  margin-bottom: 1em;
}

.search-results-header,
.search-results-header-left,
.search-results-header-right {
  gap: 1em;
  flex-grow: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.search-results-header-left {
  flex-grow: 999;
}


#forall-search-sort-form .form-item {
  gap: .5em;
  margin: 0;
  display: flex;
  align-items: center;
}
#forall-search-sort-form label { display: none; }


.search-results-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-general);
}
.search-facets-wrapper {
  width: 20%;
  flex-grow: 1;
}
.search-results-main { flex: 99; }


/* Hide the "Browse Available Categories" stuff. */
.apachesolr_browse_block {
  display: none;
}
#forall-search-sort-form .button-link {
  --btn-padding-vertical: 1em;
  --btn-padding-horizontal: 1.3em;
  height: auto;
  cursor: pointer;
}

/* Show / hide filter button based on screen size */
/* Note: We're fighting Nextopia on display none / block here hence !important and overly specific selectors. */
#search-facets-wrapper.search-facets-wrapper { display: none !important; }
@media (width > 996px) {
  .facet-dialog-open-button,
  .search-results-header-left
   { display: none !important; }
  #search-facets-wrapper.search-facets-wrapper { display: block !important; }
}
@media (width < 600px) {
  .search-results-counter { display: none; }
}

/* Dialog size */
dialog[open] #search-facets-wrapper.search-facets-wrapper {
  width: 100%;
  display: block !important;
}
dialog[open] #search-facets-wrapper .block-facetapi:first-child,
dialog[open] #search-facets-wrapper .context-block-region + .block-facetapi  {
  border-top: none;
  padding-top: 0;
}
