/* ==========================================================================
   Softbnb: search by name, the "Grouped drop" list under a Where field
   (owner's pick A, 20 Nov 2026). Drawn by js/name-suggest.js.

   Colours, radii and fonts are the design system's (css/softbnb-ds.css).
   Inside .sb-page the list reads the live tokens. The header search and the
   search page sit outside .sb-page, where common/headerH.blade.php defines
   other --sb-* values on :root, so the same values are repeated here for
   them, light and dark. Sizes are in px: the site's rem is 10px and a legacy
   page may not keep that.
   ========================================================================== */

.sb-ns {
  --ns-surface:       #FFFFFF;
  --ns-surface-2:     #F7F3EE;
  --ns-border:        #E7DFD6;
  --ns-border-strong: #D6CABB;
  --ns-text:          #1A1614;
  --ns-ink:           #14100E;
  --ns-muted:         #6B615A;
  --ns-focus:         #C8262B;
  --ns-r-md:          14px;
  --ns-r-sm:          8px;
  --ns-shadow:        0 2px 6px rgba(20, 16, 14, 0.05), 0 12px 28px rgba(20, 16, 14, 0.12);
  --ns-font-body:     "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ns-font-meta:     "Poppins", "Ubuntu", -apple-system, BlinkMacSystemFont, sans-serif;
  --ns-ease:          cubic-bezier(0.22, 1, 0.36, 1);
  box-sizing: border-box;
  /* A lit row never hides under the pinned top row or the foot row. */
  scroll-padding: 52px 0 40px;
  overscroll-behavior: contain;
}
body.dark-mode .sb-ns {
  --ns-surface:       #1A1614;
  --ns-surface-2:     #221D1A;
  --ns-border:        #332B26;
  --ns-border-strong: #4A3F37;
  --ns-text:          #F1EAE4;
  --ns-ink:           #F5F0EB;
  --ns-muted:         #A99E95;
  --ns-focus:         #FF6B6F;
  --ns-shadow:        0 2px 6px rgba(0, 0, 0, 0.45), 0 12px 28px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
body .sb-page .sb-ns,
body .sb-modal .sb-ns {
  --ns-surface:       var(--sb-surface);
  --ns-surface-2:     var(--sb-surface-2);
  --ns-border:        var(--sb-border);
  --ns-border-strong: var(--sb-border-strong);
  --ns-text:          var(--sb-text);
  --ns-ink:           var(--sb-ink);
  --ns-muted:         var(--sb-muted);
  --ns-focus:         var(--sb-focus);
  --ns-r-md:          var(--sb-r-md);
  --ns-r-sm:          var(--sb-r-sm);
  --ns-font-body:     var(--sb-font-body);
  --ns-font-meta:     var(--sb-font-meta);
}
.sb-ns *,
.sb-ns *::before,
.sb-ns *::after { box-sizing: border-box; }

/* The list on the header search, the search page and the classic home: it floats under the field. */
.sb-ns--float {
  position: absolute; z-index: 100000;
  background: var(--ns-surface);
  border: 1px solid var(--ns-border);
  border-radius: var(--ns-r-md);
  box-shadow: var(--ns-shadow);
  padding: 6px;
  overflow-y: auto;
  text-align: left;
  animation: sb-ns-in 220ms var(--ns-ease) both;
}
.sb-ns[hidden] { display: none !important; }
@keyframes sb-ns-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* The list grows to its new height (set by the script) instead of jumping. */
.sb-ns.is-sizing { overflow: hidden; transition: height 450ms var(--ns-ease); }

/* The premium home's own list (.sb-ac): taller, and from tablet width up wider
   than the Where box, so names and prices never cut off. */
@media (min-width: 768px) {
  .sb-ac.sb-ns { right: auto; width: max(100%, 500px); max-width: calc(100vw - 32px); max-height: min(70vh, 560px); }
}

/* ── Group heading ─────────────────────────────────────────────────────── */
.sb-ns__group + .sb-ns__group { margin-top: 4px; }
.sb-ns__kick {
  display: flex; align-items: center;
  height: 22px; margin: 0; padding: 0 8px;
  font-family: var(--ns-font-meta); font-size: 10.5px; font-weight: 500; line-height: 1;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ns-muted);
}

/* ── Rows ──────────────────────────────────────────────────────────────── */
.sb-ns__row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 50px; padding: 4px 8px;
  border-radius: var(--ns-r-sm);
  font-family: var(--ns-font-meta);
  color: var(--ns-text); text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a.sb-ns__row:hover,
