/* Banner Harvest — Ask Bud launcher, sitewide PHONE behaviour (max-width 767.98px).
   Mirrors the approved Homepage choreography (bh-homepage-v2.css) for every other page.
   Tablet / desktop are not affected. Bud's runtime and panel are unchanged. */

@media (max-width: 767.98px) {

  /* ── Cart · Checkout · Order Pay: no launcher at all on phones ──────────────
     bhx-bud-off is added server-side (mu-plugin); the WooCommerce classes are a backup.
     The thank-you page (order-received) is deliberately not included. */
  html body.bhx-bud-off #bh-field-guide-root,
  html body.woocommerce-cart #bh-field-guide-root,
  html body.woocommerce-checkout:not(.woocommerce-order-received) #bh-field-guide-root,
  html body.woocommerce-order-pay #bh-field-guide-root {
    display: none !important;
  }

  /* ── Introduce → collapse to the medallion ─────────────────────────────── */
  html body:not(.home) #bh-field-guide-root .bh-fg__launcher-copy {
    max-width: 190px;
    transition: max-width .55s cubic-bezier(.22, 1, .36, 1), opacity .35s ease;
  }
  html body:not(.home).bhx-bud-compact #bh-field-guide-root:not(.is-open) .bh-fg__launcher {
    min-width: 0;
    gap: 0;
    padding: 3px;
    transition: transform .2s ease, box-shadow .2s ease, padding .45s cubic-bezier(.22, 1, .36, 1), gap .45s;
  }
  html body:not(.home).bhx-bud-compact #bh-field-guide-root:not(.is-open) .bh-fg__launcher-copy {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
  }
  /* keyboard focus re-opens the label so the control is never nameless to sighted keyboard users */
  html body:not(.home).bhx-bud-compact #bh-field-guide-root:not(.is-open) .bh-fg__launcher:focus-visible {
    gap: 10px;
    padding: 3px 18px 3px 3px;
  }
  html body:not(.home).bhx-bud-compact #bh-field-guide-root:not(.is-open) .bh-fg__launcher:focus-visible .bh-fg__launcher-copy {
    max-width: 190px;
    opacity: 1;
  }

  /* ── Step aside while it would rest on a control, key content, an overlay or a fixed bar ── */
  html body:not(.home).bhx-bud-yield #bh-field-guide-root:not(.is-open) .bh-fg__launcher,
  html body:not(.home).bhx-bud-yield #bh-field-guide-root:not(.is-open) .bh-fg__discovery {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity .25s ease, visibility 0s .25s !important;
  }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  html body:not(.home) #bh-field-guide-root .bh-fg__launcher-copy,
  html body:not(.home).bhx-bud-compact #bh-field-guide-root:not(.is-open) .bh-fg__launcher,
  html body:not(.home).bhx-bud-yield #bh-field-guide-root:not(.is-open) .bh-fg__launcher,
  html body:not(.home).bhx-bud-yield #bh-field-guide-root:not(.is-open) .bh-fg__discovery {
    transition: opacity .2s linear !important;
  }
}
