/* Inline/hero variant of Poostina live search. Reuses the popup search visual contract. */
.poostina-inline-search {
  direction: rtl;
  position: relative;
  width: 100%;
  z-index: 20;
}

.poostina-inline-search *,
.poostina-inline-search *::before,
.poostina-inline-search *::after {
  box-sizing: border-box;
}

.poostina-inline-search .poostina-popup-search-form {
  flex-wrap: nowrap;
  width: 100%;
  margin: 0;
}

.poostina-inline-search .poostina-popup-search-input {
  width: auto !important;
  min-width: 0;
}

.poostina-inline-search.has-value .poostina-popup-search-clear {
  display: inline-flex;
  flex: 0 0 auto;
}

.poostina-inline-search .poostina-popup-search-submit {
  flex: 0 0 auto;
  white-space: nowrap;
}

.poostina-inline-search-results-panel {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .14);
  inset-inline: 0;
  margin-top: 10px;
  max-height: min(62vh, 540px);
  overflow: auto;
  padding: 12px;
  position: absolute;
  top: 100%;
  width: 100%;
  z-index: 999;
}

.poostina-inline-search-results-panel[hidden] {
  display: none !important;
}

.poostina-inline-search .poostina-popup-search-results {
  margin-top: 0;
  min-height: 0;
}

.poostina-inline-search .poostina-store-results-list {
  max-height: min(48vh, 440px);
}

.poostina-inline-search :is(button,a,input):focus-visible {
  outline: 2px solid rgba(131, 89, 227, .28);
  outline-offset: 2px;
}

/* Defeat Woodmart's generic form geometry only inside this widget. */
.gwsp-woodmart .gwsp-poostina-widget .poostina-inline-search form.poostina-inline-search-form {
  display: flex;
  width: 100%;
  max-width: none;
  margin: 0;
}
.gwsp-woodmart .gwsp-poostina-widget .poostina-inline-search input[type="search"] {
  border: 0 !important;
  border-radius: 0;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 42px;
}
.gwsp-woodmart .gwsp-poostina-widget .poostina-inline-search button {
  margin: 0;
  text-transform: none;
  box-shadow: none;
}

@media (max-width: 640px) {
  /* Unlike the modal search, the hero field stays on one line on mobile. */
  .poostina-inline-search .poostina-popup-search-form {
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .poostina-inline-search .poostina-popup-search-input {
    flex: 1 1 auto;
  }
  .poostina-inline-search .poostina-popup-search-submit {
    flex: 0 0 auto;
    min-width: 72px;
    padding-inline: 14px;
    width: auto;
  }
  .poostina-inline-search-results-panel {
    max-height: 68vh;
  }
}
