/* The search sheet the hero's pill opens in place (partials/search-sheet.php, assets/search-sheet.js).
   On a phone it fills the screen; on a wider screen it is a panel over the dimmed page. Cards on a soft canvas,
   one open at a time, and a footer with "Clear all" and the way on. */
html.ss-lock { overflow: hidden; }
.ss { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.ss:not([open]) { display: none; }
.ss::backdrop { background: rgba(29, 27, 44, .44); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: opacity .32s ease; animation: ss-fade .32s ease; }
.ss.is-closing::backdrop { opacity: 0; }
@keyframes ss-fade { from { opacity: 0; } }
.ss-panel { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--canvas); }

.ss-top { position: relative; display: flex; flex: none; align-items: center; justify-content: center; min-height: 64px; padding: calc(8px + env(safe-area-inset-top)) 64px 4px; }
.ss-close { position: absolute; left: 14px; top: calc(13px + env(safe-area-inset-top)); display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); cursor: pointer; box-shadow: 0 2px 6px rgba(29, 27, 44, .08); transition: transform .15s ease; }
.ss-close:hover { transform: scale(1.06); }
.ss-close .ic { width: 15px; height: 15px; stroke-width: 2.3; }
.ss-title { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.ss-title:focus { outline: none; }

.ss-body { position: relative; flex: 1; min-height: 0; padding: 4px 12px 24px; overflow-y: auto; overscroll-behavior: contain; }
.ss-card { margin-top: 12px; border-radius: 24px; background: var(--card); box-shadow: 0 1px 2px rgba(29, 27, 44, .06), 0 8px 20px -14px rgba(29, 27, 44, .3); transition: box-shadow .25s ease; }
.ss-card:first-child { margin-top: 4px; }
.ss-card.is-open { box-shadow: 0 2px 4px rgba(29, 27, 44, .05), 0 18px 40px -16px rgba(29, 27, 44, .42); }
.ss-head { margin: 0; font: inherit; }
.ss-head button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 62px; padding: 16px 20px; border: 0; border-radius: 24px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ss-label { flex: none; font-size: 15px; color: var(--ink-3); }
.ss-sum { min-width: 0; overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ss-sum.is-guess { color: var(--ink-2); font-weight: 500; }
.ss-ask { display: none; font-size: 24px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.ss-card.is-open .ss-head button { min-height: 0; padding: 22px 20px 6px; cursor: default; }
/* The open card's head is its question: focus shows as an underline there, not a ring round the title. */
.ss-head button:focus { outline: none; }
.ss-head button:focus-visible { box-shadow: inset 0 0 0 2px var(--violet); }
.ss-card.is-open .ss-head button:focus-visible { box-shadow: none; }
.ss-card.is-open .ss-head button:focus-visible .ss-ask { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.ss-card.is-open :is(.ss-label, .ss-sum) { display: none; }
.ss-card.is-open .ss-ask { display: block; }
.ss-content { padding: 10px 20px 20px; }
.ss-content[hidden] { display: none; }

/* Who: the chosen faces, the search, then the most booked or what the search finds */
/* The chosen faces sit on one line that slides sideways, so the search below never jumps. */
.ss-chosen { display: flex; gap: 8px; margin: 0 -20px 14px; padding: 0 20px; overflow-x: auto; list-style: none; scrollbar-width: none; }
.ss-chosen::-webkit-scrollbar { display: none; }
.ss-chosen[hidden] { display: none; }
.ss-chip { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 40px; padding: 0 1px 0 4px; border-radius: 999px; background: var(--lilac-2); font-size: 14px; font-weight: 600; animation: ss-chip .28s cubic-bezier(.2, .9, .3, 1.3); }
.ss-chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #fff; }
.ss-drop { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color .2s ease; }
.ss-drop:hover { background: rgba(29, 27, 44, .08); }
.ss-drop .ic { width: 13px; height: 13px; stroke-width: 2.4; }
@keyframes ss-chip { from { opacity: 0; transform: scale(.85); } }
.ss-search { position: relative; display: flex; align-items: center; }
.ss-search > .ic { position: absolute; left: 17px; width: 18px; height: 18px; color: var(--ink-2); pointer-events: none; }
.ss-search input { width: 100%; height: 56px; padding: 0 50px 0 46px; border: 1px solid #CFC9DB; border-radius: 16px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; transition: border-color .2s ease, box-shadow .2s ease; }
.ss-search input::placeholder { color: var(--ink-3); }
.ss-search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ss-search input::-webkit-search-cancel-button { display: none; }
.ss-q-clear { position: absolute; right: 9px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: var(--lilac-2); color: var(--ink); cursor: pointer; }
.ss-q-clear[hidden] { display: none; }
.ss-q-clear .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.ss-status { margin: 12px 4px 0; font-size: 14.5px; color: var(--ink-2); }
.ss-status:empty { display: none; }
.ss-sub { margin: 20px 4px 6px; font-size: 12.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.ss-rows { margin: 4px -8px 0; padding: 0; list-style: none; }
.ss-rows[hidden], [data-ss-popular][hidden] { display: none; }
.ss-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px; border: 0; border-radius: 16px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color .2s ease; }
.ss-row:hover { background: var(--canvas); }
.ss-row img { flex: none; width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: var(--lilac-2); }
.ss-who { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.ss-who b { overflow: hidden; font-size: 16px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ss-who small { font-size: 14px; color: var(--ink-3); }
/* The round mark: a plus to add, a filled tick once the character is coming */
.ss-tick { position: relative; display: grid; flex: none; place-items: center; width: 32px; height: 32px; border: 1.5px solid #CFC9DB; border-radius: 50%; color: #fff; transition: background-color .2s ease, border-color .2s ease, transform .2s ease; }
.ss-tick::before, .ss-tick::after { content: ''; position: absolute; width: 12px; height: 2px; border-radius: 2px; background: var(--ink); transition: opacity .15s ease; }
.ss-tick::after { transform: rotate(90deg); }
.ss-tick .ic { width: 16px; height: 16px; stroke-width: 2.6; opacity: 0; transition: opacity .15s ease; }
.ss-row:hover .ss-tick { border-color: var(--ink); }
.ss-row[aria-pressed="true"] .ss-tick { border-color: var(--ink); background: var(--ink); transform: scale(1.05); }
.ss-row[aria-pressed="true"] .ss-tick::before, .ss-row[aria-pressed="true"] .ss-tick::after { opacity: 0; }
.ss-row[aria-pressed="true"] .ss-tick .ic { opacity: 1; }
.ss-all { display: inline-block; margin: 12px 4px 0; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ss-none { margin: 12px 4px 0; font-size: 15px; color: var(--ink-2); }
.ss-none[hidden] { display: none; }

/* Where and when: the booking fields of the party page, set inside the cards */
.ss .pf { gap: 18px; }
.ss [data-pf-row="place"] .pf-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ss .find-box { border-radius: 16px; }
.ss-note { margin: 12px 4px 0; font-size: 14px; color: var(--ink-3); }
/* Until the place search and the calendar load, the place waits faded and the day under its "Loading" line. */
.ss-wait { margin: 12px 4px 0; font-size: 14px; color: var(--ink-2); }
.ss-wait[hidden] { display: none; }
.ss [data-ss-card="where"] .pf[inert] { opacity: .5; }
.ss [data-ss-card="when"] .pf[inert], .ss .pf-native { display: none; }

.ss-foot { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.ss-clear { padding: 10px 2px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ss-clear:disabled { color: var(--ink-3); text-decoration: none; opacity: .55; cursor: default; }
.ss-go { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px; border-radius: 14px; background: var(--dusk); color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; transition: background-color .2s ease; }
.ss-go:hover { background: var(--dusk-2); }
.ss-go .ic { width: 18px; height: 18px; stroke-width: 2.1; }
.ss-go.is-last { background: linear-gradient(100deg, var(--dusk) 0%, var(--violet) 100%); }

@media (min-width: 761px) {
  .ss-panel { inset: 6vh 0 auto; width: min(640px, calc(100% - 48px)); height: auto; max-height: 88vh; margin: 0 auto; border-radius: 28px; box-shadow: 0 40px 90px -30px rgba(29, 27, 44, .6); }
  .ss-top { min-height: 68px; padding: 10px 72px 0; }
  .ss-close { top: 15px; left: 18px; }
  .ss-body { padding: 4px 18px 24px; }
  .ss-foot { padding: 14px 24px; border-radius: 0 0 28px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .ss::backdrop, .ss-chip { animation: none; }
}
