/**
 * Search popup redesign (Elementor "Search Popup" #29878 + JetSearch AJAX Search)
 * - Centered compact card, blurred overlay, results inside the same card
 * - All results in one scrolling list (no paging arrows)
 * - Separate row layouts for products vs recipes, stock labels for products
 * Colors come from the site's Elementor global palette – tweak them here.
 */
:root {
  --dsp-black: #000000;
  --dsp-ink: #1C1C1C;
  --dsp-muted: #7A7A7A;
  --dsp-line: #D6D6D6;
  --dsp-soft: #F1F1F1;
  --dsp-hover: #F7F7F7;
  --dsp-peach: #FEC89A;
  --dsp-pink: #FCD5CE;
  --dsp-green: #23A455;
}
/* ================= POPUP SHELL (centered card) ================= */
#elementor-popup-modal-29878 {
  background: rgba(0, 0, 0, .55) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  align-items: center !important;
  justify-content: center !important;
}
#elementor-popup-modal-29878 .dialog-widget-content {
  position: relative !important;
  top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
  width: min(580px, calc(100vw - 32px)) !important;
  height: auto !important;
  max-height: 82vh !important;
  margin: 0 auto !important;
  background: transparent !important;
  box-shadow: none !important;
}
#elementor-popup-modal-29878 .dialog-message {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
}
#elementor-popup-modal-29878 .elementor-location-popup,
#elementor-popup-modal-29878 .elementor-section,
#elementor-popup-modal-29878 .elementor-container,
#elementor-popup-modal-29878 .elementor-column,
#elementor-popup-modal-29878 .elementor-widget-wrap {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}
#elementor-popup-modal-29878 .elementor-widget-wrap { width: 100% !important; }

/* no close button – popup closes via overlay click / Esc */
#elementor-popup-modal-29878 .dialog-close-button { display: none !important; }

/* the card */
#elementor-popup-modal-29878 .jet-ajax-search {
  background: #fff !important;
  border-radius: 22px !important;
  box-shadow: 0 30px 80px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.08) !important;
  overflow: hidden;
  height: auto !important;
}

/* search row */
#elementor-popup-modal-29878 .jet-ajax-search__form {
  display: flex !important;
  align-items: center !important;
  gap: 4px;
  height: auto !important;
  padding: 8px 12px !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
#elementor-popup-modal-29878 .jet-ajax-search__fields-holder,
#elementor-popup-modal-29878 .jet-ajax-search__field-wrapper { height: auto !important; flex: 1 1 auto; }
#elementor-popup-modal-29878 .jet-ajax-search__field {
  height: 52px !important;
  padding: 0 6px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  font: 400 19px/1.2 "Rubik", sans-serif !important;
  color: var(--dsp-ink) !important;
}
#elementor-popup-modal-29878 .jet-ajax-search__field::placeholder { color: var(--dsp-muted) !important; opacity: 1; }
#elementor-popup-modal-29878 .jet-ajax-search__field::-webkit-search-cancel-button {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  margin: 0;
  border-radius: 50%;
  cursor: pointer;
  background: var(--dsp-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1C1C' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 10px no-repeat;
}
#elementor-popup-modal-29878 .jet-ajax-search__field::-webkit-search-cancel-button:hover { background-color: var(--dsp-line); }
#elementor-popup-modal-29878 .jet-ajax-search__submit {
  order: -1;
  flex: 0 0 auto;
  width: 40px !important; height: 40px !important;
  min-width: 0 !important;
  padding: 0 !important; margin: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  display: flex !important; align-items: center; justify-content: center;
}
#elementor-popup-modal-29878 .jet-ajax-search__submit svg { width: 20px !important; height: 20px !important; fill: var(--dsp-ink) !important; }
#elementor-popup-modal-29878 .jet-ajax-search__submit i { font-size: 20px !important; color: var(--dsp-ink) !important; }
#elementor-popup-modal-29878 .jet-ajax-search__submit:hover { background: var(--dsp-soft) !important; }

/* results panel – part of the same card */
#elementor-popup-modal-29878 .jet-ajax-search__results-area {
  position: static !important;
  width: auto !important;
  margin: 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--dsp-soft) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#elementor-popup-modal-29878 .jet-ajax-search__results-holder { padding: 8px !important; background: transparent !important; }
