/* search.css: the search agent's, linked by the header on every page.
   The live search box's answer (partials/suggest.html) in the theme's Amasty look, and the /search page's
   sidebar filters folded as the theme's collapsible widget leaves them until a title is clicked. */

/* live search: the "Search for" and categories column beside the products, as Amasty lays them */
.amsearch-result-section { align-items: flex-start; flex-wrap: nowrap; }
.amsearch-result-section .amsearch-result-block { display: flex; flex-wrap: nowrap; }
.amsearch-result-section .amsearch-items-section { flex: 0 0 283px; }
.amsearch-result-section .amsearch-items-section .amsearch-tab-items { list-style: none; margin: 0; padding: 0; }
.amsearch-result-section .amsearch-item-container .amsearch-link { display: block; }
.amsearch-result-section .amsearch-item-container .amsearch-block-header { padding-bottom: 8px; }
.amsearch-result-section .amsearch-product-image-container img { display: block; max-width: 100%; height: auto; }
.amsearch-result-section .amsearch-products-section.-grid .amsearch-image { text-align: center; }
.amsearch-result-section .amsearch-products-section .product-item-link {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-height: none; overflow: hidden; margin-bottom: 10px; padding: 0;
}
.amsearch-result-section .amsearch-message-block { margin: 0 20px 20px; width: auto; }
.amsearch-form-block.-loading .amsearch-input-wrapper::after {
  content: ""; position: absolute; right: 44px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border: 2px solid #ccc; border-top-color: #DD2728; border-radius: 50%; animation: search-spin .7s linear infinite;
}
@keyframes search-spin { to { transform: rotate(360deg); } }
@media (max-width: 767px) {
  .amsearch-result-section .amsearch-result-block { flex-direction: column; }
  .amsearch-result-section .amsearch-items-section { flex: none; max-width: none; padding-bottom: 0; }
  .amsearch-result-section .amsearch-products-section { width: 100% !important; }
  .amsearch-result-section .amsearch-products-section.-grid:not(.-slider) .amsearch-item { max-width: 50%; }
}

/* /search: a filter's list shows only once its title is opened */
.catalogsearch-result-index .filter-options-item:not(.active) .filter-options-content { display: none; }
.catalogsearch-result-index .filter-options-title { cursor: pointer; }
.catalogsearch-result-index .search.results > .message.notice { margin-top: 20px; }
/* the wish list block sits under the filters, as on the client's long pages, even when no results leave the main column short */
.catalogsearch-result-index .sidebar.sidebar-additional { clear: left; }

/* the dark page: the live search's panel takes the page colour, a row in hand a step up, the photos their white plates */
:root[data-parts-theme="dark"] .amsearch-result-section { background-color: var(--site-bg); color: var(--site-fg); border-color: var(--site-line); }
:root[data-parts-theme="dark"] .amsearch-result-section .amsearch-item:is(:hover, :focus-within, .-active) { background-color: var(--site-card); }
/* a photo (the theme's 174 square laid over its 90-high link, so on the light page the name runs over the photo's white)
   fits its link here, so the near-white name never lands on the white plate */
:root[data-parts-theme="dark"] .amsearch-result-section .product-item-photo img { height: 100%; object-fit: contain; background-color: var(--site-plate); }
:root[data-parts-theme="dark"] .amsearch-result-section .price-box .price { color: var(--site-fg); }
