/*
 * search.css — the search panel (search.js, operator 2026-10-21): a card as tall as what it shows —
 * never the whole screen, no empty space below the results (operator 2026-10-21) — near the top of a
 * phone, centred under the header on wider screens, the page dimmed around it. The store's coral
 * (#c2493f: white on it is 4.9:1).
 */
html.ncllc-sf-search-open, html.ncllc-sf-search-open body { overflow: hidden; }

.ncllc-sf-search {
  position: fixed; inset: 0; z-index: 100000; display: flex; justify-content: center; align-items: flex-start;
  box-sizing: border-box; padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px;
  font-size: 16px; line-height: 1.35; color: #1d1d1f;
}
.ncllc-sf-search__overlay { position: absolute; inset: 0; background: rgba(20, 14, 12, .55); }
.ncllc-sf-search__sheet {
  position: relative; box-sizing: border-box; display: flex; flex-direction: column;
  width: 100%; height: auto; background: #fff; overflow: hidden; border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3); padding: 12px 12px 0;
  /* As tall as its results, at most the screen less a margin (dvh: the visible screen on phones). */
  max-height: calc(100vh - 20px - env(safe-area-inset-top, 0px));
  max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px));
}

.ncllc-sf-search__form { display: flex; align-items: center; gap: 10px; margin: 0; }
.ncllc-sf-search__field { position: relative; flex: 1 1 auto; min-width: 0; }
.ncllc-sf-search__field::before {
  /* The magnifying glass, drawn: no icon font needed. */
  content: ""; position: absolute; left: 16px; top: 50%; width: 14px; height: 14px; margin-top: -9px;
  border: 2.5px solid #8a7f7c; border-radius: 50%; pointer-events: none;
}
.ncllc-sf-search__field::after {
  content: ""; position: absolute; left: 30px; top: 50%; width: 7px; height: 2.5px; margin-top: 4px;
  background: #8a7f7c; border-radius: 2px; transform: rotate(45deg); pointer-events: none;
}
.ncllc-sf-search .ncllc-sf-search__input {
  box-sizing: border-box; width: 100%; height: 52px; margin: 0; padding: 0 16px 0 46px;
  /* 16px or more: a phone does not zoom the page in when the box is tapped. */
  font-size: 18px; font-family: inherit; color: #1d1d1f; background: #f6f2f1;
  border: 2px solid transparent; border-radius: 26px; box-shadow: none; outline: none;
  -webkit-appearance: none; appearance: none;
}
.ncllc-sf-search .ncllc-sf-search__input::placeholder { color: #8a7f7c; opacity: 1; }
.ncllc-sf-search .ncllc-sf-search__input:focus { background: #fff; border-color: #c2493f; }
.ncllc-sf-search__input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.ncllc-sf-search .ncllc-sf-search__cancel {
  flex: 0 0 auto; min-height: 44px; margin: 0; padding: 0 4px; font: inherit; font-weight: 600;
  color: #c2493f; background: none; border: 0; box-shadow: none; cursor: pointer;
}

.ncllc-sf-search__status { margin: 10px 4px 2px; font-size: 14px; color: #6b6260; }
.ncllc-sf-search__status:empty { display: none; }   /* no blank line before anything is typed */
.ncllc-sf-search__body {
  flex: 0 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  margin: 0 -12px; padding: 0 12px 12px;
}

/* Two groups (dishes, then pages and articles): each its own heading. */
.ncllc-sf-search__group + .ncllc-sf-search__group { margin-top: 6px; border-top: 1px solid #f0e9e7; }
.ncllc-sf-search h2.ncllc-sf-search__label { margin: 12px 4px 4px; }
.ncllc-sf-search__page-box {
  display: flex; align-items: center; justify-content: center; width: 56px; height: 44px;
  border-radius: 10px; background: #fff4f2; color: #c2493f;
}
.ncllc-sf-search__page-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ncllc-sf-search .ncllc-sf-search__link--page { grid-template-columns: 56px minmax(0, 1fr); }

.ncllc-sf-search__results { list-style: none; margin: 0; padding: 0; }
.ncllc-sf-search__item { margin: 0; padding: 0; border-bottom: 1px solid #f0e9e7; }
.ncllc-sf-search__item:last-child { border-bottom: 0; }
.ncllc-sf-search .ncllc-sf-search__link {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 4px; color: inherit; text-decoration: none; border-radius: 12px;
}
.ncllc-sf-search .ncllc-sf-search__link:hover, .ncllc-sf-search .ncllc-sf-search__link:focus-visible { background: #fbf3f2; outline: none; }
.ncllc-sf-search .ncllc-sf-search__link:focus-visible { box-shadow: 0 0 0 2px #c2493f; }
.ncllc-sf-search__img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: #f6f2f1; }
.ncllc-sf-search__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ncllc-sf-search__name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.ncllc-sf-search__name mark { background: none; color: #c2493f; font-weight: 800; padding: 0; }
.ncllc-sf-search__meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: #6b6260; }
.ncllc-sf-search__cat { text-transform: capitalize; }
.ncllc-sf-search__out { color: #a3352d; font-weight: 600; }
.ncllc-sf-search__price { font-size: 16px; font-weight: 800; white-space: nowrap; text-align: right; }

/* While searching: grey rows the shape of the results, gently pulsing (still for reduced motion). */
.ncllc-sf-search__bone { display: block; background: #e8dcd9; border-radius: 6px; animation: ncllc-sf-search-pulse 1.1s ease-in-out infinite alternate; }
.ncllc-sf-search__bone--img { width: 56px; height: 56px; border-radius: 10px; }
.ncllc-sf-search__bone--name { width: 70%; height: 16px; margin: 2px 0 6px; }
.ncllc-sf-search__bone--meta { width: 40%; height: 12px; }
.ncllc-sf-search__bone--price { width: 56px; height: 16px; }
.ncllc-sf-search__skeleton .ncllc-sf-search__item:nth-child(2) .ncllc-sf-search__bone--name { width: 55%; }
.ncllc-sf-search__skeleton .ncllc-sf-search__item:nth-child(3) .ncllc-sf-search__bone--name { width: 80%; }
.ncllc-sf-search__skeleton .ncllc-sf-search__item:nth-child(4) .ncllc-sf-search__bone--name { width: 48%; }
@keyframes ncllc-sf-search-pulse { from { opacity: 1; } to { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .ncllc-sf-search__bone { animation: none; } }

.ncllc-sf-search .ncllc-sf-search__all {
  display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 12px 0 4px;
  font-weight: 700; color: #fff; background: #c2493f; border-radius: 24px; text-decoration: none;
}
.ncllc-sf-search .ncllc-sf-search__all:hover, .ncllc-sf-search .ncllc-sf-search__all:focus-visible { background: #a83d34; color: #fff; }

.ncllc-sf-search__browse { padding: 4px 0 8px; }
.ncllc-sf-search__label { margin: 8px 4px 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6b6260; }
.ncllc-sf-search__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ncllc-sf-search .ncllc-sf-search__chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; font-size: 15px; font-weight: 600;
  color: #8a2f28; background: #fff4f2; border: 1px solid #f1d4cf; border-radius: 20px; text-decoration: none;
  text-transform: capitalize;
}
.ncllc-sf-search .ncllc-sf-search__chip:hover, .ncllc-sf-search .ncllc-sf-search__chip:focus-visible { background: #c2493f; border-color: #c2493f; color: #fff; outline: none; }

/* Wider screens: a panel under the header, the page still visible around it. */
@media (min-width: 700px) {
  .ncllc-sf-search { padding: 8vh 24px 24px; }
  .ncllc-sf-search__sheet {
    width: 640px; max-width: 100%; max-height: 84vh; padding: 16px 16px 0;
    border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  }
  .ncllc-sf-search__body { margin: 0 -16px; padding: 0 16px 16px; }
}