#elementor-popup-modal-29878 .jet-ajax-search__results-list { max-height: 56vh; overflow-y: auto; overscroll-behavior: contain; }
#elementor-popup-modal-29878 .jet-ajax-search__results-header,
#elementor-popup-modal-29878 .jet-ajax-search__results-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px !important; margin: 0 !important;
  background: transparent !important; border: 0 !important;
}
/* no paging arrows – results scroll instead */
#elementor-popup-modal-29878 .jet-ajax-search__results-header,
#elementor-popup-modal-29878 .jet-ajax-search__navigation-holder,
#elementor-popup-modal-29878 .jet-ajax-search__navigation-container,
#elementor-popup-modal-29878 .jet-ajax-search__navigate-button { display: none !important; }
#elementor-popup-modal-29878 .jet-ajax-search__results-list::-webkit-scrollbar { width: 6px; }
#elementor-popup-modal-29878 .jet-ajax-search__results-list::-webkit-scrollbar-thumb { background: var(--dsp-line); border-radius: 6px; }
#elementor-popup-modal-29878 .jet-ajax-search__results-header:empty,
#elementor-popup-modal-29878 .jet-ajax-search__results-footer:empty { display: none; }
#elementor-popup-modal-29878 .jet-ajax-search__results-count,
#elementor-popup-modal-29878 .jet-ajax-search__results-count * { font: 500 12px "Rubik", sans-serif !important; color: var(--dsp-muted) !important; }
#elementor-popup-modal-29878 .jet-ajax-search__full-results {
  width: 100% !important;
  margin: 4px 0 0 !important;
  padding: 11px 16px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--dsp-soft) !important;
  color: var(--dsp-ink) !important;
  font: 600 14px/1 "Rubik", sans-serif !important;
  box-shadow: none !important;
  transition: background .15s ease, color .15s ease;
}
#elementor-popup-modal-29878 .jet-ajax-search__full-results:hover { background: var(--dsp-black) !important; color: #fff !important; }
#elementor-popup-modal-29878 .jet-ajax-search__message,
#elementor-popup-modal-29878 .jet-ajax-search__results-area > div:not(.jet-ajax-search__results-holder) {
  font: 400 14px "Rubik", sans-serif !important;
  color: var(--dsp-muted) !important;
  text-align: center;
  padding: 14px !important;
  background: transparent !important;
}

