.search-modal.searching {
  height: calc(100vh - var(--announcement-bar-height, 0px) - 48px);
}

.search-modal.searching .search__recommendation,
predictive-search[open] .search__recommendation, 
predictive-search[loading] .search__recommendation,
.template-search__search predictive-search[results] .search__recommendation {
  display: none;
}

.predictive-search__results-list {
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.predictive-search__results-list::-webkit-scrollbar-track {
  background-color: rgb(var(--color-border));
}

.predictive-search__results-list::-webkit-scrollbar {
  width: 0.3rem;
  background-color: rgb(var(--color-foreground));
}

.predictive-search__results-list::-webkit-scrollbar-thumb {
  background-color: rgb(var(--color-foreground));
}

.no-js .predictive-search {
  display: none;
}

.header .predictive-search { 
  position: relative;
  flex: 1 0 auto;
  margin: 3rem 0 2rem;
}

.header .predictive-search-results {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.header .predictive-search__item--term {
  margin-top: 1rem;
}

.header .predictive-search__results-list {
  display: flex;
  flex-wrap: wrap;
  row-gap: 2rem;
  padding-inline-end: 2.5%;
  margin-inline-end: -2.5%;
}

.header .predictive-search__results-list li {
  width: 100%;
}

@media screen and (min-width: 750px) {
  .header .predictive-search__results-list {
    column-gap: 2rem;
    row-gap: 3rem;
    padding-inline-end: 2.5rem;
    margin-inline-end: -2.5rem;
  }

  .header .predictive-search__results-list li {
    width: calc(50% - 1rem);
  }

  .header .predictive-search__results-list li:last-child {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .header .predictive-search__item--term {
    width: auto;
    min-width: 24rem;
  }
}

.predictive-search--search-template {
  display: none;
  position: absolute;
  z-index: 30;
  top: calc(100% - 0.1rem);
  left: 0;
  width: calc(100% - 4rem);
  margin: 0 2rem;
  padding: 2rem;
  background-color: rgb(var(--color-background));
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

predictive-search[open] .predictive-search--search-template {
  display: flex;
  flex-direction: column;
}

.predictive-search--search-template .predictive-search-results {
  width: calc(100% + 1.5rem);
}

.predictive-search--search-template .predictive-search__results-list {
  padding-inline-end: 1.5rem;
  max-height: 30rem;
}

.predictive-search--search-template .predictive-search__list-item {
  padding: 1.6rem 0;
  border-top: 0.1rem solid rgb(var(--color-border));
}

.predictive-search--search-template .predictive-search__list-item:last-child {
  border-top: 0;
  padding-bottom: 0;
  padding-top: 1rem;
}

.predictive-search--search-template .predictive-search__list-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.predictive-search--search-template .predictive-search__item-heading {
  font-size: calc(var(--font-heading-scale) * 1.4rem);
  line-height: calc(1 + 0.2 / max(1, var(--font-heading-scale)));
}

.predictive-search__heading {
  margin: 0;
  padding-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

predictive-search .icon-spinner {
  width: 2rem;
  height: 2rem;
  line-height: 0;
}

predictive-search:not([loading]) .predictive-search__heading .icon-spinner,
predictive-search:not([loading]) .predictive-search__loading-state,
predictive-search:not([loading]) .predictive-search-status__loading {
  display: none;
}

predictive-search[loading] .predictive-search__loading-state {
  display: flex;
  justify-content: center;
  padding-inline-end: 0.2rem;
}

predictive-search[loading] .search-modal__form .search__button[type="button"] {
  display: none;
}

.predictive-search__item-heading {
  display: inline-block;
  position: relative;
  background-color: transparent;
  background-image: linear-gradient(to top, rgb(var(--color-border)) 0px, rgb(var(--color-border)) 0px), linear-gradient(to top, transparent 0px, transparent 0px);
  background-repeat: no-repeat;
  background-position: right bottom, right bottom;
  background-size: 0% 0.1rem, 100% 0.1rem;
  transition: background-size var(--duration-default) ease;
}

@media screen and (hover: hover) {
  .predictive-search__item--link:hover .predictive-search__item-heading {
    background-position: left bottom, left bottom;
    background-size: 100% 0.1rem, 100% 0.1rem;
  }
}

.predictive-search__item {
  display: flex;
  text-align: start;
  text-decoration: none; 
  width: 100%;
}

.predictive-search__item--link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-column-gap: 2rem;
  background-image: none;
} 

.predictive-search__item-vendor {
  font-size: 0.9rem;
}

.predictive-search__item-vendor + .predictive-search__item-heading,
.predictive-search .price { 
  margin-top: 0.5rem;
}

.predictive-search__image {
  width: 7rem;
  line-height: 0;
  overflow: hidden;
  border-radius: min(var(--card-radius), 0.3rem);
}

.predictive-search__image img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform var(--duration-long) ease;
}

@media screen and (hover: hover) {
  .predictive-search__item--link:hover .predictive-search__image img {
    transform: scale(1.1);
  }
}

.template-search__search .predictive-search__image {
  width: 5rem;
}

.template-search__search .search-modal__form .field {
  z-index: 15;
}

.template-search__search predictive-search .search__recommendation {
  display: block;
  text-align: start;
  visibility: hidden;
}

.predictive-search--focus:not(.search-modal--open) .transition-body::after {
  opacity: 1;
  pointer-events: visible;
}

.predictive-search--focus:not(.search-modal--open) .template-search__search .search-modal__form .field {
  z-index: 30;
}

.predictive-search--focus:not(.search-modal--open) .template-search__search predictive-search .search__recommendation {
  visibility: visible;
}

.predictive-search--focus:not(.search-modal--open) .template-search__search .search-modal__form .field {
  background-color: rgb(var(--color-background));
}

.predictive-search--focus .shopify-section-header-sticky {
  z-index: 20;
}

.template-search__search .predictive-search .price {
  margin-top: 0;
}

.template-search__search .predictive-search .price bdi {
  font-size: calc(var(--font-heading-scale) * 1.6rem);
}

.template-search__search .predictive-search .price .unit-price {
  line-height: 1;
}

.template-search__search .predictive-search .price .unit-price bdi {
  font-size: calc(var(--font-heading-scale) * 1.3rem);
}