/* Jack plate finder, light version. Tokens come from base.css. No frame around it: label and buttons sit right on the band.
   Variant A, "one black" (Egor 10.11): answers are dark cards on the band, the same surfaces as the big finder.
   One block of a fixed height: a step replaces the step before it, nothing scrolls inside.
   Two layouts: narrow is a phone or a tight column, wide has three buttons and three answers in a row.
   The height is the tallest answer on that layout. tools/product-finder/cfg/steps.mjs checks every branch against it. */
.finder-grid > * { min-width: 0; }
.bmf { --bmf-h: 384px; position: relative; display: flex; flex-direction: column; height: var(--bmf-h); color: #fff; }
html:not(.js) .bmf:empty { display: none; }
.bmf.bmf-grow { height: auto; min-height: var(--bmf-h); }
.bmf-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bmf button, .bmf a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.bmf :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* One step */
.bmf-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.bmf-status { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.bmf-status-text { min-width: 0; flex: 1 1 auto; }
.bmf-label { color: rgba(255,255,255,.6); margin: 0; }
/* Focus lands on the step label after a step, for screen readers and the Tab order. It is not a control, so no ring. */
.bmf .bmf-label:focus, .bmf .bmf-label:focus-visible { outline: 0; }
.bmf-trail { margin: 3px 0 0; font-size: 13px; line-height: 16px; color: #fff; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.bmf-back { flex: 0 0 auto; min-height: 44px; min-width: 72px; padding: 0 10px; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .2s; }
.bmf-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
@keyframes bmfIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.bmf-in { animation: bmfIn .22s cubic-bezier(.16,1,.3,1) both; }
@media (prefers-reduced-motion: reduce) {
  .bmf-in { animation: none; }
  .bmf-chip { transition: none; }
}

/* Buttons */
.bmf-chips { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(44px, 56px); align-content: start; gap: 6px; }
.bmf-chip { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 6px 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.2); color: #fff; font-family: 'Funnel Display', 'Funnel Display Fallback', sans-serif; font-weight: 600; font-size: 15px; line-height: 1.15; letter-spacing: -.01em; cursor: pointer; transition: border-color .15s, background-color .15s, transform .12s; }
.bmf-chip:active { transform: scale(.98); background: rgba(255,255,255,.14); }
.bmf-chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.bmf-unsure { border-style: dashed; font-weight: 500; color: rgba(255,255,255,.8); }
.bmf-chips .bmf-unsure:nth-child(odd) { grid-column: 1 / -1; }

/* The answer */
.bmf-rows { flex: 0 1 auto; min-height: 0; display: grid; gap: 4px; }
.bmf-row { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 58px; padding: 4px 8px 4px 4px; background: #121822; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); transition: box-shadow .15s; }
.bmf-row-img { display: block; width: 50px; height: 50px; background: #ECEAE5; isolation: isolate; }
.bmf-row-img img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.bmf-row-text { min-width: 0; display: block; }
.bmf-row-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 8px; }
.bmf-row-top b { font-family: 'Funnel Display', 'Funnel Display Fallback', sans-serif; font-weight: 600; font-size: 15px; line-height: 18px; letter-spacing: -.01em; }
.bmf-row-top i { font-style: normal; color: var(--red-on-dark); }
.bmf-price { font-family: 'Funnel Display', 'Funnel Display Fallback', sans-serif; font-weight: 700; font-size: 14px; line-height: 18px; white-space: nowrap; }
.bmf-row-l { display: block; font-size: 12.5px; line-height: 16px; color: rgba(255,255,255,.7); }
.bmf-n1 .bmf-row { grid-template-columns: 64px minmax(0, 1fr); align-items: start; }
.bmf-n1 .bmf-row-img { width: 64px; height: 64px; }
/* On a phone two series get one line each, the rest is on the big page. */
.bmf-n2 .bmf-row-l + .bmf-row-l { display: none; }
.bmf-flag { display: inline-block; font-family: 'JetBrains Mono', 'JetBrains Mono Fallback', monospace; font-size: 9px; line-height: 13px; letter-spacing: .04em; text-transform: uppercase; padding: 0 4px; background: #FFF1CC; color: #6B4A00; vertical-align: 1px; }
[data-review="off"] .bmf-flag { display: none; }
.bmf-text { flex: 0 0 auto; margin: 0 0 10px; font-size: 14px; line-height: 20px; color: #fff; }
.bmf-foot { flex: 0 0 auto; margin-top: auto; padding-top: 6px; }
.bmf-confirm { margin: 0; font-size: 12.5px; line-height: 17px; color: rgba(255,255,255,.8); }
.bmf-actions { flex: 0 0 auto; display: flex; gap: 6px; padding-top: 6px; }
.bmf-end { margin-top: auto; }
.bmf-cta { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 6px 12px; background: var(--red); color: #fff; font-family: 'Funnel Display', 'Funnel Display Fallback', sans-serif; font-weight: 600; font-size: 15px; line-height: 1.15; text-align: center; white-space: nowrap; transition: background-color .2s; }
.bmf-cta:hover { background: var(--red-dark); }
.bmf-ghost { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 6px 12px; border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 14px; font-weight: 500; line-height: 1.15; text-align: center; white-space: nowrap; transition: border-color .2s; }
.bmf-skel { height: 58px; background: #121822; }
@media (hover: hover) {
  .bmf-back:hover, .bmf-ghost:hover { border-color: #fff; }
  .bmf-chip:hover { border-color: #fff; }
  .bmf-row:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }
}

/* The answer, variant A (Egor 11.11, thread thr_bbuhfmxvy9): a card per series with its sizes as buttons, each opens that plate.
   The answer grows with what it holds (one series 343 px wide, 458 px on a phone); the steps before it keep the fixed height. */
.bmf.bmf-answer { height: auto; min-height: var(--bmf-h); }
.bmf.bmf-answer .bmf-panel, .bmf.bmf-answer .bmf-body { flex: 0 0 auto; }
.bmf-cards { display: grid; gap: 6px; }
.bmf-card { display: block; width: 100%; padding: 10px; background: #121822; color: #fff; text-align: left; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.bmf-cards.is-many .bmf-card.is-open { box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), inset 0 3px 0 var(--red); }
.bmf-card-head { display: flex; align-items: center; gap: 12px; }
.bmf-card-head:focus { outline: 0; }
button.bmf-card { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 10px; border: 0; font: inherit; cursor: pointer; transition: box-shadow .15s; }
.bmf-card .bmf-row-img { flex: 0 0 auto; width: 72px; height: 72px; }
button.bmf-card .bmf-row-img, .bmf-cards.is-many .bmf-row-img { width: 48px; height: 48px; }
.bmf-card-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bmf-card-name b { font-family: 'Funnel Display', 'Funnel Display Fallback', sans-serif; font-weight: 600; font-size: 17px; line-height: 20px; letter-spacing: -.01em; }
.bmf-chev { flex: 0 0 auto; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.3); font-size: 18px; line-height: 1; }
.bmf-lines { margin: 10px 0 0; padding: 0; list-style: none; }
.bmf-lines li { position: relative; padding-left: 12px; font-size: 13px; line-height: 18px; color: rgba(255,255,255,.75); }
.bmf-lines li::before { content: ''; position: absolute; left: 0; top: 7px; width: 4px; height: 4px; background: var(--red-on-dark); }
.bmf-lines li + li { margin-top: 2px; }
.bmf-sl { margin: 12px 0 6px; color: rgba(255,255,255,.6); }
.bmf-sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.bmf-size { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; padding: 6px 4px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.22); color: #fff; text-align: center; transition: border-color .15s, background-color .15s; }
.bmf-size b { font-family: 'Funnel Display', 'Funnel Display Fallback', sans-serif; font-weight: 600; font-size: 16px; line-height: 18px; letter-spacing: -.01em; }
.bmf-size small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 14px; color: rgba(255,255,255,.72); white-space: nowrap; }
.bmf-size:active { background: rgba(255,255,255,.14); }
.bmf-sizes.is-models { grid-template-columns: minmax(0, 1fr); }
.bmf-sizes.is-models .bmf-size { flex-direction: row; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 12px; text-align: left; }
.bmf-sizes.is-models .bmf-size b { font-size: 14px; }
.bmf-sizes.is-models .bmf-size small { margin: 0; font-size: 13px; font-weight: 600; color: #fff; }
.bmf-all, .bmf-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; background: none; border: 0; color: #fff; font: inherit; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.45); cursor: pointer; }
.bmf-all { margin-top: 2px; }
.bmf-card-go { margin-top: 12px; width: 100%; justify-content: space-between; gap: 12px; }
.bmf-go-p { white-space: nowrap; font-weight: 700; }
.bmf-card .bmf-note { margin-bottom: 0; font-size: 13px; line-height: 18px; color: rgba(255,255,255,.85); }
.bmf-card .bmf-note .u { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.bmf-help { margin-top: 8px; padding: 10px 12px; background: rgba(255,255,255,.04); box-shadow: inset 2px 0 0 var(--red-on-dark); }
.bmf-help ul { margin: 0; padding: 0 0 0 16px; list-style: disc; }
.bmf-help li { font-size: 13px; line-height: 18px; color: rgba(255,255,255,.85); }
.bmf-help li + li { margin-top: 4px; }
.bmf-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; }
.bmf-answer .bmf-foot { margin-top: 8px; }
@media (hover: hover) {
  button.bmf-card:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }
  .bmf-size:hover { border-color: #fff; }
  .bmf-all:hover, .bmf-link:hover { text-decoration-color: #fff; }
}
@media (min-width: 640px) and (max-width: 767px), (min-width: 1200px) {
  .bmf-sizes { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
  .bmf-sizes.is-models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bmf-card { padding: 12px; }
  .bmf-card .bmf-row-img { width: 88px; height: 88px; }
  button.bmf-card .bmf-row-img, .bmf-cards.is-many .bmf-row-img { width: 56px; height: 56px; }
  .bmf-card-go { width: auto; min-width: 60%; }
  .bmf-answer .bmf-foot { flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }
  .bmf-answer .bmf-foot .bmf-confirm { flex: 1 1 360px; }
}

/* On a light page, such as a product page: the block brings its own black band, so the finder looks the same everywhere (variant A).
   The fixed height includes the padding. */
.bmf-light { --bmf-h: 348px; padding: 18px 16px 16px; background: var(--ink); box-shadow: inset 0 4px 0 var(--red); }
.bmf-msg { margin: 0; font-size: 14px; line-height: 20px; color: #fff; }
.bmf-light .bmf-confirm { margin-top: 6px; }
.bmf-note { margin-top: 8px; padding-left: 10px; box-shadow: inset 2px 0 0 var(--red-on-dark); }
/* Plate pages: the block opens "Will it fit my boat?", across both columns of its questions (inc/finder-product.php). */
.bm-fit-finder { margin: 0 0 20px; column-span: all; }
/* A slow base.js drops the "js" class after 4 s and the rule above would hide the empty block, then the finder fills it and the
   questions below jump. Here <noscript> already hides the block when scripts are off, so it keeps its height while it waits. */
html:not(.js) .bm-fit-finder .bmf:empty { display: flex; }

/* The left column fills the height of the block: hours and chat line up with the last row of buttons. */
@media (min-width: 768px) {
  .finder-grid { align-items: stretch; }
  .finder-grid > div:first-child { display: flex; flex-direction: column; align-items: flex-start; }
  .finder-grid .finder-sub { margin-top: auto; }
}
/* Wide: as much room across as the block needs */
@media (min-width: 640px) and (max-width: 767px), (min-width: 1200px) {
  .bmf { --bmf-h: 248px; }
  .bmf-light { --bmf-h: 256px; padding: 20px 20px 18px; }
  .bmf-back { min-height: 36px; padding: 0 12px; }
  .bmf-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(44px, 50px); gap: 8px; }
  .bmf-chips .bmf-unsure:nth-child(odd) { grid-column: auto; }
  .bmf-chips .bmf-unsure:nth-child(3n+1) { grid-column: 1 / -1; }
  .bmf-chips .bmf-unsure:nth-child(3n+2) { grid-column: span 2; }
  .bmf-rows { gap: 8px; }
  .bmf-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bmf-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bmf-n2 .bmf-row-l + .bmf-row-l { display: block; }
  .bmf-row { grid-template-columns: 56px minmax(0, 1fr); align-items: start; gap: 10px; }
  .bmf-row-img { width: 56px; height: 56px; }
  .bmf-n1 .bmf-row { grid-template-columns: 72px minmax(0, 1fr); }
  .bmf-n1 .bmf-row-img { width: 72px; height: 72px; }
  .bmf-foot { display: flex; align-items: center; gap: 16px; padding-top: 8px; }
  .bmf-confirm { flex: 1 1 auto; min-width: 0; font-size: 12.5px; line-height: 16px; }
  .bmf-foot .bmf-actions { padding-top: 0; }
  .bmf-actions { gap: 8px; }
  .bmf-text { margin-bottom: 12px; }
  .bmf-end { align-self: flex-start; min-width: 60%; }
  .bmf-cta { padding: 6px 16px; }
  .bmf-skel { height: 96px; }
}

/* A wide container has room for larger photos. */
@media (min-width: 1400px) {
  .bmf-row { grid-template-columns: 72px minmax(0, 1fr); }
  .bmf-row-img { width: 72px; height: 72px; }
  .bmf-n1 .bmf-row { grid-template-columns: 88px minmax(0, 1fr); }
  .bmf-n1 .bmf-row-img { width: 88px; height: 88px; }
}

/* The plate never covers the block. Wider than this, the plate sits beyond the container on its own. */
@media (max-width: 1799px) {
  .bm-chat-plate { transition: background-color .2s, transform .2s, opacity .2s, visibility .2s; }
  .bmf-under-plate .bm-chat-plate { opacity: 0; visibility: hidden; pointer-events: none; }
}
