/* finder.css: the home page's "What are you looking for?" box in the hero, its type-ahead list and the answer panel under it. Its movement is in motion.css. */

/* the hero makes room: words and photo share the width evenly, the answers get a full row under both */
.finder { position: relative; max-width: 580px; margin: 22px 0 20px; scroll-margin-top: 14px; }
.hero.has-finder .btn-outline { min-height: 48px; padding: 10px 30px; margin-top: 4px; font-size: 15px; }
.finder-label { display: block; margin: 0 0 10px; font: 700 clamp(1.05rem, 1.5vw, 1.3rem)/1.25 var(--display); color: var(--forest); }

/* the box: one pill holding the icon, the field and the button; the mustard ring shows where the keyboard is */
.finder-box { position: relative; display: flex; align-items: center; gap: 4px; min-height: 60px; padding: 6px 6px 6px 18px; background: #fff; border: 1.5px solid var(--forest); border-radius: 30px; box-shadow: 0 1px 2px rgba(23, 35, 28, .06), 0 14px 28px -16px rgba(23, 35, 28, .35); }
.finder-box:focus-within { box-shadow: 0 0 0 4px var(--mustard), 0 14px 28px -16px rgba(23, 35, 28, .35); }
.finder-ico { flex: none; color: var(--sage); }
.finder-input { flex: 1; min-width: 0; height: 46px; padding: 0 8px; border: 0; border-radius: 0; background: none; color: var(--ink); font: 400 17px/1.3 var(--font); -webkit-appearance: none; appearance: none; }
.finder-input:focus, .finder-input:focus-visible { outline: none; box-shadow: none; }
.finder-input::placeholder { color: #5b6168; opacity: 1; }
.finder-input::-webkit-search-cancel-button, .finder-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.finder-clear, .finder-go { flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; cursor: pointer; }
.finder-clear { width: 40px; height: 40px; background: none; color: var(--ink-2); }
.finder-clear:hover { background: var(--ground); color: var(--ink); }
.finder-clear[hidden] { display: none; }
.finder-go { width: 48px; height: 48px; background: var(--forest); color: #fff; }
.finder-go:hover { background: var(--forest-dark); }
.finder.is-busy .finder-go { background: var(--sage); }

/* the list under the box while typing: a few products, each a full-width row easy to tap */
.finder-list { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 2px 6px rgba(23, 35, 28, .06), 0 22px 44px -18px rgba(23, 35, 28, .4); }
.finder-list[hidden] { display: none; }
.finder-opt { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 5px 10px; border-radius: 12px; cursor: pointer; }
.finder-opt:hover { background: var(--ground); }
.finder-opt.is-active { background: var(--forest-tint); box-shadow: inset 0 0 0 2px var(--forest); }
.finder-opt-img { flex: none; width: 66px; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 6px; background: var(--forest); }
.finder-opt-img img, .finder-opt-img .ph-empty { width: 100%; height: 100%; object-fit: cover; }
.finder-opt-img.is-contain, .finder-card .pcard-img.is-contain { background: var(--ground); }
.finder-opt-img.is-contain img, .finder-card .pcard-img.is-contain img { object-fit: contain; }
.finder-opt-t { display: grid; min-width: 0; line-height: 1.3; }
.finder-opt-n { font-weight: 600; color: var(--ink); }
.finder-opt-s { font-size: .86rem; color: var(--ink-2); }

/* examples: one line that scrolls sideways when it runs out of room, fading at the right edge */
.finder-chips { display: flex; gap: 8px; margin: 10px -20px 0 -4px; padding: 4px 28px 4px 4px; list-style: none; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
.finder-chips::-webkit-scrollbar { display: none; }
.finder-chips li { flex: none; }
.finder-chip { min-height: 40px; padding: 8px 15px; border: 1px solid #c3cfc8; border-radius: 999px; background: #fff; color: var(--forest-dark); font: 400 14px/1.2 var(--font); white-space: nowrap; cursor: pointer; }
.finder-chip:hover { border-color: var(--forest); background: var(--forest-tint); }

/* the answers: a row of the hero under the words and the photo */
.finder-results { background: var(--ground); border-top: 1px solid var(--rule, #dfe3df); padding: 26px 20px 30px; }
.finder-results[hidden] { display: none; }
.finder-results-in { max-width: 1290px; margin: 0 auto; }
/* the loading cards hold about the height the answer will take, so nothing below jumps when it arrives */
.finder-results.is-loading .finder-results-in, .finder-results.has-picks .finder-results-in { min-height: calc(410px + var(--n, 3) * 172px); }
.finder-h { margin: 0 0 6px; font: 400 clamp(1.15rem, 1.9vw, 1.45rem)/1.25 var(--display); color: var(--forest); }
.finder-h.is-wait { color: var(--ink-2); }
.finder-reply { max-width: 70ch; margin: 0; color: var(--text); }
.finder-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.finder-card a { background: #fff; box-shadow: 0 1px 2px rgba(23, 35, 28, .05), 0 10px 22px -16px rgba(23, 35, 28, .3); }
.finder-card .pcard-body { padding: 12px 14px 14px; gap: 6px; }
.finder-why { margin: 0; font-size: .9rem; line-height: 1.4; color: var(--forest-dark); }
.finder-card .lowas strong { white-space: nowrap; }
.finder-skel-in { display: flex; flex-direction: column; height: 100%; background: #fff; }
.finder-skel .pcard-img { background: #dfe6e1; }
.finder-skel-l { height: 12px; margin: 4px 0 8px; border-radius: 6px; background: #dfe6e1; }
.finder-skel-l.is-short { width: 45%; }

/* what to do next: the campaign builder, a quote, or one more detail */
.finder-next { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 36px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule, #dfe3df); }
.finder-way { margin: 0; color: var(--text); }
.finder-link { font-weight: 600; color: var(--forest); text-underline-offset: 4px; white-space: nowrap; }
.finder-arrow { display: inline-block; margin-left: 6px; }
.finder-link.is-strong { display: inline-flex; align-items: center; min-height: 44px; margin-left: 6px; padding: 8px 22px; border: 1px solid var(--forest); border-radius: 999px; background: #fff; text-decoration: none; }
.finder-link.is-strong:hover { background: var(--forest); color: #fff; }
.finder-refine { flex: 1 1 320px; max-width: 520px; margin: 0 0 0 auto; }
.finder-refine-l { display: block; margin-bottom: 6px; font-weight: 600; font-size: .95rem; }
.finder-refine-row { display: flex; gap: 8px; }
.finder-refine-i { flex: 1; min-width: 0; }
.finder-note { margin: 18px 0 0; font-size: .82rem; line-height: 1.5; color: var(--ink-2); max-width: 90ch; }

/* phones: one answer per row, photo beside the words, and the answers come right under the box */
@media (max-width: 599px) {
  .finder-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .finder-card a, .finder-skel-in { flex-direction: row; }
  .finder-skel-in { min-height: 160px; }
  .finder-card .pcard-img { flex: none; width: 38%; aspect-ratio: 1 / 1; }
  .finder-card .pcard-body { padding: 10px 12px 12px; }
}
@media (max-width: 899px) {
  .hero.is-answering .finder-chips, .hero.is-answering .hero-text > .muted, .hero.is-answering .hero-text > .btn-outline { display: none; }
  .hero.is-answering .finder { margin-bottom: 4px; }
}
@media (min-width: 760px) {
  .finder-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .finder-results.is-loading .finder-results-in, .finder-results.has-picks .finder-results-in { min-height: 590px; }
  .finder-results { padding: 30px 20px 36px; }
}
@media (min-width: 900px) {
  .hero.has-finder { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero.has-finder .hero-text { grid-column: 1; grid-row: 1; }
  .hero.has-finder .hero-media { grid-column: 2; grid-row: 1; }
  .finder-results { grid-column: 1 / -1; grid-row: 2; padding-left: var(--hero-inset, 75px); padding-right: var(--hero-inset, 75px); }
  .finder-results-in { margin: 0; }
}
@media (max-width: 480px) {
  .finder-input { font-size: 16px; }
  .finder-box { padding-left: 14px; }
  .finder-refine-row { flex-direction: column; }
  .finder-refine { margin-left: 0; }
}
