/* ==========================================================================
   Guided booking — app-style journey with a live map (.bx-*)
   Loaded by find/request.php (layouts/booking). Tokens come from app.css.
   ========================================================================== */
:root { --bx-ease: cubic-bezier(.2, .8, .2, 1); --bx-spring: cubic-bezier(.34, 1.56, .64, 1); --bx-top: 60px; }
html:has(body.bx-app), body.bx-app { height: 100%; }
body.bx-app { background: var(--bg); overflow: hidden; }

/* ---------- top bar ---------- */
.bx-top { position: relative; z-index: 20; height: var(--bx-top); display: flex; align-items: center; gap: .9rem; padding: 0 1rem; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.bx-top .brand-name { font: 800 1.05rem var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.bx-top .brand-logo { width: 34px; height: 34px; }
.bx-top-exit { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid var(--line); background: #fff; transition: background .2s, transform .2s var(--bx-spring); }
.bx-top-exit:hover { background: var(--bg); color: var(--ink); transform: rotate(90deg); }
.bx-top-title { padding-left: .9rem; border-left: 1px solid var(--line); font: 600 .92rem var(--font-display); color: var(--ink-2); }
.bx-top-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.bx-top-account { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .7rem .25rem .25rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: .86rem; font-weight: 600; }
.bx-top-account > span:first-child { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-700), var(--accent-600)); color: #fff; font: 700 .72rem var(--font-display); }

/* ---------- shell: sheet + live map ---------- */
.bx-main { height: calc(100dvh - var(--bx-top)); }
.bx { position: relative; height: 100%; display: grid; grid-template-columns: minmax(400px, 470px) minmax(0, 1fr); grid-template-areas: "sheet stage"; }
.bx-stage { grid-area: stage; position: relative; overflow: hidden; background: #e9edf3; }
.bx-map { position: absolute; inset: 0; z-index: 0; }
.bx-sheet { grid-area: sheet; position: relative; z-index: 5; display: flex; flex-direction: column; min-height: 0; background: #fff; box-shadow: 12px 0 40px -18px rgba(15,23,42,.25); }
.bx-grabber { display: none; }

/* ---------- sheet header ---------- */
.bx-head { padding: 1rem 1.4rem .85rem; border-bottom: 1px solid #f0f2f6; }
.bx-head-row { display: flex; align-items: center; gap: .8rem; }
.bx-round { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: transform .25s var(--bx-ease), opacity .25s, background .2s; }
.bx-round:hover { background: var(--bg); }
.bx-round:active { transform: scale(.92); }
.bx-round.is-hidden { opacity: 0; pointer-events: none; transform: translateX(-8px); width: 0; margin-right: -.8rem; border-width: 0; }
.bx-head-text { display: flex; flex-direction: column; min-width: 0; }
.bx-step-of { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-600); }
.bx-head-text strong { font: 700 1.15rem/1.2 var(--font-display); color: var(--ink); }
.bx-segments { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: .85rem; }
.bx-segments span { height: 4px; border-radius: 999px; background: #e8ebf2; overflow: hidden; }
.bx-segments i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-700), var(--accent-600)); transform: scaleX(0); transform-origin: left; transition: transform .55s var(--bx-ease); }
.bx-segments .is-done i { transform: scaleX(1); }
.bx-segments .is-current i { transform: scaleX(.45); }

/* ---------- sheet body ---------- */
.bx-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.1rem 1.4rem 1.5rem; scroll-behavior: smooth; }
.bx-panel { outline: none; }
.bx-in-fwd { animation: bxInFwd .45s var(--bx-ease) both; }
.bx-in-back { animation: bxInBack .45s var(--bx-ease) both; }
@keyframes bxInFwd { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes bxInBack { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
.bx-h { font: 800 1.45rem/1.2 var(--font-display); letter-spacing: -.02em; color: var(--ink); margin: 0 0 .3rem; outline: none; }
.bx-sub { color: var(--ink-3); font-size: .9rem; margin: 0 0 1.2rem; }
.bx-label { display: block; font-size: .85rem; font-weight: 700; color: var(--ink); margin-bottom: .55rem; }
.bx-label.req::after { content: " *"; color: var(--danger); }
.bx-optional { font-weight: 500; color: var(--ink-3); font-size: .76rem; background: #f1f4f9; border-radius: 999px; padding: .05rem .45rem; margin-left: .25rem; }
.bx-field { margin: 0 0 1.35rem; padding: 0; border: 0; min-width: 0; }
.bx-field legend { float: none; padding: 0; }
.bx-note { display: flex; align-items: flex-start; gap: .4rem; font-size: .8rem; color: var(--ink-3); margin: .55rem 0 0; }
.bx-note .icon { flex: none; margin-top: .15rem; }
.bx-banner { display: flex; align-items: center; gap: .55rem; padding: .7rem .85rem; margin-bottom: 1rem; border-radius: 12px; background: var(--accent-50); color: var(--brand-800); font-size: .86rem; font-weight: 500; }
.field-error { font-size: .82rem; color: var(--danger); margin: .45rem 0 0; }
.bx-shake { animation: bxShake .4s; }
@keyframes bxShake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ---------- step 1: services ---------- */
.bx-services { display: flex; flex-direction: column; gap: .6rem; }
.bx-service { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; padding: .85rem .95rem; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .25s, transform .25s var(--bx-ease), background .2s; animation: bxRise .5s var(--bx-ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
.bx-service:hover { border-color: var(--accent-300); box-shadow: 0 10px 24px -16px rgba(48,46,119,.35); transform: translateY(-1px); }
.bx-service:active { transform: scale(.985); }
.bx-service input, .bx-opt input, .bx-chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.bx-service-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-100), #f6f5fe); color: var(--brand-700); transition: background .25s, color .25s, transform .3s var(--bx-spring); }
.bx-service-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.bx-service-text strong { font: 700 .95rem/1.3 var(--font-display); color: var(--ink); }
.bx-service-text small { font-size: .8rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bx-price { font-size: .78rem; font-weight: 700; color: var(--brand-700); background: var(--accent-50); border-radius: 999px; padding: .3rem .6rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bx-tick { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-700); color: #fff; box-shadow: 0 4px 10px rgba(48,46,119,.35); transform: scale(0); transition: transform .35s var(--bx-spring); }
.bx-service:has(input:checked) { border-color: var(--brand-700); background: linear-gradient(135deg, #f7f6ff, #fff); box-shadow: 0 0 0 4px rgba(48,46,119,.08); }
.bx-service:has(input:checked) .bx-service-icon { background: var(--brand-700); color: #fff; transform: rotate(-6deg) scale(1.05); }
.bx-service:has(input:checked) .bx-tick { transform: scale(1); }
.bx-service:has(input:focus-visible), .bx-opt:has(input:focus-visible), .bx-chip-opt:has(input:focus-visible) { box-shadow: var(--focus); }
@keyframes bxRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.bx-rise { animation: bxRise .5s var(--bx-ease) both; animation-delay: calc(var(--i, 0) * 70ms); }

/* ---------- step 2: fee calculator ---------- */
.bx-calc { margin-bottom: 1.5rem; }
.bx-calc-input { margin-bottom: .8rem; }
.bx-amount { display: flex; align-items: center; gap: .5rem; padding: .45rem .45rem .45rem .55rem; border: 1.5px solid var(--line); border-radius: 18px; background: #fff; transition: border-color .2s, box-shadow .3s; }
.bx-amount:focus-within { border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(48,46,119,.1); }
.bx-amount.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(220,53,69,.08); }
.bx-amount-prefix { flex: none; padding: .45rem .65rem; border-radius: 12px; background: var(--accent-50); color: var(--brand-700); font: 800 .82rem var(--font-display); letter-spacing: .04em; }
.bx-amount input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 800 1.55rem var(--font-display); letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; padding: .2rem 0; }
.bx-amount input::placeholder { color: #c4cad6; }
.bx-calc-btn { flex: none; display: inline-flex; align-items: center; gap: .4rem; height: 44px; padding: 0 1rem; border: 0; border-radius: 13px; background: var(--brand-700); color: #fff; font-weight: 700; font-size: .86rem; transition: transform .2s var(--bx-ease), background .2s; }
.bx-calc-btn:hover { background: var(--brand-800); }
.bx-calc-btn:active { transform: scale(.96); }
.bx-calc-btn .icon { transition: transform .25s var(--bx-ease); }
.bx-calc-btn:hover .icon { transform: translateX(3px); }
.bx-calc.is-calculating .bx-amount { animation: bxGlow 1.2s ease-in-out infinite; }
@keyframes bxGlow { 50% { box-shadow: 0 0 0 6px rgba(75,71,184,.14); border-color: var(--accent-600); } }

.bx-fee { position: relative; overflow: hidden; border-radius: 18px; transition: background .4s, border-color .4s; }
.bx-fee[data-state="idle"], .bx-fee[data-state="error"] { border: 1.5px dashed var(--line-strong); background: #fbfcfe; }
.bx-fee[data-state="error"] { border-color: #f5c2c7; background: #fffafa; }
.bx-fee-idle { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; color: var(--ink-3); font-size: .86rem; }
.bx-fee-idle-icon { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #f1f4f9; color: var(--ink-3); }
.bx-fee[data-state="error"] .bx-fee-idle-icon { background: var(--danger-bg); color: var(--danger); }
.bx-fee[data-state="calc"] { border: 1.5px solid var(--accent-300); background: linear-gradient(110deg, #f4f3ff 30%, #ffffff 50%, #f4f3ff 70%); background-size: 220% 100%; animation: bxShimmer 1.2s linear infinite; }
@keyframes bxShimmer { to { background-position: -220% 0; } }
.bx-fee-calc { display: flex; align-items: center; gap: .9rem; padding: 1.05rem 1.1rem; }
.bx-fee-calc strong { display: block; font: 700 .95rem var(--font-display); color: var(--brand-800); margin-bottom: .55rem; }
.bx-fee-spinner { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-700); color: #fff; animation: bxTilt 1s ease-in-out infinite; }
@keyframes bxTilt { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
.bx-fee-bars { display: grid; gap: 6px; }
.bx-fee-bars i { display: block; height: 7px; border-radius: 999px; background: linear-gradient(90deg, var(--accent-300), var(--accent-600)); transform-origin: left; animation: bxBar 1s var(--bx-ease) infinite alternate; }
.bx-fee-bars i:nth-child(2) { width: 70%; animation-delay: .15s; }
.bx-fee-bars i:nth-child(3) { width: 45%; animation-delay: .3s; }
@keyframes bxBar { from { transform: scaleX(.25); opacity: .5; } to { transform: scaleX(1); opacity: 1; } }
.bx-fee-scan { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); width: 40%; animation: bxScan 1.1s var(--bx-ease) infinite; pointer-events: none; }
@keyframes bxScan { from { transform: translateX(-120%); } to { transform: translateX(320%); } }
.bx-fee[data-state="done"], .bx-fee-static { border: 1.5px solid #dcdaf6; background: radial-gradient(120% 140% at 100% 0%, #efeefe 0%, #ffffff 55%); padding: 1rem 1.15rem; animation: bxPop .5s var(--bx-spring) both; }
.bx-fee-static { animation: none; margin-bottom: 1.3rem; }
@keyframes bxPop { from { transform: scale(.97); opacity: .4; } to { transform: none; opacity: 1; } }
.bx-fee-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .7rem; }
.bx-fee-badge { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; color: #0f7a4f; background: var(--success-bg); padding: .22rem .55rem; border-radius: 999px; animation: bxPop .45s var(--bx-spring) both .15s; }
.bx-fee-service { font-size: .8rem; color: var(--ink-3); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-fee-lines { margin: 0; }
.bx-fee-lines div { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; padding: .3rem 0; animation: bxRise .45s var(--bx-ease) both; animation-delay: calc(.1s + var(--i) * 90ms); }
.bx-fee-lines dt { font-weight: 400; color: var(--ink-2); }
.bx-fee-lines dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bx-fee-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: .55rem; padding-top: .7rem; border-top: 1px dashed #d4d2f0; }
.bx-fee-total span { font-weight: 700; font-size: .88rem; }
.bx-fee-total strong { font: 800 1.7rem/1 var(--font-display); letter-spacing: -.02em; color: var(--brand-800); font-variant-numeric: tabular-nums; }
.bx-fee-note { font-size: .78rem; color: var(--ink-3); margin: .65rem 0 0; }

/* ---------- options ---------- */
.bx-seg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.bx-seg2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.bx-opt { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: .85rem .8rem; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; margin: 0; transition: border-color .2s, background .2s, transform .2s var(--bx-ease), box-shadow .25s; }
.bx-opt:hover { border-color: var(--accent-300); }
.bx-opt:active { transform: scale(.97); }
.bx-opt strong { font-size: .88rem; line-height: 1.2; }
.bx-opt small { font-size: .74rem; color: var(--ink-3); line-height: 1.3; }
.bx-opt-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #f1f4f9; color: var(--ink-2); transition: background .25s, color .25s, transform .35s var(--bx-spring); }
.bx-opt-row { flex-direction: row; align-items: center; gap: .7rem; }
.bx-opt-row > span:last-child { display: flex; flex-direction: column; }
.bx-opt:has(input:checked) { border-color: var(--brand-700); background: #f7f6ff; box-shadow: 0 0 0 4px rgba(48,46,119,.07); }
.bx-opt:has(input:checked) .bx-opt-icon { background: var(--brand-700); color: #fff; transform: scale(1.06); }
.bx-opt.is-urgent:has(input:checked) { border-color: var(--warning-solid); background: #fffaf0; box-shadow: 0 0 0 4px rgba(245,158,11,.12); }
.bx-opt.is-urgent:has(input:checked) .bx-opt-icon { background: var(--warning-solid); }
.bx-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.bx-chip-opt { position: relative; cursor: pointer; margin: 0; }
.bx-chip-opt span { display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: .84rem; font-weight: 600; color: var(--ink-2); transition: all .2s var(--bx-ease); }
.bx-chip-opt:hover span { border-color: var(--accent-300); }
.bx-chip-opt input:checked + span { background: var(--brand-700); border-color: var(--brand-700); color: #fff; box-shadow: 0 6px 14px -8px rgba(48,46,119,.6); }
.bx-date { margin-top: .6rem; height: 46px; border-radius: 14px; animation: bxRise .35s var(--bx-ease) both; }
.bx-textarea { position: relative; }
.bx-textarea textarea { width: 100%; min-height: 96px; padding: .85rem .95rem 1.6rem; border: 1.5px solid var(--line); border-radius: 16px; font-size: .92rem; resize: vertical; transition: border-color .2s, box-shadow .3s; }
.bx-textarea textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(48,46,119,.1); }
.bx-count { position: absolute; right: .85rem; bottom: .55rem; font-size: .72rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bx-input { width: 100%; height: 48px; padding: 0 .95rem; border: 1.5px solid var(--line); border-radius: 14px; font-size: .92rem; transition: border-color .2s, box-shadow .3s; }
.bx-input:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(48,46,119,.1); }

/* ---------- step 3: location ---------- */
.bx-place { display: flex; align-items: center; gap: .85rem; padding: .95rem 1rem; border-radius: 16px; background: #f7f8fb; border: 1.5px solid var(--line); margin-bottom: .8rem; transition: background .3s, border-color .3s; }
.bx-place-icon { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--ink-3); box-shadow: var(--shadow-sm); transition: background .3s, color .3s; }
.bx-place-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bx-place-text strong { font: 700 .95rem var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-place-text small { font-size: .78rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bx-place-ok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #fff; transform: scale(0); transition: transform .4s var(--bx-spring); }
.bx-place.is-set { background: #f3fbf7; border-color: rgba(22,163,106,.35); }
.bx-place.is-set .bx-place-icon { background: var(--success); color: #fff; }
.bx-place.is-set .bx-place-ok { transform: scale(1); }
.bx-geo { width: 100%; display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; text-align: left; color: var(--ink); transition: border-color .2s, background .2s, transform .2s var(--bx-ease); }
.bx-geo:hover { border-color: var(--accent-300); background: #fafaff; }
.bx-geo:active { transform: scale(.985); }
.bx-geo > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.bx-geo strong { font-size: .9rem; }
.bx-geo small { font-size: .76rem; color: var(--ink-3); }
.bx-geo-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-700); color: #fff; }
.bx-geo.is-loading .bx-geo-icon { animation: bxSpin 1s linear infinite; }
@keyframes bxSpin { to { transform: rotate(360deg); } }
.bx-geo-msg { font-size: .82rem; padding: .6rem .8rem; border-radius: 12px; background: var(--info-bg); color: var(--brand-800); margin-top: .6rem; animation: bxRise .3s var(--bx-ease) both; }
.bx-geo-msg.is-warn { background: var(--warning-bg); color: var(--warning); }
.bx-geo-msg.is-ok { background: var(--success-bg); color: #0f7a4f; }
.bx-divider { display: flex; align-items: center; gap: .75rem; margin: 1.1rem 0; color: var(--ink-3); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.bx-divider::before, .bx-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bx-select { position: relative; display: flex; align-items: center; }
.bx-select .icon { position: absolute; left: .9rem; color: var(--ink-3); pointer-events: none; }
.bx-select select { width: 100%; height: 48px; padding: 0 2.2rem 0 2.5rem; border: 1.5px solid var(--line); border-radius: 14px; background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right .9rem center / 12px; appearance: none; font-size: .92rem; color: var(--ink); }
.bx-select select:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(48,46,119,.1); }

/* ---------- step 4: search + advocates ---------- */
.bx-search { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.05rem; margin-bottom: 1rem; border-radius: 18px; background: linear-gradient(135deg, var(--brand-900), var(--brand-700)); color: #fff; animation: bxRise .4s var(--bx-ease) both; }
.bx-search-orb { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); }
.bx-search-orb span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); animation: bxRing 1.8s var(--bx-ease) infinite; }
.bx-search-orb span:nth-child(2) { animation-delay: .9s; }
@keyframes bxRing { from { transform: scale(1); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }
.bx-search-text strong { display: block; font: 700 .95rem var(--font-display); margin-bottom: .45rem; }
.bx-search-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.bx-search-steps li { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: rgba(255,255,255,.5); transition: color .3s; }
.bx-ss-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.3); transition: background .3s, box-shadow .3s; }
.bx-search-steps li.is-active { color: #fff; }
.bx-search-steps li.is-active .bx-ss-dot { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.2); animation: bxBlink .8s ease-in-out infinite; }
.bx-search-steps li.is-done { color: rgba(255,255,255,.85); }
.bx-search-steps li.is-done .bx-ss-dot { background: #4ade80; }
@keyframes bxBlink { 50% { opacity: .4; } }
.bx-found { font-size: .88rem; font-weight: 600; color: var(--ink-2); margin: 0 0 .75rem; }
.bx-widened { display: block; font-weight: 400; color: var(--ink-3); font-size: .8rem; }
.bx-list { display: flex; flex-direction: column; gap: .7rem; }
.bx-adv { position: relative; display: flex; gap: .9rem; padding: 1rem; border: 1.5px solid var(--line); border-radius: 18px; background: #fff; cursor: pointer; outline: none; transition: border-color .2s, box-shadow .3s, transform .25s var(--bx-ease), background .2s; }
.bx-adv:hover { border-color: var(--accent-300); box-shadow: 0 12px 26px -18px rgba(48,46,119,.4); transform: translateY(-1px); }
.bx-adv:focus-visible { box-shadow: var(--focus); }
.bx-adv.is-selected { border-color: var(--brand-700); background: linear-gradient(135deg, #f7f6ff, #fff); box-shadow: 0 0 0 4px rgba(48,46,119,.08), 0 14px 30px -20px rgba(48,46,119,.5); }
.bx-adv-face { position: relative; flex: none; align-self: flex-start; }
.bx-adv-avatar { width: 58px; height: 58px; border-radius: 18px; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-100), #f6f5fe); color: var(--brand-800); font: 800 1.05rem var(--font-display); }
.bx-verified { position: absolute; right: -6px; bottom: -6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--success); box-shadow: 0 2px 6px rgba(15,23,42,.15); }
.bx-adv-body { flex: 1; min-width: 0; }
.bx-adv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.bx-adv-top h3 { font: 700 1rem/1.3 var(--font-display); margin: 0; }
.bx-dist { flex: none; font-size: .74rem; font-weight: 800; color: var(--brand-700); background: var(--accent-50); padding: .2rem .5rem; border-radius: 999px; font-variant-numeric: tabular-nums; }
.bx-adv-firm { font-size: .84rem; color: var(--ink-2); margin: .1rem 0 0; }
.bx-adv-loc { font-size: .78rem; color: var(--ink-3); margin: .1rem 0 0; }
.bx-adv-facts { display: flex; flex-wrap: wrap; gap: .25rem .8rem; font-size: .76rem; color: var(--ink-2); margin-top: .5rem; }
.bx-adv-facts span { display: inline-flex; align-items: center; gap: .3rem; }
.bx-adv-facts .icon { width: 13px; height: 13px; color: var(--ink-3); }
.bx-mchips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.bx-mchip { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px; background: #f1f4f9; color: var(--ink-3); }
.bx-mchip .icon { width: 12px; height: 12px; }
.bx-mchip.is-on { background: var(--brand-100); color: var(--brand-800); }
.bx-adv-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .75rem; }
.bx-pick { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .85rem; border-radius: 999px; border: 1.5px solid var(--line-strong); font-size: .8rem; font-weight: 700; color: var(--ink-2); transition: all .25s var(--bx-ease); }
.bx-pick .icon { width: 14px; height: 14px; }
.bx-adv.is-selected .bx-pick { background: var(--brand-700); border-color: var(--brand-700); color: #fff; animation: bxPop .4s var(--bx-spring); }
.bx-adv-link { font-size: .78rem; display: inline-flex; align-items: center; gap: .25rem; text-decoration: none; font-weight: 600; }
.bx-adv-link .icon { width: 12px; height: 12px; }
.bx-skel { display: block; border-radius: 8px; background: linear-gradient(90deg, #eef1f6 25%, #f8f9fc 50%, #eef1f6 75%); background-size: 200% 100%; animation: bxShimmer 1.2s linear infinite; }
.bx-skel-avatar { width: 58px; height: 58px; border-radius: 18px; flex: none; }
.bx-skel-line { height: 11px; margin: .4rem 0; width: 80%; }
.bx-skel-line.short { width: 55%; }
.bx-skel-line.shorter { width: 35%; }
.bx-adv.is-skel { cursor: default; }
.bx-adv.is-skel:hover { transform: none; box-shadow: none; border-color: var(--line); }
.bx-empty { text-align: center; padding: 1.8rem 1rem; border: 1.5px dashed var(--line-strong); border-radius: 18px; animation: bxRise .4s var(--bx-ease) both; }
.bx-empty-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: var(--brand-100); color: var(--brand-700); margin-bottom: .8rem; }
.bx-empty h3 { font: 700 1.05rem var(--font-display); margin-bottom: .35rem; }
.bx-empty p { color: var(--ink-3); font-size: .86rem; max-width: 360px; margin: 0 auto 1rem; }
.bx-empty-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

/* ---------- step 5: review ---------- */
.bx-rlist { margin: 0 0 1rem; border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; }
.bx-rrow { display: flex; align-items: flex-start; gap: .8rem; padding: .85rem .95rem; border-top: 1px solid #f0f2f6; animation: bxRise .45s var(--bx-ease) both; animation-delay: calc(var(--i) * 60ms); }
.bx-rrow:first-child { border-top: 0; }
.bx-rrow-icon { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-50); color: var(--brand-700); }
.bx-rrow-main { flex: 1; min-width: 0; }
.bx-rrow dt { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.bx-rrow dd { margin: .1rem 0 0; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.bx-rrow-note { margin: .3rem 0 0; font-size: .82rem; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.bx-rrow-edit { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink-3); transition: all .2s; }
.bx-rrow-edit:hover { color: var(--brand-700); border-color: var(--accent-300); background: var(--accent-50); }
.bx-rrow-adv { display: inline-flex; align-items: center; gap: .55rem; }
.bx-rrow-avatar { width: 34px; height: 34px; border-radius: 11px; object-fit: cover; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-800); font: 800 .75rem var(--font-display); }
.bx-rrow-adv small { display: block; font-weight: 400; color: var(--ink-3); font-size: .76rem; }
.bx-drop { display: flex; align-items: center; gap: .85rem; padding: 1rem; border: 1.5px dashed var(--line-strong); border-radius: 16px; cursor: pointer; transition: border-color .2s, background .2s; }
.bx-drop:hover { border-color: var(--brand-600); background: #fafaff; }
.bx-drop strong { display: block; font-size: .9rem; }
.bx-drop small { display: block; font-size: .76rem; color: var(--ink-3); }
.bx-drop-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-50); color: var(--brand-700); }
.bx-field:has(#bk-files:focus-visible) .bx-drop { box-shadow: var(--focus); }
.bx-files { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.bx-files li { display: flex; align-items: center; gap: .6rem; padding: .5rem .5rem .5rem .75rem; border: 1px solid var(--line); border-radius: 12px; font-size: .86rem; }
.bx-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-files small { color: var(--ink-3); }
.bx-file-x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: #f1f4f9; color: var(--ink-3); display: grid; place-items: center; }
.bx-file-x:hover { background: var(--danger-bg); color: var(--danger); }
.bx-callout { display: flex; gap: .6rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 14px; background: var(--accent-50); color: var(--brand-800); font-size: .86rem; margin-bottom: 1rem; }
.bx-callout.is-warn { background: var(--warning-bg); color: var(--warning); }

/* ---------- footer + CTA ---------- */
.bx-foot { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.4rem calc(.85rem + env(safe-area-inset-bottom)); border-top: 1px solid #eef1f6; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.bx-foot-total { flex: 1; min-width: 0; line-height: 1.15; }
.bx-foot-total small { display: block; font-size: .72rem; color: var(--ink-3); }
.bx-foot-total strong { font: 800 1.15rem var(--font-display); color: var(--brand-800); font-variant-numeric: tabular-nums; }
.bx-cta { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; height: 52px; padding: 0 1.5rem; border: 0; border-radius: 16px; background: linear-gradient(135deg, var(--brand-700), var(--accent-600)); color: #fff; font: 700 .98rem var(--font-display); text-decoration: none; box-shadow: 0 12px 24px -12px rgba(48,46,119,.7); transition: transform .2s var(--bx-ease), box-shadow .25s, filter .2s; overflow: hidden; }
.bx-cta:hover { color: #fff; filter: brightness(1.06); box-shadow: 0 16px 28px -12px rgba(48,46,119,.8); }
.bx-cta:active { transform: scale(.97); }
.bx-cta .icon { transition: transform .25s var(--bx-ease); }
.bx-cta:hover .icon { transform: translateX(3px); }
.bx-cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-120%); }
.bx-cta:hover::after { transition: transform .8s var(--bx-ease); transform: translateX(120%); }
.bx-cta.is-send { background: linear-gradient(135deg, #0f8a59, var(--success)); box-shadow: 0 12px 24px -12px rgba(22,163,106,.7); }
.bx-cta.is-loading { pointer-events: none; }
.bx-cta.is-loading .icon { animation: bxSpin .8s linear infinite; }
.bx-guest { display: flex; gap: .5rem; }
.bx-guest .btn { height: 52px; border-radius: 16px; display: inline-flex; align-items: center; }

/* ---------- map overlays ---------- */
.bx-chip { position: absolute; top: 16px; left: 50%; z-index: 4; display: inline-flex; align-items: center; gap: .55rem; padding: .55rem 1rem; border-radius: 999px; background: #fff; box-shadow: 0 10px 30px -10px rgba(15,23,42,.35); font-size: .86rem; font-weight: 700; color: var(--ink); transform: translateX(-50%); animation: bxChipIn .45s var(--bx-spring) both; white-space: nowrap; }
@keyframes bxChipIn { from { opacity: 0; transform: translate(-50%, -16px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0); } }
.bx-chip-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand-700); }
.bx-chip.is-search .bx-chip-dot { animation: bxDotPulse 1s ease-in-out infinite; }
@keyframes bxDotPulse { 0% { box-shadow: 0 0 0 0 rgba(48,46,119,.5); } 100% { box-shadow: 0 0 0 10px rgba(48,46,119,0); } }
.bx-chip.is-ok .bx-chip-dot { background: var(--success); }
.bx-chip.is-none .bx-chip-dot { background: var(--ink-3); }
.bx-hint { position: absolute; left: 50%; bottom: 22px; z-index: 4; display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border-radius: 999px; background: rgba(15,23,42,.82); color: #fff; font-size: .82rem; font-weight: 600; transform: translateX(-50%); animation: bxChipIn .45s var(--bx-spring) both; white-space: nowrap; pointer-events: none; }
.bx-ctrl { position: absolute; right: 16px; bottom: 20px; z-index: 4; display: flex; flex-direction: column; gap: 8px; }
.bx-ctrl-btn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 8px 20px -8px rgba(15,23,42,.35); transition: transform .2s var(--bx-ease), background .2s, color .2s; }
.bx-ctrl-btn:hover { background: var(--accent-50); color: var(--brand-700); }
.bx-ctrl-btn:active { transform: scale(.92); }
.bx-ctrl-btn.is-locate { margin-top: 6px; color: var(--brand-700); }
.bx-ctrl-btn.is-busy .icon { animation: bxSpin 1s linear infinite; }

/* Centre pin (step 3): the map moves under it, like setting a pickup point. */
.bx-center-pin { position: absolute; left: 50%; top: 50%; z-index: 3; display: none; flex-direction: column; align-items: center; transform: translate(-50%, -100%); pointer-events: none; }
.bx.is-picking .bx-center-pin { display: flex; animation: bxPinIn .5s var(--bx-spring) both; }
@keyframes bxPinIn { from { opacity: 0; transform: translate(-50%, -140%); } to { opacity: 1; transform: translate(-50%, -100%); } }
.bx-center-pin-head { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-700), var(--accent-600)); color: #fff; border: 3px solid #fff; box-shadow: 0 10px 22px -6px rgba(48,46,119,.6); transition: transform .25s var(--bx-ease); }
.bx-center-pin-stick { width: 3px; height: 16px; background: var(--brand-800); border-radius: 0 0 3px 3px; transition: transform .25s var(--bx-ease); }
.bx-center-pin-shadow { position: absolute; bottom: -4px; width: 16px; height: 6px; border-radius: 50%; background: rgba(15,23,42,.35); transition: transform .25s var(--bx-ease), opacity .25s; }
.bx.is-lifting .bx-center-pin-head, .bx.is-lifting .bx-center-pin-stick { transform: translateY(-14px); }
.bx.is-lifting .bx-center-pin-shadow { transform: scale(.55); opacity: .5; }

/* HTML markers (maps.js) */
.wkm-leaflet { background: none !important; border: 0 !important; }
.wkm-html { position: absolute; left: 0; top: 0; }
.wkm-anchor-center { transform: translate(-50%, -50%); }
.wkm-anchor-bottom { transform: translate(-50%, -100%); }
.wkm-clean .leaflet-tile-pane { filter: saturate(.55) contrast(1.03) brightness(1.04); }
.leaflet-container { font-family: var(--font-text); background: #e9edf3; }
.wkm-line { animation: bxDash 1s linear infinite; }
@keyframes bxDash { to { stroke-dashoffset: -11; } }

.bx-me { position: relative; display: block; width: 22px; height: 22px; }
.bx-me-dot { position: absolute; inset: 0; border-radius: 50%; background: #2f6fed; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(15,23,42,.35); }
.bx-me-pulse { position: absolute; inset: -14px; border-radius: 50%; background: rgba(47,111,237,.18); animation: bxMe 2s ease-out infinite; }
@keyframes bxMe { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }

.bx-radar { position: relative; display: block; width: 0; height: 0; transition: opacity .45s; }
.bx-radar i { position: absolute; left: -30px; top: -30px; width: 60px; height: 60px; border-radius: 50%; border: 2px solid rgba(48,46,119,.55); background: rgba(75,71,184,.12); animation: bxRadar 2.4s cubic-bezier(.2,.6,.3,1) infinite; }
.bx-radar i:nth-child(2) { animation-delay: .8s; }
.bx-radar i:nth-child(3) { animation-delay: 1.6s; }
@keyframes bxRadar { from { transform: scale(.3); opacity: 1; } to { transform: scale(7); opacity: 0; } }
.bx-radar-sweep { position: absolute; left: -170px; top: -170px; width: 340px; height: 340px; border-radius: 50%; background: conic-gradient(from 0deg, rgba(75,71,184,.28), rgba(75,71,184,0) 70deg, transparent 360deg); animation: bxSpin 2.2s linear infinite; }
.bx-radar.is-idle i { border-color: rgba(100,116,139,.4); background: rgba(100,116,139,.08); animation-duration: 4s; }
.bx-radar.is-idle .bx-radar-sweep { display: none; }
.bx-radar.is-out { opacity: 0; }

.bx-apin { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: none; cursor: pointer; transform-origin: 50% 100%; transition: transform .35s var(--bx-spring); }
.bx-apin-face { width: 46px; height: 46px; border-radius: 50%; padding: 3px; background: #fff; box-shadow: 0 8px 18px -6px rgba(15,23,42,.45); border: 2px solid var(--accent-500); transition: border-color .25s, box-shadow .25s; }
.bx-apin-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-800); font: 800 .78rem var(--font-display); }
.bx-apin-tail { width: 10px; height: 10px; margin-top: -6px; background: #fff; border-right: 2px solid var(--accent-500); border-bottom: 2px solid var(--accent-500); transform: rotate(45deg); transition: border-color .25s; }
.bx-apin:hover { transform: scale(1.08); }
.bx-apin.is-selected { transform: scale(1.22); }
.bx-apin.is-selected .bx-apin-face { border-color: var(--brand-700); box-shadow: 0 0 0 6px rgba(48,46,119,.18), 0 12px 24px -8px rgba(48,46,119,.6); }
.bx-apin.is-selected .bx-apin-tail { border-color: var(--brand-700); }
.bx-drop { animation: bxDrop .7s var(--bx-spring) both; }
@keyframes bxDrop { 0% { opacity: 0; transform: translateY(-60px) scale(.6); } 60% { opacity: 1; } 100% { transform: none; } }

/* ---------- success ---------- */
.bx-success { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: rgba(15,23,42,.45); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s; }
.bx-success.is-open { opacity: 1; }
.bx-success-card { width: min(420px, 100%); padding: 2rem 1.6rem 1.6rem; border-radius: 24px; background: #fff; text-align: center; box-shadow: 0 30px 80px -20px rgba(15,23,42,.5); transform: translateY(24px) scale(.96); transition: transform .5s var(--bx-spring); }
.bx-success.is-open .bx-success-card { transform: none; }
.bx-success-check { width: 84px; height: 84px; margin-bottom: 1rem; }
.bx-success-check circle { fill: var(--success-bg); stroke: var(--success); stroke-width: 2.5; stroke-dasharray: 151; stroke-dashoffset: 151; }
.bx-success-check path { fill: none; stroke: var(--success); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.bx-success.is-open .bx-success-check circle { animation: bxDraw .6s var(--bx-ease) .15s forwards; }
.bx-success.is-open .bx-success-check path { animation: bxDraw .45s var(--bx-ease) .65s forwards; }
@keyframes bxDraw { to { stroke-dashoffset: 0; } }
.bx-success h2 { font: 800 1.5rem var(--font-display); margin: 0 0 .7rem; }
.bx-success-ref { display: inline-flex; gap: .5rem; align-items: center; padding: .4rem .8rem; border-radius: 999px; background: #f1f4f9; font-size: .82rem; margin-bottom: .8rem; }
.bx-success-ref strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.bx-success-text { color: var(--ink-2); font-size: .92rem; margin: 0 0 1.3rem; }

/* ---------- entrance ---------- */
.bx-sheet { opacity: 0; transform: translateX(-16px); transition: opacity .5s var(--bx-ease), transform .5s var(--bx-ease); }
.bx.is-ready .bx-sheet { opacity: 1; transform: none; }

/* ---------- phones & tablets: map on top, sheet slides over it ---------- */
@media (max-width: 991.98px) {
  :root { --bx-top: 56px; }
  .bx-top-title { display: none; }
  .bx-top .brand-name { display: none; }
  .bx { display: flex; flex-direction: column; }
  .bx-stage { flex: none; height: 30dvh; transition: height .5s var(--bx-ease); }
  .bx.is-step-1 .bx-stage { height: 20dvh; }
  .bx.is-step-2 .bx-stage { height: 16dvh; }
  .bx.is-step-3 .bx-stage { height: 46dvh; }
  .bx.is-step-4 .bx-stage { height: 38dvh; }
  .bx.is-step-5 .bx-stage { height: 24dvh; }
  .bx-sheet { flex: 1; margin-top: -22px; border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px -16px rgba(15,23,42,.3); transform: translateY(30px); }
  .bx.is-ready .bx-sheet { transform: none; }
  .bx-grabber { display: block; width: 40px; height: 5px; border-radius: 999px; background: #dfe3ea; margin: 8px auto 0; }
  .bx-head { padding: .55rem 1.1rem .75rem; }
  .bx-body { padding: 1rem 1.1rem 1.3rem; }
  .bx-foot { padding: .75rem 1.1rem calc(.75rem + env(safe-area-inset-bottom)); }
  .bx-chip { top: 12px; font-size: .8rem; padding: .45rem .85rem; }
  .bx-ctrl { right: 12px; bottom: 34px; gap: 6px; }
  .bx-ctrl-btn { width: 40px; height: 40px; border-radius: 12px; }
  .bx-ctrl-btn[data-zoom] { display: none; }
  .bx-hint { bottom: 34px; font-size: .78rem; }
  .bx-h { font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .bx-seg3 { grid-template-columns: minmax(0, 1fr); }
  .bx-seg3 .bx-opt { flex-direction: row; align-items: center; gap: .7rem; }
  .bx-seg3 .bx-opt strong { min-width: 0; }
  .bx-seg3 .bx-opt small { margin-left: auto; text-align: right; }
  .bx-seg2 { grid-template-columns: minmax(0, 1fr); }
  .bx-calc-btn span { display: none; }
  .bx-calc-btn { width: 44px; padding: 0; justify-content: center; }
  .bx-amount input { font-size: 1.35rem; }
  .bx-service { grid-template-columns: auto minmax(0, 1fr); }
  .bx-price { grid-column: 2; justify-self: start; }
  .bx-cta { padding: 0 1.15rem; }
  .bx-guest .btn { padding: 0 .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bx *, .bx *::before, .bx *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .bx-radar i, .bx-radar-sweep, .bx-me-pulse { display: none; }
}

/* Flash messages in the app layout (toasts are picked up by app.js; errors float on top). */
.bx-flash { position: fixed; top: calc(var(--bx-top) + 12px); left: 50%; z-index: 60; width: min(520px, calc(100% - 24px)); transform: translateX(-50%); pointer-events: none; }
.bx-flash .alert { pointer-events: auto; box-shadow: 0 16px 40px -16px rgba(15,23,42,.35); animation: bxChipIn .45s var(--bx-spring) both; }

/* ==========================================================================
   Step 1 — "Describe your issue" smart finder + category browser
   ========================================================================== */
.bx-panel[data-panel="1"] .bx-h { margin-bottom: .9rem; }
.bx-ai { position: relative; padding: 2px; border-radius: 20px; background: linear-gradient(135deg, #dcdaf6, #eef0f6); margin-bottom: 1.1rem; transition: background .3s; }
.bx-ai:focus-within { background: linear-gradient(135deg, var(--brand-700), var(--accent-500), #7c3aed); }
.bx-ai.is-thinking { background: conic-gradient(from var(--bx-angle, 0deg), var(--brand-700), #7c3aed, var(--accent-500), #2f6fed, var(--brand-700)); animation: bxAngle 1.6s linear infinite; }
@property --bx-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes bxAngle { to { --bx-angle: 360deg; } }
.bx-ai > * { position: relative; }
.bx-ai::before { content: ""; position: absolute; inset: 2px; border-radius: 18px; background: #fff; }
.bx-ai-label { display: flex; align-items: center; gap: .45rem; padding: .8rem .95rem 0; font: 700 .82rem var(--font-display); color: var(--brand-800); }
.bx-ai-spark { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-700), #7c3aed); color: #fff; }
.bx-ai.is-thinking .bx-ai-spark { animation: bxSpark 1s ease-in-out infinite; }
@keyframes bxSpark { 50% { transform: scale(1.15) rotate(12deg); } }
.bx-ai-box textarea { display: block; width: 100%; min-height: 58px; max-height: 120px; padding: .45rem .95rem .7rem; border: 0; outline: none; resize: none; background: transparent; font: 500 1.02rem/1.45 var(--font-text); color: var(--ink); }
.bx-ai-box textarea::placeholder { color: #9aa3b5; }
.bx-ai-out { padding: 0 .7rem; }
.bx-ai-out:not(:empty) { padding-bottom: .7rem; }
.bx-ai-thinking { display: flex; align-items: center; gap: .6rem; padding: .7rem .4rem; font-size: .85rem; font-weight: 600; color: var(--brand-700); animation: bxRise .3s var(--bx-ease) both; }
.bx-ai-dots { display: inline-flex; gap: 4px; }
.bx-ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-700); animation: bxDots 1s ease-in-out infinite; }
.bx-ai-dots i:nth-child(2) { animation-delay: .15s; background: #7c3aed; }
.bx-ai-dots i:nth-child(3) { animation-delay: .3s; background: var(--accent-500); }
@keyframes bxDots { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-5px); opacity: 1; } }
.bx-ai-best { width: 100%; display: flex; align-items: center; gap: .8rem; padding: .8rem; border: 1.5px solid #dcdaf6; border-radius: 16px; background: linear-gradient(135deg, #f7f6ff, #ffffff); text-align: left; color: var(--ink); animation: bxPop .45s var(--bx-spring) both; transition: transform .2s var(--bx-ease), box-shadow .25s, border-color .2s; }
.bx-ai-best:hover { border-color: var(--brand-600); box-shadow: 0 14px 28px -18px rgba(48,46,119,.55); transform: translateY(-1px); }
.bx-ai-best:active, .bx-ai-best.is-picked { transform: scale(.98); }
.bx-ai-best-icon { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-700), var(--accent-600)); color: #fff; box-shadow: 0 10px 20px -10px rgba(48,46,119,.7); }
.bx-ai-best-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.bx-ai-best-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.bx-ai-pill { display: inline-flex; align-items: center; gap: .25rem; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #0f7a4f; background: var(--success-bg); padding: .15rem .45rem; border-radius: 999px; }
.bx-ai-pill .icon { width: 11px; height: 11px; }
.bx-ai-pct { font-size: .74rem; font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.bx-ai-best strong { font: 800 .98rem/1.25 var(--font-display); }
.bx-ai-bar { display: block; height: 5px; border-radius: 999px; background: #eceafb; overflow: hidden; margin-top: .15rem; }
.bx-ai-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--brand-700), #7c3aed); animation: bxGrow .9s var(--bx-ease) both .15s; }
@keyframes bxGrow { from { width: 0; } }
.bx-ai-why { font-size: .74rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-ai-why mark { background: #fef3c7; color: #92400e; padding: 0 .3rem; border-radius: 5px; font-weight: 600; }
.bx-ai-go { flex: none; padding: .45rem .8rem; border-radius: 999px; background: var(--brand-700); color: #fff; font-size: .78rem; font-weight: 700; }
.bx-ai-alts { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .55rem; font-size: .74rem; color: var(--ink-3); animation: bxRise .4s var(--bx-ease) both .1s; }
.bx-ai-alt { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .76rem; font-weight: 600; color: var(--ink-2); transition: all .2s; }
.bx-ai-alt:hover { border-color: var(--accent-300); background: var(--accent-50); color: var(--brand-700); }
.bx-ai-alt .icon { width: 13px; height: 13px; }
.bx-ai-alt b { color: var(--ink-3); font-weight: 600; }
.bx-ai-none { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .55rem .3rem; font-size: .82rem; color: var(--ink-3); animation: bxRise .3s var(--bx-ease) both; }

.bx-browse-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.bx-browse-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bx-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; padding: 4px; margin-bottom: .7rem; background: #f1f4f9; border-radius: 14px; }
.bx-cat { position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .5rem .25rem; border: 0; border-radius: 11px; background: transparent; color: var(--ink-3); font-size: .74rem; font-weight: 700; transition: background .25s var(--bx-ease), color .2s, box-shadow .25s; }
.bx-cat b { position: absolute; top: 4px; right: 6px; font-size: .62rem; color: var(--ink-3); font-weight: 700; }
.bx-cat:hover { color: var(--ink); }
.bx-cat.is-active { background: #fff; color: var(--brand-700); box-shadow: 0 2px 8px -2px rgba(15,23,42,.15); }
.bx-cat:focus-visible { box-shadow: var(--focus); outline: none; }
.bx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.bx-tile { position: relative; display: flex; align-items: center; gap: .6rem; padding: .7rem; min-height: 62px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; margin: 0; transition: border-color .2s, background .2s, transform .2s var(--bx-ease), box-shadow .25s; }
.bx-tile input { position: absolute; opacity: 0; pointer-events: none; }
.bx-tile:hover { border-color: var(--accent-300); transform: translateY(-1px); }
.bx-tile:active { transform: scale(.97); }
.bx-tile-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-50); color: var(--brand-700); transition: background .25s, color .25s; }
.bx-tile-text { min-width: 0; display: flex; flex-direction: column; }
.bx-tile-text strong { font: 700 .82rem/1.2 var(--font-display); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bx-tile-text small { font-size: .7rem; font-weight: 600; color: var(--brand-700); margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-tile .bx-tick { top: -6px; right: -6px; width: 20px; height: 20px; }
.bx-tile:has(input:checked) { border-color: var(--brand-700); background: #f7f6ff; box-shadow: 0 0 0 3px rgba(48,46,119,.08); }
.bx-tile:has(input:checked) .bx-tile-icon { background: var(--brand-700); color: #fff; }
.bx-tile:has(input:checked) .bx-tick { transform: scale(1); }
.bx-tile:has(input:focus-visible) { box-shadow: var(--focus); }
.bx-tile.is-suggested { border-color: #c4b5fd; animation: bxSuggest 1.6s ease-in-out 2; }
.bx-tile.is-suggested::after { content: "✦"; position: absolute; top: 6px; right: 8px; font-size: .7rem; color: #7c3aed; }
@keyframes bxSuggest { 50% { box-shadow: 0 0 0 5px rgba(124,58,237,.15); } }
.bx-pop-in { animation: bxPop .4s var(--bx-spring) both; animation-delay: calc(var(--i, 0) * 50ms); }

@media (max-width: 991.98px) {
  .bx.is-step-1 .bx-stage { height: 13dvh; }
  .bx-ai-box textarea { font-size: 1rem; min-height: 52px; }
}
@media (max-width: 480px) {
  .bx-cat span { font-size: .7rem; }
  .bx-ai-go { display: none; }
  .bx-tile { min-height: 56px; padding: .6rem; }
}

@media (max-width: 991.98px) {
  .bx.has-ai .bx-tiles { display: none; }
  .bx.has-ai .bx-cats { margin-bottom: 0; }
}

/* Short phones (iPhone SE class): keep step 1 on one screen. */
@media (max-width: 991.98px) and (max-height: 720px) {
  .bx.is-step-1 .bx-stage { height: 8dvh; }
  .bx.has-ai .bx-ai-alts, .bx.has-ai .bx-ai-why, .bx.has-ai .bx-browse-head { display: none; }
  .bx-panel[data-panel="1"] .bx-h { font-size: 1.15rem; margin-bottom: .6rem; }
  .bx-ai { margin-bottom: .8rem; }
}

/* ==========================================================================
   Premium pass (all steps): brand band + stepper, canvas + cards, trust panel
   ========================================================================== */
:root { --bx-canvas: #f4f6fa; --bx-card-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 24px -18px rgba(15,23,42,.22); }

/* top bar */
.bx-top { height: 64px; padding: 0 1.25rem; box-shadow: 0 1px 0 rgba(15,23,42,.04); }
:root { --bx-top: 64px; }
.bx-top .brand-name { font-size: 1.12rem; letter-spacing: -.03em; }
.bx-top-title { font: 700 .9rem var(--font-display); color: var(--ink); letter-spacing: -.01em; }
.bx-top-secure { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; border-radius: 999px; background: #f0faf5; color: #0f7a4f; font-size: .76rem; font-weight: 700; }
.bx-top-help { display: inline-flex; align-items: center; gap: .4rem; height: 36px; padding: 0 .85rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: .82rem; font-weight: 700; text-decoration: none; transition: background .2s, color .2s; }
.bx-top-help:hover { background: var(--accent-50); color: var(--brand-700); }

/* sheet: brand band header */
.bx { grid-template-columns: minmax(420px, 500px) minmax(0, 1fr); }
.bx-sheet { background: var(--bx-canvas); box-shadow: 16px 0 48px -24px rgba(15,23,42,.35); }
.bx-band { position: relative; overflow: hidden; padding: 1.15rem 1.5rem 1.1rem; border-bottom: 0; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #4b47b8 0%, rgba(75,71,184,0) 55%), linear-gradient(135deg, #17153f 0%, #262465 55%, #302e77 100%); }
.bx-band::after { content: ""; position: absolute; inset: 0; opacity: .06; pointer-events: none; background-image: repeating-linear-gradient(135deg, #fff 0 1px, transparent 1px 18px); }
.bx-band > * { position: relative; z-index: 1; }
.bx-band .bx-round { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.bx-band .bx-round:hover { background: rgba(255,255,255,.18); }
.bx-band .bx-step-of { align-self: flex-start; padding: .18rem .55rem; border-radius: 999px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.85); font-size: .64rem; letter-spacing: .14em; margin-bottom: .25rem; }
.bx-band .bx-head-text strong { color: #fff; font-size: 1.32rem; font-weight: 800; letter-spacing: -.025em; }
.bx-band-seal { margin-left: auto; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #a7f3d0; }
.bx-stepper { list-style: none; margin: 1.05rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bx-stepper li { position: relative; display: flex; justify-content: center; }
.bx-stepper li + li::before { content: ""; position: absolute; top: 17px; right: calc(50% + 21px); left: calc(-50% + 21px); height: 2px; border-radius: 2px; background: rgba(255,255,255,.16); }
.bx-stepper li.is-done + li::before, .bx-stepper li.is-done + li.is-current::before { background: linear-gradient(90deg, #a5b4fc, #c7d2fe); }
.bx-stepper button { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: .35rem; cursor: pointer; }
.bx-stepper button:disabled { cursor: default; }
.bx-stepper button:focus-visible .bx-stepper-dot { box-shadow: 0 0 0 3px rgba(199,197,245,.6); }
.bx-stepper-dot { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.22); color: rgba(255,255,255,.65); transition: all .35s var(--bx-ease); }
.bx-stepper-ok { display: none; }
.bx-stepper-label { font-size: .66rem; font-weight: 700; color: rgba(255,255,255,.55); letter-spacing: .02em; white-space: nowrap; }
.bx-stepper .is-done .bx-stepper-dot { background: #c7d2fe; border-color: #c7d2fe; color: var(--brand-800); }
.bx-stepper .is-done .bx-stepper-ic { display: none; }
.bx-stepper .is-done .bx-stepper-ok { display: grid; }
.bx-stepper .is-done .bx-stepper-label { color: rgba(255,255,255,.8); }
.bx-stepper .is-done button:not(:disabled):hover .bx-stepper-dot { transform: scale(1.08); }
.bx-stepper .is-current .bx-stepper-dot { background: #fff; border-color: #fff; color: var(--brand-700); box-shadow: 0 0 0 5px rgba(255,255,255,.14), 0 10px 24px -8px rgba(0,0,0,.45); transform: scale(1.06); }
.bx-stepper .is-current .bx-stepper-label { color: #fff; }

/* canvas + cards */
.bx-body { background: var(--bx-canvas); padding: 1.35rem 1.5rem 1.6rem; }
.bx-h { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.bx-sub { font-size: .9rem; color: #5b6578; }
.bx-label { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #475569; }
.bx-label.req::after { color: var(--danger); }
.bx-optional { text-transform: none; letter-spacing: 0; }
.bx-ai, .bx-service, .bx-tile, .bx-opt, .bx-chip-opt span, .bx-amount, .bx-fee[data-state="done"], .bx-fee-static, .bx-textarea textarea,
.bx-place, .bx-geo, .bx-select select, .bx-input, .bx-adv, .bx-rlist, .bx-drop, .bx-cats { box-shadow: var(--bx-card-shadow); }
.bx-tile, .bx-opt, .bx-adv, .bx-geo, .bx-place, .bx-amount, .bx-input, .bx-select select, .bx-textarea textarea, .bx-rlist, .bx-drop { border-color: #e3e8f0; background-color: #fff; }
.bx-place.is-set { background: #f3fbf7; }
.bx-cats { background: #fff; border: 1px solid #e3e8f0; }
.bx-cat.is-active { background: var(--brand-700); color: #fff; box-shadow: 0 8px 18px -10px rgba(48,46,119,.7); }
.bx-cat.is-active b { color: rgba(255,255,255,.75); }
.bx-tile { border-radius: 16px; min-height: 66px; }
.bx-tile-text strong { font-size: .85rem; letter-spacing: -.01em; }
.bx-tile-icon, .bx-opt-icon, .bx-service-icon { background: linear-gradient(135deg, #eef0ff, #f7f7ff); }
.bx-browse-head { color: #64748b; }
.bx-ai { background: linear-gradient(135deg, #c7c5f5, #e9e8f6 45%, #ddd6fe); }
.bx-ai-label { color: var(--brand-800); font-size: .8rem; letter-spacing: .01em; }
.bx-ai-box textarea { font-size: 1.06rem; font-weight: 500; }
.bx-fee[data-state="idle"], .bx-fee[data-state="error"] { background: #fff; }

/* footer */
.bx-foot { background: #fff; border-top: 1px solid #e8ecf2; box-shadow: 0 -12px 32px -24px rgba(15,23,42,.35); padding-top: .95rem; padding-bottom: calc(.95rem + env(safe-area-inset-bottom)); }
.bx-foot-total small { text-transform: uppercase; letter-spacing: .1em; font-size: .64rem; font-weight: 700; }
.bx-foot-total strong { font-size: 1.25rem; letter-spacing: -.02em; }
.bx-cta { height: 54px; border-radius: 16px; letter-spacing: -.01em; background: linear-gradient(135deg, #262465, #302e77 45%, #4b47b8); }

/* trust panel on the map (desktop, steps 1–2 and 5) */
.bx-trust { position: absolute; top: 20px; left: 20px; z-index: 4; width: 290px; padding: 1rem 1.05rem; border-radius: 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(14px) saturate(160%); box-shadow: 0 24px 50px -24px rgba(15,23,42,.45); border: 1px solid rgba(255,255,255,.7); animation: bxRise .6s var(--bx-ease) both .3s; }
.bx-trust-title { display: block; font: 800 .68rem var(--font-text); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-600); margin-bottom: .7rem; }
.bx-trust ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.bx-trust li { display: flex; gap: .65rem; align-items: flex-start; }
.bx-trust-ic { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-700), var(--accent-600)); color: #fff; }
.bx-trust li strong { display: block; font: 700 .86rem var(--font-display); color: var(--ink); }
.bx-trust li small { display: block; font-size: .74rem; color: var(--ink-3); line-height: 1.35; }
.bx.is-step-3 .bx-trust, .bx.is-step-4 .bx-trust { display: none; }

@media (max-width: 1199.98px) { .bx-top-secure { display: none; } }
@media (max-width: 991.98px) {
  :root { --bx-top: 56px; }
  .bx-top { height: 56px; }
  .bx-trust { display: none; }
  .bx-band { padding: .9rem 1.1rem .95rem; border-radius: 24px 24px 0 0; }
  .bx-sheet:has(.bx-band) .bx-grabber { position: absolute; left: 50%; top: 6px; margin: 0; transform: translateX(-50%); background: rgba(255,255,255,.35); z-index: 2; }
  .bx-band .bx-head-text strong { font-size: 1.15rem; }
  .bx-stepper { margin-top: .8rem; }
  .bx-stepper-dot { width: 30px; height: 30px; }
  .bx-stepper li + li::before { top: 14px; right: calc(50% + 18px); left: calc(-50% + 18px); }
  .bx-stepper-label { font-size: .6rem; }
  .bx-body { padding: 1.05rem 1.1rem 1.3rem; }
  .bx-h { font-size: 1.28rem; }
  .bx-top-help span { display: none; }
  .bx-top-help { width: 36px; padding: 0; justify-content: center; }
}
@media (max-width: 991.98px) and (max-height: 720px) {
  .bx-stepper-label { display: none; }
  .bx-stepper { margin-top: .6rem; }
  .bx-band { padding-bottom: .75rem; }
}

/* Tracking, profile and requests keep a white sheet (their grey tiles need the contrast). */
.tk .bx-sheet, .tk .bx-body, .pf .bx-sheet, .pf .bx-body, .rq .bx-sheet, .rq .bx-body { background: #fff; }


/* Shorter desktop screens: keep step 1 on one screen while a match is shown. */
@media (min-width: 992px) and (max-height: 960px) {
  .bx.has-ai .bx-tiles { display: none; }
  .bx.has-ai .bx-cats { margin-bottom: 0; }
}

@media (max-width: 991.98px) { .loc .bx-hint { top: 12px; bottom: auto; } .loc .bx-stage { height: 40dvh; } }

/* ==========================================================================
   Floating components on a full-screen map (.bx-float) — every map view:
   booking journey, request tracking, requests list, advocate profile, office location.
   The map is the canvas; top bar, panel / bottom sheet, chips and controls float above it.
   ========================================================================== */
body:has(.bx-float) { --fl-shadow: 0 1px 2px rgba(24,34,56,.06), 0 12px 32px -12px rgba(24,34,56,.22); --fl-ease: cubic-bezier(.2,.8,.2,1); background: #f5f6fa; overflow: hidden; }
body:has(.bx-float) .bx-top { position: fixed; z-index: 30; top: 14px; left: 14px; right: 14px; height: 60px; padding: 0 .7rem 0 .8rem; border: 0; border-radius: 14px; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(16px); box-shadow: var(--fl-shadow); }
body:has(.bx-float) .bx-top-title { font: 600 .92rem var(--font-text); color: #182238; }
body:has(.bx-float) .bx-top-exit, body:has(.bx-float) .bx-top-help, body:has(.bx-float) .bx-top-account { border-color: #edf0f5; }
body:has(.bx-float) .bx-main { position: fixed; inset: 0; height: auto; }
body:has(.bx-float) .bx-flash { position: fixed; z-index: 31; top: 84px; left: 50%; transform: translateX(-50%); width: min(520px, calc(100% - 28px)); }

.bx.bx-float { display: block; height: 100%; }
.bx.bx-float .bx-stage { position: absolute; inset: 0; height: auto !important; }
.bx.bx-float .bx-map { position: absolute; inset: 0; }
.bx.bx-float .bx-sheet { position: absolute; z-index: 10; left: 18px; top: 92px; bottom: 18px; width: 420px; max-width: calc(100% - 36px); margin: 0; border-radius: 22px; overflow: hidden;
  background: rgba(255,255,255,.97); backdrop-filter: blur(14px); box-shadow: 0 2px 4px rgba(24,34,56,.05), 0 30px 60px -24px rgba(24,34,56,.32);
  transform: translateX(-12px); opacity: 0; transition: transform .35s var(--fl-ease), opacity .3s; }
.bx.bx-float.is-ready .bx-sheet, .bx.bx-float:not(.bx-book):not(.lc-float) .bx-sheet { transform: none; opacity: 1; }
.bx.bx-book.bx-float .bx-sheet { width: 440px; }
.bx.bx-float .bx-grabber { display: none; }
.bx.bx-float .bx-band { border-radius: 0; }
.bx.bx-float .bx-foot { background: rgba(255,255,255,.96); }
/* chips, hint and status centred on the visible map, right of the panel */
.bx.bx-float .bx-chip, .bx.bx-float .bx-hint { left: calc(458px + (100% - 458px) / 2); }
.bx.bx-float .bx-chip { top: 92px; }
.bx.bx-float .bx-ctrl { right: 22px; bottom: 26px; gap: 10px; }
.bx.bx-float .bx-ctrl-btn { width: 46px; height: 46px; border-radius: 14px; box-shadow: var(--fl-shadow); transition: transform .2s var(--fl-ease), box-shadow .2s, background .2s, color .2s; }
.bx.bx-float .bx-ctrl-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(24,34,56,.3); }
.bx.bx-float .bx-ctrl-btn[data-zoom] { display: grid; }
.bx.bx-float .bx-trust { top: auto; bottom: 26px; right: 86px; left: auto; }
/* centre-pin steps: the pin is the screen centre, so the hint follows it */
.bx.bx-float.is-picking .bx-hint { left: 50%; }

@media (max-width: 1100px) {
  .bx.bx-float .bx-sheet { width: 370px; }
  .bx.bx-book.bx-float .bx-sheet { width: 390px; }
  .bx.bx-float .bx-chip, .bx.bx-float .bx-hint { left: calc(408px + (100% - 408px) / 2); }
  .bx.bx-float .bx-trust { display: none; }
}

/* phones: map behind, compact floating header, panel becomes a draggable bottom sheet */
@media (max-width: 760px) {
  body:has(.bx-float) .bx-top { top: 10px; left: 10px; right: 10px; height: 52px; }
  .bx.bx-float .bx-sheet { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto !important; max-width: none; max-height: 70dvh; border-radius: 22px; display: flex; flex-direction: column; transform: translateY(16px); }
  .bx.bx-float.is-ready .bx-sheet, .bx.bx-float:not(.bx-book):not(.lc-float) .bx-sheet { transform: none; }
  .bx.bx-float .bx-grabber { display: block; flex: none; position: relative; width: 100%; height: 22px; margin: 0; background: none; cursor: grab; touch-action: none; }
  .bx.bx-float .bx-grabber::after { content: ""; position: absolute; left: 50%; top: 8px; width: 42px; height: 5px; border-radius: 999px; background: #d9dde6; transform: translateX(-50%); }
  .bx.bx-float .bx-body { min-height: 0; overflow-y: auto; transition: max-height .3s var(--fl-ease); }
  .bx.bx-float .bx-sheet.is-collapsed .bx-body { max-height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
  .bx.bx-float .bx-chip, .bx.bx-float .bx-hint { left: 50%; }
  .bx.bx-float .bx-chip { top: 74px; }
  .bx.bx-float .bx-ctrl { right: 14px; bottom: auto; top: 74px; }
  .bx.bx-float .bx-ctrl-btn[data-zoom] { display: none; }
  .bx.bx-float .bx-hint { display: none; }
  /* booking journey: the sheet is the main surface, so it opens taller */
  .bx.bx-book.bx-float .bx-sheet { max-height: 74dvh; }
  .bx.bx-book.bx-float.is-step-3 .bx-sheet, .bx.bx-book.bx-float.is-step-4 .bx-sheet { max-height: 52dvh; }
}
@media (prefers-reduced-motion: reduce) { .bx.bx-float .bx-sheet, .bx.bx-float .bx-ctrl-btn, .bx.bx-float .bx-body { transition: none; } }
/* profile and tracking panels carry two-button footers: a little wider so labels fit */
.bx.bx-float.pf .bx-sheet, .bx.bx-float.tk .bx-sheet { width: 460px; }
@media (max-width: 1100px) { .bx.bx-float.pf .bx-sheet, .bx.bx-float.tk .bx-sheet { width: 410px; } }
/* advocate profile: four footer actions (call, message, email, request) need a bit more room */
.bx.bx-float.pf .bx-sheet { width: 488px; }
@media (max-width: 1100px) { .bx.bx-float.pf .bx-sheet { width: 430px; } }
/* inside the floating sheet only the middle scrolls; header band and footer keep their size */
.bx.bx-float .bx-sheet > .bx-head, .bx.bx-float .bx-sheet > .bx-foot, .bx.bx-float .bx-sheet > form > .bx-head, .bx.bx-float .bx-sheet > form > .bx-foot { flex: none; }
.bx.bx-float .bx-sheet > .bx-body, .bx.bx-float .bx-sheet > form > .bx-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
@media (max-width: 760px) {
  /* step 3 places a centre pin at the screen centre: keep the sheet below it */
  .bx.bx-book.bx-float.is-step-3 .bx-sheet { max-height: calc(50dvh - 30px); }
}

/* Review step, signed out: total on its own line, the two sign-in buttons share the row below */
.bx-foot:has(.bx-guest:not([hidden])) { flex-wrap: wrap; row-gap: .6rem; }
.bx-foot:has(.bx-guest:not([hidden])) .bx-foot-total { flex: 1 1 100%; display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.bx-foot:has(.bx-guest:not([hidden])) .bx-foot-total small { margin: 0; }
.bx-foot:has(.bx-guest:not([hidden])) .bx-foot-total strong { white-space: nowrap; }
.bx-foot .bx-guest:not([hidden]) { flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: .6rem; }
.bx-foot .bx-guest .btn, .bx-foot .bx-guest .bx-cta { width: 100%; min-width: 0; justify-content: center; white-space: nowrap; }
.bx-foot .bx-guest .btn { display: inline-flex; align-items: center; min-height: 52px; border-radius: 16px; font-weight: 700; }

/* ==========================================================================
   Distance card (step 4): floats on the map after choosing an advocate.
   Road distance + drive time from the routing engine, straight line as fallback.
   ========================================================================== */
.bx-dc { position: absolute; z-index: 8; top: 92px; right: 22px; width: 360px; padding: 1rem 1.05rem 1rem; border-radius: 20px; background: rgba(255,255,255,.97); backdrop-filter: blur(14px);
  box-shadow: 0 2px 4px rgba(24,34,56,.05), 0 28px 56px -22px rgba(24,34,56,.4); font-family: var(--font-text); animation: bxDcIn .42s cubic-bezier(.2,.9,.25,1.15) both; transform-origin: top right; }
.bx-dc.is-leaving { animation: bxDcOut .2s ease-in both; }
@keyframes bxDcIn { from { opacity: 0; transform: translateY(-10px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes bxDcOut { to { opacity: 0; transform: translateY(-6px) scale(.97); } }
.bx-dc-x { position: absolute; top: .65rem; right: .65rem; width: 30px; height: 30px; border: 0; border-radius: 10px; display: grid; place-items: center; background: #f1f3f8; color: var(--ink-3); cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.bx-dc-x:hover { background: #e7e9f1; color: var(--ink); transform: rotate(90deg); }
.bx-dc-eyebrow { display: flex; align-items: center; gap: .4rem; margin: 0 2.2rem .8rem 0; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-600); }
.bx-dc-route { display: grid; grid-template-columns: 76px minmax(0, 1fr) 76px; align-items: start; gap: .3rem; }
.bx-dc-end { display: grid; justify-items: center; text-align: center; gap: .15rem; min-width: 0; }
.bx-dc-end strong { font-size: .8rem; font-weight: 700; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bx-dc-end small { font-size: .68rem; color: var(--ink-3); line-height: 1.25; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bx-dc-you { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #2563eb; color: #fff; box-shadow: 0 0 0 5px rgba(37,99,235,.16); margin-bottom: .2rem; }
.bx-dc-avatar { width: 42px; height: 42px; border-radius: 13px; object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-700), var(--accent-600)); color: #fff; font: 800 .82rem var(--font-display); box-shadow: 0 0 0 3px #fff, 0 8px 16px -8px rgba(48,46,119,.7); margin-bottom: .2rem; }
.bx-dc-mid { display: grid; justify-items: center; padding-top: .1rem; }
.bx-dc-km { display: flex; align-items: baseline; gap: .25rem; white-space: nowrap; }
.bx-dc-km strong { font: 800 1.75rem/1 var(--font-display); letter-spacing: -.03em; color: var(--brand-900); font-variant-numeric: tabular-nums; }
.bx-dc-km span { font-size: .72rem; font-weight: 700; color: var(--ink-3); }
.bx-dc-track { position: relative; width: 100%; height: 14px; margin-top: .45rem; }
.bx-dc-line { position: absolute; left: 0; right: 0; top: 6px; height: 2px; background-image: linear-gradient(90deg, var(--accent-600) 50%, transparent 0); background-size: 10px 2px; animation: bxDcDash .9s linear infinite; }
@keyframes bxDcDash { to { background-position: 10px 0; } }
.bx-dc-track::before, .bx-dc-track::after { content: ""; position: absolute; top: 3px; width: 8px; height: 8px; border-radius: 50%; }
.bx-dc-track::before { left: -2px; background: #2563eb; }
.bx-dc-track::after { right: -2px; background: var(--brand-700); }
.bx-dc-runner { position: absolute; top: 2px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid var(--accent-600); box-shadow: 0 2px 6px rgba(48,46,119,.4); animation: bxDcRun 2.4s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes bxDcRun { 0% { left: 0; } 50% { left: calc(100% - 10px); } 100% { left: 0; } }
.bx-dc-drive { display: flex; align-items: center; justify-content: center; gap: .4rem; margin: .8rem 0 0; padding: .45rem .7rem; border-radius: 12px; background: #f4f5fa; font-size: .8rem; color: var(--ink-3); }
.bx-dc-drive.is-ready { background: var(--accent-50); color: var(--brand-800); }
.bx-dc-drive strong { font-weight: 700; }
.bx-dc-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #d5d9e6; border-top-color: var(--accent-600); animation: peSpin .8s linear infinite; }
@keyframes peSpin { to { transform: rotate(360deg); } }
.bx-dc-note { margin: .5rem 0 0; font-size: .7rem; line-height: 1.4; color: var(--ink-3); text-align: center; }
.bx-dc-actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .85rem; padding-top: .8rem; border-top: 1px solid #f0f2f6; }
.bx-dc-link { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; color: var(--brand-700); text-decoration: none; }
.bx-dc-link:hover { text-decoration: underline; }
.bx-dc-go { display: inline-flex; align-items: center; gap: .35rem; height: 40px; padding: 0 .95rem; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--brand-800), var(--brand-700) 50%, var(--accent-600)); color: #fff; font-size: .82rem; font-weight: 700; cursor: pointer; box-shadow: 0 10px 20px -12px rgba(48,46,119,.9); transition: transform .2s, filter .2s; max-width: 62%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bx-dc-go:hover { transform: translateY(-1px); filter: brightness(1.07); }
/* road route: animated draw-in */
.wkm-route, .wkm-route-casing { stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: wkmDraw 1.1s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes wkmDraw { to { stroke-dashoffset: 0; } }
.bx-ctrl-btn.is-route { color: var(--brand-700); }
.leaflet-control-scale-line { border-color: rgba(24,34,56,.55); background: rgba(255,255,255,.8); color: #182238; font: 600 10px var(--font-text); }
body:has(.bx-float) .leaflet-bottom.leaflet-left { left: 470px; bottom: 6px; }
@media (max-width: 1100px) { .bx-dc { width: 320px; } body:has(.bx-float) .leaflet-bottom.leaflet-left { left: 420px; } }
@media (max-width: 760px) {
  .bx-dc { top: 70px; left: 10px; right: 10px; width: auto; padding: .8rem .85rem .85rem; border-radius: 18px; transform-origin: top center; }
  .bx-dc-route { grid-template-columns: 64px minmax(0, 1fr) 64px; }
  .bx-dc-km strong { font-size: 1.45rem; }
  .bx-dc-note { display: none; }
  .bx-dc-actions { margin-top: .6rem; padding-top: .6rem; }
  body:has(.bx-float) .leaflet-bottom.leaflet-left { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bx-dc, .bx-dc.is-leaving, .bx-dc-line, .bx-dc-runner, .wkm-route, .wkm-route-casing, .bx-dc-spin { animation: none; } .wkm-route, .wkm-route-casing { stroke-dashoffset: 0; } }
/* while the distance card is open, the "found nearby" chip steps aside */
.bx.has-dc .bx-chip { opacity: 0; transform: translateX(-50%) translateY(-6px); pointer-events: none; transition: opacity .2s, transform .2s; }
.bx.has-dc .bx-chip { display: none !important; }
/* a hidden footer button must stay hidden (display rules above would otherwise show it) */
.bx-foot .bx-cta[hidden] { display: none !important; }
.bx-switch { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .7rem; margin: 0; }
.bx-switch span { flex: 1; min-width: 160px; }
.bx-switch .btn { border-radius: 10px; font-weight: 700; }

/* Step 4: advocates suggested for the client's issue (from their experience entries) */
.bx-adv.is-suggested { border-color: var(--accent-300); background: linear-gradient(180deg, #faf9ff, #fff 70%); }
.bx-sugg { display: inline-flex; align-items: center; gap: .3rem; margin: .1rem 0 .3rem; padding: .18rem .55rem; border-radius: 999px; background: linear-gradient(135deg, var(--brand-700), var(--accent-600)); color: #fff; font-size: .7rem; font-weight: 700; }
.bx-sugg .icon { width: 12px; height: 12px; }
.bx-adv-exp { display: flex; align-items: flex-start; gap: .35rem; margin: .3rem 0 .2rem; font-size: .78rem; font-weight: 600; color: var(--brand-800); line-height: 1.35; }
.bx-adv-exp .icon { flex: none; margin-top: .1rem; color: var(--accent-600); }
