/* Grocerz search panel for the Laravel site: the same look as the React site's
   (copied from src/app/globals.css by search/live/widget/build.mjs). */
.gz-search-standalone[hidden] { display: none !important; }
.gz-search-standalone { position: fixed; inset: 0; z-index: 100000; text-align: left; line-height: 1.4; font-family: 'Campton', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #000; }
.gz-search-standalone *, .gz-search-standalone *::before, .gz-search-standalone *::after { box-sizing: border-box; }
.gz-search-standalone ul { margin: 0; padding: 0; list-style: none; }
.gz-search-standalone h3, .gz-search-standalone p { margin-top: 0; }
.gz-search-standalone h3 { font-family: 'Campton', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.gz-search-standalone a { text-decoration: none; }
.gz-search-standalone button, .gz-search-standalone input { font: inherit; }
.gz-search-standalone button { cursor: pointer; }
.gz-search-standalone .gz-search-close { width: 30px; height: 30px; margin-left: 12px; padding: 0; border: none; background: none; color: #000; font-size: 30px; line-height: 1; font-family: monospace; display: flex; align-items: center; justify-content: center; }
.gz-search-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); }
.gz-search-field svg.gz-search-icon { color: #777; flex: none; }
body.gz-search-open { overflow: hidden; }

/* ---- Search panel (HeaderSearch): a centred panel on desktop, a full-screen
   sheet on phones with a back arrow, clear button, chips and big tap rows. ---- */
.gz-search .gz-search-sheet {
  position: absolute;
  z-index: 1000;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  width: min(820px, calc(100% - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.2);
  overflow: hidden;
}
.gz-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #ececec;
}
.gz-search-back {
  display: none;
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f2;
  color: #000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.gz-search-field {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
}
.gz-search-field .gz-search-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.gz-search-field input {
  width: 100%;
  min-width: 0;
  height: 48px;
  box-sizing: border-box;
  padding: 0 76px 0 44px;
  border: 2px solid var(--var-green-1);
  border-radius: 40px;
  background: #fff;
  font: inherit;
  font-size: 16px; /* 16px: iPhones don't zoom in */
  color: #000;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.gz-search-field input::-webkit-search-cancel-button {
  display: none;
}
.gz-search-field input:focus {
  box-shadow: 0 0 0 4px rgb(72 183 63 / 0.18);
}
.gz-search-clear {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #ececec;
  color: #000;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.gz-search-spinner {
  position: absolute;
  right: 48px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--var-green-1);
  border-right-color: transparent;
  border-radius: 50%;
  animation: address-spin 0.7s linear infinite;
}
.gz-search-close {
  flex: none;
}
.gz-search-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 20px 20px;
  -webkit-overflow-scrolling: touch;
}
.gz-search-section {
  padding-top: 16px;
}
.gz-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.gz-search-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #000;
}
.gz-search-link {
  border: 0;
  background: none;
  padding: 4px 0;
  font: inherit;
  font-size: 14px;
  color: var(--var-green-text);
  text-decoration: underline;
  cursor: pointer;
}
.gz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.gz-chips-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin-right: -20px;
  padding-right: 20px;
}
.gz-chips-scroll::-webkit-scrollbar {
  display: none;
}
.gz-chip {
  display: flex;
  align-items: center;
  flex: none;
  border: 1px solid #dcdcdc;
  border-radius: 40px;
  background: #fff;
}
.gz-chip a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px 7px;
  color: #000;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.gz-chip:hover,
.gz-chip.is-active {
  border-color: var(--var-green-1);
  background: #f0faf0;
}
.gz-chip small {
  color: #6b6b6b;
  font-size: 12px;
}
.gz-chip-recent a {
  padding-right: 4px;
}
.gz-chip-recent button {
  width: 30px;
  height: 30px;
  margin-right: 4px;
  border: 0;
  background: none;
  color: #6b6b6b;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.gz-chip-cat a {
  font-weight: 500;
}
.gz-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.gz-results a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #000;
  text-decoration: none;
}
.gz-results a:hover,
.gz-results li.is-active a {
  border-color: var(--var-green-1);
  background: #f0faf0;
}
.gz-result-img {
  flex: none;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #ececec;
  overflow: hidden;
}
.gz-result-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gz-result-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.gz-result-name {
  font-size: 15px;
  line-height: 1.3;
}
.gz-result-name strong {
  font-weight: 700;
}
.gz-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 13px;
  color: #6b6b6b;
}
.gz-result-out {
  color: #8a5a00;
}
.gz-result-go {
  flex: none;
  color: #9a9a9a;
}
.gz-search-note {
  margin: 16px 0 10px;
  font-size: 15px;
  line-height: 1.4;
  color: #333;
}
.search-related-note {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff8e1;
  font-size: 15px;
}
.gz-search-related {
  margin: 4px 0 4px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff8e1;
  font-size: 14px;
}
.gz-search-foot {
  padding: 12px 20px;
  border-top: 1px solid #ececec;
  background: #fff;
}
.gz-search-all {
  display: block;
  padding: 14px 16px 12px;
  border-radius: 40px;
  background: var(--var-green-1);
  color: #fff;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gz-search-all:hover {
  background: var(--var-yellow-1);
  color: #000;
}

/* Phones: the whole screen, back arrow instead of ×, results above the keyboard. */
@media (max-width: 767px) {
  .gz-search .gz-search-sheet {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-height: none;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .gz-search-bar {
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
    gap: 8px;
  }
  .gz-search-back {
    display: flex;
  }
  .gz-search-close {
    display: none !important;
  }
  .gz-search-field input {
    height: 46px;
  }
  .gz-search-body {
    padding: 4px 16px 16px;
  }
  .gz-chips-scroll {
    margin-right: -16px;
    padding-right: 16px;
  }
  .gz-search-foot {
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }
}