/* ================= RESULT ROWS ================= */
body .jet-ajax-search .dc-sr {
  width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; box-sizing: border-box;
  margin: 0 0 2px !important; padding: 0 !important; border: 0 !important; background: transparent !important;
}
body .jet-ajax-search .dc-sr .jet-ajax-search__item-link {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 8px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 100% !important;
  box-sizing: border-box;
  text-decoration: none;
  transition: background .15s ease;
}
body .jet-ajax-search .dc-sr .jet-ajax-search__item-link:hover { background: var(--dsp-hover) !important; }
body .jet-ajax-search .dc-sr .jet-ajax-search__item-thumbnail {
  flex: 0 0 auto;
  margin: 0 !important;
  overflow: hidden;
}
body .jet-ajax-search .dc-sr .jet-ajax-search__item-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  display: block;
}
body .jet-ajax-search .dc-sr .jet-ajax-search__item-content-wrapper {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: right;
  padding: 0 !important; margin: 0 !important;
}
body .jet-ajax-search .dc-sr .jet-ajax-search__item-title {
  font-family: "Rubik", sans-serif !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
  color: var(--dsp-ink) !important;
  margin: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body .jet-ajax-search .dc-sr .jet-ajax-search__item-content { display: none !important; }
.dc-sr__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 600 11px/1 "Rubik", sans-serif;
  padding: 4px 8px;
  border-radius: 999px;
}
.dc-sr__badge svg { width: 11px; height: 11px; }
.dc-sr__cta {
  flex: 0 0 auto;
  margin-inline-start: auto; /* pin to the left edge (RTL end) */
  font: 600 12.5px/1 "Rubik", sans-serif;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

/* recipe */
body .jet-ajax-search .dc-sr--recipe .jet-ajax-search__item-thumbnail {
  width: 64px !important; height: 64px !important;
  border-radius: 12px;
}
body .jet-ajax-search .dc-sr--recipe .jet-ajax-search__item-thumbnail img { object-fit: cover; }
.dc-sr--recipe .dc-sr__badge { background: var(--dsp-peach); color: var(--dsp-ink); }
.dc-sr--recipe .dc-sr__cta { color: var(--dsp-ink); padding: 8px 0; }
.dc-sr--recipe .jet-ajax-search__item-link:hover .dc-sr__cta { text-decoration: underline; text-underline-offset: 3px; }
.dc-sr--recipe .jet-ajax-search__item-link:hover .dc-sr__cta { transform: translateX(-3px); }

/* product */
body .jet-ajax-search .dc-sr--product .jet-ajax-search__item-thumbnail {
  width: 64px !important; height: 64px !important;
  border-radius: 12px;
  background: var(--dsp-soft);
  padding: 5px;
  box-sizing: border-box;
}
body .jet-ajax-search .dc-sr--product .jet-ajax-search__item-thumbnail img { object-fit: contain; border-radius: 6px; }
.dc-sr--product .dc-sr__price,
.dc-sr--product .dc-sr__price * {
  font: 600 14px/1 "Rubik", sans-serif !important;
  color: var(--dsp-ink) !important;
  margin: 0 !important;
}
.dc-sr--product .dc-sr__price del,
.dc-sr--product .dc-sr__price del * { font-weight: 400 !important; color: var(--dsp-muted) !important; font-size: 12px !important; }
.dc-sr--product .dc-sr__price ins { text-decoration: none; }
.dc-sr--product .dc-sr__cta {
  background: var(--dsp-black);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
}
.dc-sr--product .jet-ajax-search__item-link:hover .dc-sr__cta { background: var(--dsp-peach); color: var(--dsp-ink); }

/* product meta row: price + stock label */
.dc-sr__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.dc-sr .dc-sr__stock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 500 11.5px/1 "Rubik", sans-serif !important;
  color: var(--dsp-ink) !important;
  white-space: nowrap;
}
.dc-sr .dc-sr__stock::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.dc-sr .dc-sr__stock--instock::before { background: var(--dsp-green); }
.dc-sr .dc-sr__stock--onbackorder::before { background: var(--dsp-peach); }
.dc-sr .dc-sr__stock--outofstock {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--dsp-pink);
}
.dc-sr .dc-sr__stock--outofstock::before { display: none; }

/* out of stock: muted image, outlined CTA */
body .jet-ajax-search .dc-sr--oos .jet-ajax-search__item-thumbnail img { opacity: .5; filter: grayscale(.6); }
.dc-sr--product.dc-sr--oos .dc-sr__cta { background: transparent; color: var(--dsp-ink); box-shadow: inset 0 0 0 1.5px var(--dsp-ink); }
.dc-sr--product.dc-sr--oos .jet-ajax-search__item-link:hover .dc-sr__cta { background: var(--dsp-ink); color: #fff; }

/* ================= MOBILE ================= */
@media (max-width: 767px) {
  /* keep the card in the upper part so the keyboard doesn't cover results */
  #elementor-popup-modal-29878 { align-items: flex-start !important; padding-top: 14vh !important; }
  #elementor-popup-modal-29878 .dialog-widget-content { width: calc(100vw - 24px) !important; max-height: 78vh !important; }
  #elementor-popup-modal-29878 .jet-ajax-search__field { font-size: 17px !important; height: 48px !important; }
  #elementor-popup-modal-29878 .jet-ajax-search__results-list { max-height: 52vh; }
  body .jet-ajax-search .dc-sr .jet-ajax-search__item-link { gap: 10px; }
  body .jet-ajax-search .dc-sr--recipe .jet-ajax-search__item-thumbnail,
  body .jet-ajax-search .dc-sr--product .jet-ajax-search__item-thumbnail { width: 54px !important; height: 54px !important; }
  body .jet-ajax-search .dc-sr .jet-ajax-search__item-title { font-size: 14px !important; }
  .dc-sr__cta { font-size: 12px; }
  .dc-sr--product .dc-sr__cta { padding: 7px 11px; }
}
