
/* Poostina Storefront-like icon popup search. Isolated from other shop widgets. */
.poostina-popup-search {
  direction: rtl;
  display: inline-flex;
  position: relative;
  vertical-align: middle;
}

.poostina-popup-search *,
.poostina-popup-search-modal * {
  box-sizing: border-box;
}

.poostina-popup-search-trigger {
  align-items: center;
  appearance: none;
  background: rgba(15, 23, 42, .06);
  border: 0;
  border-radius: 14px;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  line-height: 1;
  min-width: 42px;
  padding: 0;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
  width: 42px;
}

.poostina-popup-search-trigger:hover,
.poostina-popup-search.is-open .poostina-popup-search-trigger {
  background: rgba(131, 89, 227, .12);
  color: #8359E3;
  transform: translateY(-1px);
}

.poostina-popup-search-trigger svg,
.poostina-popup-search-trigger i {
  display: block;
  fill: currentColor;
  height: 21px;
  width: 21px;
}

.poostina-popup-search-modal {
  direction: rtl;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity .2s ease, visibility .2s ease;
  visibility: hidden;
  z-index: calc(var(--pst-z-modal, 1400) + 10);
}

.poostina-popup-search-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.poostina-popup-search-backdrop {
  background: rgba(0, 16, 19, .52);
  inset: 0;
  position: absolute;
}

.poostina-popup-search-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .18);
  margin: 9vh auto 0;
  max-height: 84vh;
  max-width: 640px;
  overflow: auto;
  padding: 22px;
  position: relative;
  transform: translateY(14px) scale(.98);
  transition: transform .22s ease;
  width: min(640px, calc(100vw - 28px));
}

.poostina-popup-search-modal.is-open .poostina-popup-search-card {
  transform: translateY(0) scale(1);
}

.poostina-popup-search-close {
  align-items: center;
  appearance: none;
  background: rgba(15, 23, 42, .055);
  border: 0;
  border-radius: 14px;
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  left: 16px;
  padding: 0;
  position: absolute;
  top: 16px;
  width: 40px;
}

.poostina-popup-search-close svg,
.poostina-popup-search-clear svg,
.poostina-popup-search-form-icon svg {
  display: block;
  height: 21px;
  width: 21px;
}

.poostina-popup-search-title {
  color: #111827;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.6;
  margin: 4px 0 10px;
  padding-left: 52px;
}

.poostina-popup-search-intro {
  color: #64748b;
  font-size: 13px;
  line-height: 1.9;
  margin: 0 0 14px;
  padding-left: 52px;
}

.poostina-popup-search-form {
  align-items: center;
  background: #f5f7fb;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 18px;
  display: flex;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
}

.poostina-popup-search-form-icon {
  color: #64748b;
  flex: 0 0 28px;
  height: 28px;
  width: 28px;
}

.poostina-popup-search-form-icon svg {
  height: 100%;
  width: 100%;
}

.poostina-popup-search-input {
  appearance: none;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #111827;
  flex: 1;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  height: 42px;
  min-width: 0;
  outline: 0 !important;
  padding: 0 !important;
}

.poostina-popup-search-input::-webkit-search-decoration,
.poostina-popup-search-input::-webkit-search-cancel-button,
.poostina-popup-search-input::-webkit-search-results-button,
.poostina-popup-search-input::-webkit-search-results-decoration { display: none; }
.poostina-popup-search-input::-ms-clear,
.poostina-popup-search-input::-ms-reveal { display: none; height: 0; width: 0; }

.poostina-popup-search-submit {
  align-items: center;
  appearance: none;
  background: #8359E3;
  border: 0;
  border-radius: 14px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 850;
  height: 42px;
  justify-content: center;
  min-width: 86px;
  padding: 0 18px;
}

.poostina-popup-search-clear {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  color: #64748b;
  cursor: pointer;
  display: none;
  justify-content: center;
  padding: 0;
}

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

.poostina-popup-search-results {
  margin-top: 14px;
  min-height: 58px;
}

.poostina-popup-search-message {
  align-items: center;
  background: rgba(15, 23, 42, .035);
  border: 1px dashed rgba(15, 23, 42, .11);
  border-radius: 18px;
  color: #64748b;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 58px;
  padding: 16px;
  text-align: center;
}

.poostina-store-results-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0 0 10px;
}

.poostina-store-results-head strong {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.poostina-store-results-head a {
  color: #8359E3;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.poostina-store-results-list {
  display: grid;
  gap: 9px;
  max-height: min(56vh, 480px);
  overflow: auto;
  padding-left: 3px;
}

.poostina-store-result-item {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 18px;
  color: #111827;
  display: grid;
  gap: 12px;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  padding: 9px;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.poostina-store-result-item:hover {
  border-color: rgba(131, 89, 227, .28);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}

.poostina-store-result-img {
  background: rgba(15, 23, 42, .045);
  border-radius: 15px;
  height: 58px;
  overflow: hidden;
  width: 58px;
}

.poostina-store-result-img img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.poostina-store-result-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.poostina-store-result-title {
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poostina-store-result-meta {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poostina-store-result-price {
  color: #8359E3;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.poostina-store-category-results {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.poostina-store-category-chip {
  background: rgba(15, 23, 42, .055);
  border-radius: 999px;
  color: #111827;
  font-size: 12px;
  font-weight: 850;
  padding: 8px 11px;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.poostina-store-category-chip:hover {
  background: rgba(131, 89, 227, .12);
  color: #8359E3;
}

body.poostina-popup-search-lock {
  overflow: hidden !important;
}

@media (max-width: 640px) {
  .poostina-popup-search-card {
    border-radius: 20px;
    margin-top: 3vh;
    max-height: 92vh;
    padding: 18px;
    width: min(calc(100vw - 20px), 520px);
  }

  .poostina-popup-search-title,
  .poostina-popup-search-intro {
    padding-left: 46px;
  }

  .poostina-popup-search-form {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .poostina-popup-search-form-icon {
    align-self: center;
  }

  .poostina-popup-search-input {
    flex-basis: calc(100% - 44px);
  }

  .poostina-popup-search-submit {
    flex: 1 1 100%;
    width: 100%;
  }

  .poostina-store-result-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .poostina-store-result-img {
    height: 52px;
    width: 52px;
  }

  .poostina-store-result-price {
    grid-column: 2;
  }
}

.poostina-popup-search :is(button,a,input):focus-visible, .poostina-popup-search-modal :is(button,a,input):focus-visible { outline: 2px solid currentColor !important; outline-offset: 3px !important; }