a.sb-ns__row:focus { color: var(--ns-text); text-decoration: none; }
.sb-ns__row--place { min-height: 44px; }
.sb-ns__row:hover,
.sb-ns__row.is-active { background: var(--ns-surface-2); }
/* The lit row (arrow keys) also carries a ring: colour alone is not enough. */
.sb-ns__row.is-active { outline: 2px solid var(--ns-focus); outline-offset: -2px; }
.sb-ns__row.is-going { background: var(--ns-surface-2); transform: scale(0.98); transition: transform 160ms ease; }

/* Fixed box for the cover photo or the pin, so nothing jumps while a photo loads. */
.sb-ns__th {
  flex: none; width: 38px; height: 38px;
  border-radius: var(--ns-r-sm); overflow: hidden;
  display: grid; place-items: center;
  background: var(--ns-surface-2); color: var(--ns-muted);
}
/* 34 + 2 + 2: the place names line up with the listing names below them. */
.sb-ns__row--place .sb-ns__th { width: 34px; height: 34px; margin: 0 2px; }
.sb-ns__th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sb-ns__row:hover .sb-ns__th--icon,
.sb-ns__row.is-active .sb-ns__th--icon { background: var(--ns-surface); }

.sb-ns__tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sb-ns__mn {
  font-family: var(--ns-font-body); font-size: 15px; font-weight: 400; line-height: 1.25;
  color: var(--ns-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-ns__hl { font-weight: 700; color: var(--ns-ink); }
.sb-ns__sb {
  font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--ns-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-ns__chip {
  display: inline-block; margin-right: 6px; padding: 0 8px;
  border-radius: 999px;
  background: var(--ns-surface-2); color: var(--ns-text);
  font-size: 11px; font-weight: 500; font-style: normal; line-height: 18px;
  vertical-align: 1px;
}
.sb-ns__row:hover .sb-ns__chip,
.sb-ns__row.is-active .sb-ns__chip { background: var(--ns-surface); }

.sb-ns__pr {
  flex: none; display: flex; flex-direction: column; text-align: right;
  font-size: 11px; line-height: 1.35; color: var(--ns-muted); white-space: nowrap;
}
.sb-ns__pr b {
  font-family: var(--ns-font-body); font-size: 14px; font-weight: 700;
  color: var(--ns-text); font-variant-numeric: tabular-nums;
}
.sb-ns__ct { flex: none; font-size: 12px; color: var(--ns-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── The plain lines: no such place, nothing at all ────────────────────── */
.sb-ns__msg {
  margin: 0; padding: 10px 8px;
  font-family: var(--ns-font-meta); font-size: 13.5px; line-height: 1.5; text-align: left;
  color: var(--ns-muted);
}
.sb-ns__msg b { color: var(--ns-text); font-weight: 500; overflow-wrap: anywhere; }

/* ── Foot row: the keys, on a computer only ────────────────────────────── */
.sb-ns__foot { display: none; }
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .sb-ns.has-rows .sb-ns__foot {
    position: sticky; bottom: -6px; z-index: 1;
    display: flex; align-items: center; gap: 6px;
    height: 34px; margin: 6px -6px -6px; padding: 0 14px;
    border-top: 1px solid var(--ns-border);
    background: var(--ns-surface);
    font-family: var(--ns-font-meta); font-size: 12px; color: var(--ns-muted); white-space: nowrap;
  }
  .sb-ns__foot i { font-style: normal; opacity: 0.6; }
  .sb-ns__foot kbd {
    padding: 1px 6px;
    border: 1px solid var(--ns-border-strong); border-radius: 5px;
    background: none; box-shadow: none;
    font-family: var(--ns-font-body); font-size: 11px; font-weight: 500; line-height: 1.5;
    color: var(--ns-muted);
  }
}

/* For screen readers only: how many suggestions, or the plain line. */
.sb-ns__sr {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Motion: rows settle in order, one after another ───────────────────── */
.sb-ns .is-new {
  animation: sb-ns-fade 300ms ease both, sb-ns-drop 520ms var(--ns-ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes sb-ns-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sb-ns-drop { from { transform: translateY(-8px); } to { transform: none; } }

/* Reduce Motion: rows just appear, the list does not grow or drop. */
@media (prefers-reduced-motion: reduce) {
  .sb-ns,
  .sb-ns *,
  .sb-ns .is-new { animation: none !important; transition: none !important; }
}
