/* =========================================================================
   page-helper.css — the listing helper (page-helper.js) and its admin editor
   (page-helper-setup.js), on the bag builder and the flip-flop builder.
   ========================================================================= */

/* ---- the mascot and its bubble (page coordinates, placed by page-helper.js) ---- */
.bh-mascot { position: absolute; z-index: 9998; pointer-events: none; }
.bh-mascot[hidden] { display: none; }
.bh-fig { display: block; height: 84px; width: auto; filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.bh-fig.is-flipped { transform: scaleX(-1); }
@media (min-width: 901px) { .bh-fig { height: 110px; } }

.bh-bubble {
    position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    margin-bottom: 10px; width: max-content; max-width: 240px;
    background: #f0a868; color: #1a1a1a; border: 2px solid #fff; border-radius: 12px;
    padding: 10px 12px; box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.3);
    font: 14px/1.4 Helvetica, Arial, sans-serif; pointer-events: auto;
}
.bh-bubble::after {
    content: ''; position: absolute; left: 50%; top: 100%; margin-left: -8px;
    border: 8px solid transparent; border-top-color: #f0a868;
}
.bh-mascot.is-below .bh-bubble { bottom: auto; top: 100%; margin: 10px 0 0; }
.bh-mascot.is-below .bh-bubble::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #f0a868; }
.bh-msg { margin: 0 14px 0 0; white-space: pre-line; }
.bh-x { position: absolute; top: 2px; right: 6px; border: 0; background: none; font-size: 18px; line-height: 1; color: #1a1a1a; opacity: .8; cursor: pointer; padding: 2px; }
.bh-x:hover { opacity: 1; }
.bh-nav { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.bh-n { flex: 1; font-size: 12px; color: #1a1a1a; opacity: .85; }
.bh-back, .bh-next { border-radius: 6px; padding: 5px 12px; font: 700 13px Helvetica, Arial, sans-serif; cursor: pointer; }
.bh-back { background: transparent; color: #1a1a1a; border: 1px solid #fff; }
.bh-next { background: #1a1a1a; color: #d6813c; border: 1px solid #1a1a1a; }

/* ---- Helper Steps, the admin editor floating over the page (under the mascot, z-index 9998) ---- */
.bh-setup { position: fixed; right: 16px; bottom: 16px; z-index: 9997; width: 460px; max-width: calc(100vw - 32px); max-height: 70vh; display: flex; flex-direction: column; box-sizing: border-box; border: 2px solid #3695ab; border-radius: 10px; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.25); font: 14px Helvetica, Arial, sans-serif; }
.bh-shead { display: flex; align-items: baseline; gap: 12px; padding: 8px 12px; background: #eaf5f8; border-radius: 8px 8px 0 0; cursor: move; touch-action: none; user-select: none; }
.bh-shead h2 { margin: 0; font-size: 18px; color: #26758a; }
.bh-snote { flex: 1; font-size: 12px; color: #888; }
.bh-min { align-self: center; border: 1px solid #bbb; background: #fff; border-radius: 6px; width: 28px; height: 26px; padding: 0; font: 700 16px/1 Helvetica, Arial, sans-serif; cursor: pointer; }
.bh-sbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 12px 12px; }
.bh-setup.is-min { height: auto !important; }
.bh-setup.is-min .bh-sbody, .bh-setup.is-min .bh-grip { display: none; }
/* the corner grip (page-helper-setup.js floating) */
.bh-grip { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; background: linear-gradient(135deg, transparent 50%, #3695ab 50%, #3695ab 60%, transparent 60%, transparent 70%, #3695ab 70%, #3695ab 80%, transparent 80%); border-radius: 0 0 8px 0; }
.bh-setup.is-min .bh-shead { border-radius: 8px; }
.bh-sbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.bh-modes { display: inline-flex; border: 1px solid #ccc; border-radius: 6px; overflow: hidden; }
.bh-modes label { padding: 5px 10px; cursor: pointer; }
.bh-modes label + label { border-left: 1px solid #ccc; }
.bh-sbar button, .bh-step button { border: 1px solid #bbb; background: #f6f6f6; border-radius: 6px; padding: 4px 10px; cursor: pointer; font: inherit; }
.bh-sbar button:disabled, .bh-step button:disabled { opacity: .45; cursor: default; }
.bh-steps { list-style: none; margin: 0; padding: 0; }
.bh-step { border: 1px solid #e0e0e0; border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.bh-step.is-sel { border-color: #3695ab; box-shadow: 0 0 0 2px rgba(54,149,171,.2); }
.bh-srow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bh-num { width: 26px; height: 26px; border-radius: 50%; background: #3695ab; color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bh-t { flex: 1; min-width: 160px; padding: 4px; }
.bh-move { margin-left: auto; display: inline-flex; gap: 4px; }
.bh-msgin { display: block; width: 100%; margin: 8px 0; padding: 6px; font: inherit; resize: vertical; box-sizing: border-box; }
.bh-pos { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.bh-nudge { display: inline-flex; gap: 2px; margin-left: auto; }
.bh-xy input { width: 64px; padding: 3px; }
.bh-b { font-size: 12px; padding: 2px; margin-left: 4px; }
/* blank builder / this design, and Save Helper (the blank builder's steps) */
.bh-scopebar { margin-bottom: 0; }
.bh-status { font-size: 13px; color: #26758a; }
/* the setup bubble's own nudges (page-helper-setup.js place) */
.bh-bnudge { display: inline-flex; gap: 2px; }
.bh-bnudge button { border: 1px solid #1a1a1a; background: #fff; color: #1a1a1a; border-radius: 4px; width: 28px; height: 26px; padding: 0; font-size: 14px; cursor: pointer; }
