/* "Request a lawyer" chat (find/chat.php, chat.js): floating chat panel on the full-screen map (.bx-float).
 * 2026-11-22 redesign: step progress, assistant avatar, match card, searchable picker, location tiles + switch,
 * icon fields, 6-box SMS code with resend timer, success card with reference + next steps. */
.ch {
  --ch-line: #e5eaf1; --ch-line-2: #d8dfe9; --ch-muted: #64748b; --ch-ink: #172b4d; --ch-bg: #f6f7fb;
  --ch-ok: #16a36a; --ch-ok-bg: #e7f6ef; --ch-warn: #b45309; --ch-warn-bg: #fff4e0; --ch-bad: #d92d3a; --ch-bad-bg: #fdecee;
  --ch-r: 16px; --ch-ease: cubic-bezier(.2,.8,.2,1);
}
.bx.bx-float.ch .bx-sheet { width: 452px; display: flex; flex-direction: column; background: #fff; overflow: hidden; }
.ch .icon { flex: none; }

/* ---------------------------------------------------------------- header + progress */
.ch-head { flex: none; display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem .85rem; background: linear-gradient(135deg, var(--brand-900), var(--brand-700)); color: #fff; }
.ch-avatar { position: relative; flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.ch-avatar-dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #34d399; border: 2px solid var(--brand-800); }
.ch-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ch-head-text strong { font: 800 1.05rem/1.2 var(--font-heading, Manrope, sans-serif); letter-spacing: -.01em; }
.ch-head-text small { font-size: .75rem; color: var(--accent-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-lang { display: flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.ch-lang a { padding: .28rem .65rem; border-radius: 999px; font: 700 .74rem var(--font-text); color: #fff; text-decoration: none; opacity: .7; transition: opacity .15s; }
.ch-lang a:hover { opacity: 1; color: #fff; }
.ch-lang a[aria-current] { background: #fff; color: var(--brand-800); opacity: 1; }

.ch-steps { flex: none; padding: 0 1.1rem .85rem; background: var(--brand-700); }
.ch-steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ch-steps li { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ch-steps li::before { content: ""; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); transition: background .35s var(--ch-ease); }
.ch-steps li.is-done::before { background: #fff; }
.ch-steps li.is-current::before { background: linear-gradient(90deg, #fff 50%, rgba(255,255,255,.35)); }
.ch-steps span { font: 600 .68rem var(--font-text); color: rgba(255,255,255,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-steps li.is-done span, .ch-steps li.is-current span { color: #fff; }

/* ---------------------------------------------------------------- conversation */
.ch-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 1.1rem 1rem .75rem; display: flex; flex-direction: column; gap: .55rem; background: var(--ch-bg); scroll-padding-bottom: 1rem; }
.ch-row { display: flex; align-items: flex-end; gap: .5rem; animation: ch-in .3s var(--ch-ease) both; }
.ch-row.is-me { justify-content: flex-end; margin-top: .2rem; }
.ch-ava { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-700); color: #fff; }
.ch-ava .icon { width: 16px; height: 16px; }
.ch-row.is-cont .ch-ava { visibility: hidden; }
.ch-bubble { max-width: 84%; padding: .7rem .9rem; border-radius: 18px 18px 18px 6px; font-size: .925rem; line-height: 1.5; color: var(--ch-ink); background: #fff; box-shadow: 0 1px 2px rgba(23,43,77,.06), 0 0 0 1px var(--ch-line); overflow-wrap: anywhere; }
.ch-row.is-me .ch-bubble { background: var(--brand-700); color: #fff; box-shadow: 0 6px 16px -10px rgba(48,46,119,.7); border-radius: 18px 18px 6px 18px; }
.ch-typing { display: inline-flex; gap: 4px; padding: .85rem .95rem; }
.ch-typing i { width: 7px; height: 7px; border-radius: 50%; background: #a5abc0; animation: ch-dot 1s infinite ease-in-out; }
.ch-typing i:nth-child(2) { animation-delay: .15s; } .ch-typing i:nth-child(3) { animation-delay: .3s; }
.ch-think { display: inline-flex; align-items: center; gap: .45rem; color: var(--ch-muted); }
.ch-think .icon { color: var(--accent-600); animation: ch-spark 1.4s infinite ease-in-out; }

/* ---------------------------------------------------------------- cards (shared) */
.ch-card { margin-left: 38px; padding: 1rem; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--ch-line), 0 12px 32px -22px rgba(23,43,77,.45); display: flex; flex-direction: column; gap: .7rem; animation: ch-in .34s var(--ch-ease) both; }
.ch-card.is-done:not(.is-final) { opacity: .5; pointer-events: none; filter: saturate(.6); }
.ch-card.is-done:not(.is-final) .ch-actions { display: none; }
.ch-card.is-done:not(.is-final):has(> .ch-actions:only-child) { display: none; }
.ch-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ch .ch-actions .btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; border-radius: 14px; font-weight: 700; }
.ch .ch-actions .btn-lg { min-height: 52px; font-size: 1rem; }
.ch .btn-ghost { background: var(--ch-bg); border: 1px solid transparent; color: var(--brand-800); }
.ch .btn-ghost:hover { background: var(--accent-50); color: var(--brand-800); }
.ch .btn .icon { width: 17px; height: 17px; }
.ch .btn.is-loading { opacity: .9; }
.ch-spin { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ch-rot .7s linear infinite; opacity: .8; }
.ch-err { margin: 0; display: flex; gap: .5rem; align-items: flex-start; padding: .6rem .75rem; border-radius: 12px; background: var(--ch-bad-bg); color: #a61e2c; font-size: .85rem; line-height: 1.4; animation: ch-shake .35s; }
.ch-err .icon { width: 16px; height: 16px; margin-top: 1px; }
.ch-link { display: inline-flex; align-items: center; gap: .35rem; align-self: flex-start; padding: 0; border: 0; background: none; color: var(--accent-600); font-size: .84rem; font-weight: 700; }
.ch-link:hover { color: var(--brand-800); text-decoration: underline; }
.ch-link:disabled { color: var(--ch-muted); font-weight: 600; text-decoration: none; cursor: default; }
.ch-link .icon { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- step 2: match card + picker */
.ch-match { display: flex; gap: .85rem; align-items: flex-start; padding: .85rem; border-radius: 16px; background: linear-gradient(135deg, var(--accent-50), #fff); box-shadow: inset 0 0 0 1px #e4e2fb; }
.ch-match-ico, .ch-opt-ico { flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--brand-700); color: #fff; }
.ch-match-ico { width: 46px; height: 46px; border-radius: 14px; }
.ch-match-ico .icon { width: 22px; height: 22px; }
.ch-match-text { min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.ch-match-text small { display: inline-flex; align-items: center; gap: .3rem; font: 700 .7rem var(--font-text); letter-spacing: .04em; text-transform: uppercase; color: var(--accent-600); }
.ch-match-text small .icon { width: 13px; height: 13px; }
.ch-match-text strong { font: 800 1.02rem/1.3 var(--font-heading, Manrope, sans-serif); color: var(--ch-ink); }
.ch-match-text p { margin: .15rem 0 0; font-size: .8rem; color: var(--ch-muted); line-height: 1.6; }
.ch-match-text mark { padding: .05rem .4rem; border-radius: 6px; background: #fff; color: var(--brand-800); font-weight: 600; box-shadow: inset 0 0 0 1px #e4e2fb; }
.ch-alts { display: flex; flex-direction: column; gap: .4rem; padding-top: .2rem; border-top: 1px dashed var(--ch-line-2); }
.ch-alts > small { font-size: .78rem; font-weight: 600; color: var(--ch-muted); padding-top: .5rem; }

.ch-opt { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .7rem; border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--ch-line); color: var(--ch-ink); font-size: .9rem; font-weight: 600; text-align: left; transition: box-shadow .15s, background .15s, transform .1s; }
.ch-opt:hover, .ch-opt:focus-visible { background: var(--accent-50); box-shadow: inset 0 0 0 1.5px var(--accent-500); outline: none; }
.ch-opt:active { transform: scale(.985); }
.ch-opt[aria-current] { box-shadow: inset 0 0 0 1.5px var(--brand-700); }
.ch-opt-ico { width: 34px; height: 34px; background: var(--accent-50); color: var(--brand-700); }
.ch-opt-ico .icon { width: 17px; height: 17px; }
.ch-opt-name { flex: 1; min-width: 0; line-height: 1.3; }
.ch-opt > .icon:last-child { color: #a3adbf; width: 16px; height: 16px; }
.ch-opt.is-sm { padding: .45rem .6rem; font-size: .85rem; }
.ch-opt.is-sm .ch-opt-ico { width: 28px; height: 28px; border-radius: 9px; }

.ch-search { display: flex; align-items: center; gap: .55rem; padding: 0 .85rem; min-height: 46px; border-radius: 14px; background: var(--ch-bg); box-shadow: inset 0 0 0 1px var(--ch-line); color: var(--ch-muted); transition: box-shadow .15s, background .15s; }
.ch-search:focus-within { background: #fff; box-shadow: inset 0 0 0 1.5px var(--accent-500), 0 0 0 4px var(--accent-50); }
.ch-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: .92rem; color: var(--ch-ink); }
.ch-tabs { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; margin: 0 -.15rem; padding: 0 .15rem; }
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tabs button { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border: 0; border-radius: 999px; background: var(--ch-bg); color: var(--ch-muted); font: 700 .8rem var(--font-text); transition: background .15s, color .15s; }
.ch-tabs button .icon { width: 15px; height: 15px; }
.ch-tabs button[aria-selected="true"] { background: var(--brand-700); color: #fff; }
.ch-card.is-searching .ch-tabs { opacity: .55; }
.ch-list { display: flex; flex-direction: column; gap: .4rem; max-height: 300px; overflow-y: auto; margin: 0 -.25rem; padding: .1rem .25rem; }
.ch-empty { margin: 0; padding: .9rem; text-align: center; font-size: .86rem; color: var(--ch-muted); background: var(--ch-bg); border-radius: 12px; }

/* ---------------------------------------------------------------- step 3: location */
.ch-loc-status { display: flex; align-items: center; gap: .55rem; margin: 0; padding: .7rem .85rem; border-radius: 14px; background: var(--ch-bg); font-size: .88rem; color: var(--ch-muted); }
.ch-loc-status.is-ok { background: var(--ch-ok-bg); color: #0f7a4d; font-weight: 700; }
.ch-loc-status.is-ok .icon { width: 18px; height: 18px; }
.ch-loc-status.is-warn { background: var(--ch-warn-bg); color: var(--ch-warn); }
.ch-loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ch-tile, .ch-select { display: flex; align-items: center; gap: .5rem; min-height: 50px; padding: 0 .8rem; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--ch-line-2); color: var(--ch-ink); font-size: .86rem; font-weight: 700; transition: box-shadow .15s, background .15s; }
.ch-tile { border: 0; text-align: left; }
.ch-tile .icon, .ch-select .icon { color: var(--accent-600); }
.ch-tile:hover, .ch-select:hover { box-shadow: inset 0 0 0 1.5px var(--accent-500); background: var(--accent-50); }
.ch-select { position: relative; cursor: pointer; }
.ch-select select { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 1rem; text-overflow: ellipsis; }
.ch-select::after { content: ""; position: absolute; right: .8rem; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--ch-muted); border-bottom: 2px solid var(--ch-muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.ch-select:focus-within, .ch-tile:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent-500), 0 0 0 4px var(--accent-50); }
.ch-hint { display: flex; gap: .45rem; align-items: flex-start; margin: 0; font-size: .78rem; color: var(--ch-muted); line-height: 1.4; }
.ch-hint .icon { width: 14px; height: 14px; margin-top: 2px; }

.ch-switch { position: relative; display: flex; align-items: center; gap: .7rem; padding: .75rem .8rem; border-radius: 16px; background: var(--ch-bg); cursor: pointer; }
.ch-switch-ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: #fff; color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--ch-line); }
.ch-switch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ch-switch-text b { font-size: .87rem; color: var(--ch-ink); }
.ch-switch-text small { font-size: .76rem; color: var(--ch-muted); line-height: 1.35; }
.ch-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ch-toggle { flex: none; position: relative; width: 44px; height: 26px; border-radius: 999px; background: #cfd6e2; transition: background .2s; }
.ch-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ch-ease); }
.ch-switch input:checked + .ch-toggle { background: var(--ch-ok); }
.ch-switch input:checked + .ch-toggle::after { transform: translateX(18px); }
.ch-switch input:focus-visible + .ch-toggle { box-shadow: 0 0 0 4px var(--accent-50), 0 0 0 2px var(--accent-500); }

/* ---------------------------------------------------------------- step 4: contact + code */
.ch-details { display: flex; flex-direction: column; gap: .7rem; }
.ch-field { display: flex; flex-direction: column; gap: .3rem; }
.ch-field label { font: 700 .78rem var(--font-text); color: var(--ch-ink); }
.ch-ctl { display: flex; align-items: center; gap: .55rem; min-height: 50px; padding: 0 .85rem; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--ch-line-2); color: #94a3b8; transition: box-shadow .15s; }
.ch-ctl:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent-600), 0 0 0 4px var(--accent-50); color: var(--accent-600); }
.ch-ctl.is-invalid { box-shadow: inset 0 0 0 1.5px var(--ch-bad), 0 0 0 4px var(--ch-bad-bg); color: var(--ch-bad); }
.ch-ctl input { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; font-size: .97rem; color: var(--ch-ink); }
.ch-ctl input::placeholder { color: #a3adbf; }
.ch-ctl.is-phone { padding-left: 0; overflow: hidden; }
.ch-cc { align-self: stretch; display: grid; place-items: center; padding: 0 .8rem; margin-right: .1rem; background: var(--ch-bg); border-right: 1px solid var(--ch-line); color: var(--ch-ink); font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; }
.ch-ctl.is-phone input { letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ch-add-email { margin-top: -.15rem; }

.ch-consent { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .7rem .8rem; border-radius: 14px; background: var(--ch-bg); transition: box-shadow .2s; }
.ch-consent.is-attn { box-shadow: inset 0 0 0 1.5px var(--ch-bad); }
.ch-consent label { flex: 1 1 220px; display: flex; gap: .6rem; align-items: flex-start; font-size: .84rem; font-weight: 600; color: var(--ch-ink); line-height: 1.4; cursor: pointer; }
.ch-consent input { flex: none; width: 20px; height: 20px; margin-top: 0; accent-color: var(--brand-700); cursor: pointer; }
.ch-consent .ch-link { font-size: .78rem; margin-left: 1.9rem; }
.ch-consent-full { flex-basis: 100%; margin: .2rem 0 0; font-size: .76rem; line-height: 1.5; color: var(--ch-muted); }
.ch-note { display: flex; gap: .45rem; align-items: flex-start; margin: 0; font-size: .76rem; color: var(--ch-muted); line-height: 1.4; }
.ch-note .icon { width: 14px; height: 14px; margin-top: 1px; color: var(--ch-ok); }

.ch-who { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border-radius: 14px; background: var(--ch-bg); color: var(--brand-700); }
.ch-who > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-who b { font-size: .9rem; color: var(--ch-ink); }
.ch-who small { font-size: .8rem; color: var(--ch-muted); font-variant-numeric: tabular-nums; }
.ch-who > .icon:last-child { color: var(--ch-ok); }

.ch-otp-panel { display: flex; flex-direction: column; gap: .45rem; align-items: center; text-align: center; padding: .4rem 0 .1rem; animation: ch-in .3s var(--ch-ease) both; }
.ch-otp-panel > strong { font: 800 1.02rem var(--font-heading, Manrope, sans-serif); color: var(--ch-ink); }
.ch-otp-panel > small { font-size: .84rem; color: var(--ch-muted); }
.ch-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 52px)); justify-content: center; gap: .45rem; width: 100%; margin: .35rem 0 .15rem; }
.ch-otp input { width: 100%; height: 58px; border: 0; border-radius: 14px; background: var(--ch-bg); box-shadow: inset 0 0 0 1px var(--ch-line-2); text-align: center; font: 800 1.45rem var(--font-heading, Manrope, sans-serif); color: var(--ch-ink); font-variant-numeric: tabular-nums; caret-color: var(--accent-600); transition: box-shadow .15s, background .15s, transform .15s; }
.ch-otp input:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--accent-600), 0 0 0 4px var(--accent-50); }
.ch-otp input:not(:placeholder-shown), .ch-otp input:valid:not([value=""]) { background: #fff; }
.ch-otp.is-invalid input { box-shadow: inset 0 0 0 1.5px var(--ch-bad); animation: ch-shake .35s; }
.ch-otp-foot { display: flex; justify-content: space-between; width: 100%; gap: 1rem; }

/* ---------------------------------------------------------------- step 5: sent */
.ch-card.is-sent { gap: .85rem; padding: 1.15rem 1rem 1rem; }
.ch-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; }
.ch-done-ico { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--ch-ok-bg); color: var(--ch-ok); margin-bottom: .2rem; }
.ch-done-ico svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.ch-done-ico circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: ch-draw .6s var(--ch-ease) .1s forwards; opacity: .35; }
.ch-done-ico path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: ch-draw .4s var(--ch-ease) .55s forwards; }
.ch-done.is-warn .ch-done-ico { background: var(--ch-warn-bg); color: var(--ch-warn); }
.ch-done strong { font: 800 1.2rem var(--font-heading, Manrope, sans-serif); color: var(--ch-ink); }
.ch-done p { margin: 0; font-size: .88rem; color: var(--ch-muted); line-height: 1.5; }
.ch-ref { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem .7rem 1rem; border-radius: 14px; background: var(--ch-bg); box-shadow: inset 0 0 0 1px var(--ch-line); }
.ch-ref > span { flex: 1; display: flex; flex-direction: column; }
.ch-ref small { font-size: .72rem; font-weight: 700; color: var(--ch-muted); text-transform: uppercase; letter-spacing: .05em; }
.ch-ref b { font: 800 1.1rem var(--font-heading, Manrope, sans-serif); color: var(--brand-800); letter-spacing: .04em; }
.ch-copy { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .7rem; border: 0; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--ch-line-2); color: var(--brand-700); font-size: .8rem; font-weight: 700; }
.ch-copy .icon { width: 15px; height: 15px; }
.ch-copy.is-ok { color: var(--ch-ok); box-shadow: inset 0 0 0 1.5px var(--ch-ok); }
.ch-next > small { display: block; margin-bottom: .45rem; font-size: .72rem; font-weight: 700; color: var(--ch-muted); text-transform: uppercase; letter-spacing: .05em; }
.ch-next ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ch-next li { position: relative; display: flex; gap: .7rem; padding-bottom: .75rem; color: #a3adbf; }
.ch-next li:last-child { padding-bottom: 0; }
.ch-next li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--ch-line); }
.ch-next li:last-child::before { display: none; }
.ch-next li > .icon, .ch-next li > .ch-pulse { flex: none; width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--ch-bg); box-sizing: border-box; }
.ch-next li.is-done > .icon { background: var(--ch-ok); color: #fff; }
.ch-next li.is-done::before { background: var(--ch-ok); }
.ch-pulse { position: relative; display: block; background: var(--accent-600) !important; box-shadow: 0 0 0 0 rgba(75,71,184,.45); animation: ch-ping 1.6s infinite; }
.ch-pulse::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.ch-next li > span { display: flex; flex-direction: column; gap: 1px; padding-top: 2px; }
.ch-next li b { font-size: .87rem; color: var(--ch-muted); }
.ch-next li.is-done b, .ch-next li.is-live b { color: var(--ch-ink); }
.ch-next li small { font-size: .78rem; color: var(--ch-muted); line-height: 1.4; }

/* ---------------------------------------------------------------- composer */
.ch-compose { flex: none; padding: .7rem .85rem .8rem; border-top: 1px solid var(--ch-line); background: #fff; }
.ch-compose[hidden] { display: none; }
.ch-examples { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin: 0 -.85rem .6rem; padding: 0 .85rem; }
.ch-examples::-webkit-scrollbar { display: none; }
.ch-examples[hidden] { display: none; }
.ch-ex { flex: none; padding: .45rem .8rem; border: 0; border-radius: 999px; background: var(--accent-50); color: var(--brand-700); font-size: .8rem; font-weight: 600; box-shadow: inset 0 0 0 1px #e4e2fb; transition: background .15s, box-shadow .15s; }
.ch-ex:hover { background: #fff; box-shadow: inset 0 0 0 1.5px var(--accent-500); }
.ch-input { display: flex; align-items: flex-end; gap: .35rem; padding: .35rem .35rem .35rem .9rem; border-radius: 20px; background: var(--ch-bg); box-shadow: inset 0 0 0 1px var(--ch-line); transition: box-shadow .15s, background .15s; }
.ch-input:focus-within { background: #fff; box-shadow: inset 0 0 0 1.5px var(--accent-500), 0 0 0 4px var(--accent-50); }
.ch-input textarea { flex: 1; min-height: 40px; max-height: 140px; padding: .55rem 0; border: 0; outline: 0; resize: none; background: transparent; font-size: .96rem; line-height: 1.35; color: var(--ch-ink); }
.ch-mic, .ch-send { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 14px; transition: background .15s, transform .1s; }
.ch-mic { background: transparent; color: var(--ch-muted); }
.ch-mic:hover { background: #fff; color: var(--brand-700); }
.ch-mic.is-on { background: var(--ch-bad-bg); color: var(--ch-bad); animation: ch-pulse-red 1.2s infinite; }
.ch-mic.is-off { opacity: .4; }
.ch-send { background: var(--brand-700); color: #fff; box-shadow: 0 6px 14px -8px rgba(48,46,119,.8); }
.ch-send:hover { background: var(--brand-600); }
.ch-send:active, .ch-mic:active { transform: scale(.94); }
.ch-fine { margin: .5rem .2rem 0; font-size: .72rem; color: var(--ch-muted); display: flex; gap: .35rem; align-items: center; }

/* ---------------------------------------------------------------- map: radar + offered advocates */
.ch.is-locating .bx-map { cursor: crosshair; }
.ch-radar { position: relative; display: block; width: 0; height: 0; pointer-events: none; }
.ch-radar i { position: absolute; left: -90px; top: -90px; width: 180px; height: 180px; border-radius: 50%; border: 2px solid var(--accent-600); background: rgba(75,71,184,.08); opacity: 0; animation: ch-radar 2.4s infinite ease-out; }
.ch-radar i:nth-child(2) { animation-delay: .8s; } .ch-radar i:nth-child(3) { animation-delay: 1.6s; }

@keyframes ch-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ch-dot { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
@keyframes ch-pulse-red { 50% { box-shadow: 0 0 0 6px rgba(217,45,58,.12); } }
@keyframes ch-ping { 0% { box-shadow: 0 0 0 0 rgba(75,71,184,.45); } 70% { box-shadow: 0 0 0 8px rgba(75,71,184,0); } 100% { box-shadow: 0 0 0 0 rgba(75,71,184,0); } }
@keyframes ch-radar { 0% { transform: scale(.15); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
@keyframes ch-rot { to { transform: rotate(360deg); } }
@keyframes ch-spark { 50% { transform: scale(1.2) rotate(12deg); } }
@keyframes ch-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@keyframes ch-draw { to { stroke-dashoffset: 0; } }
@keyframes ch-drop { from { opacity: 0; transform: translate(-50%, -14px) scale(.8); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

@media (max-width: 1100px) { .bx.bx-float.ch .bx-sheet { width: 410px; } }
@media (max-width: 760px) {
  .bx.bx-float.ch .bx-sheet { max-height: 80dvh; height: 80dvh; border-radius: 24px 24px 0 0; }
  .bx.bx-float.ch.is-locating .bx-sheet, .bx.bx-float.ch.is-sent .bx-sheet { height: auto; max-height: 60dvh; }
  .ch-head { padding: .35rem 1rem .75rem; }
  .ch-steps { padding: 0 1rem .75rem; }
  .bx.bx-float.ch .bx-grabber { background: var(--brand-900); }
  .bx.bx-float.ch .bx-grabber::after { background: rgba(255,255,255,.4); }
  .bx.bx-float.ch .bx-sheet.is-collapsed .ch-log, .bx.bx-float.ch .bx-sheet.is-collapsed .ch-compose, .bx.bx-float.ch .bx-sheet.is-collapsed .ch-steps { display: none; }
  .bx.bx-float.ch .bx-sheet.is-collapsed { height: auto; }
  .ch-card { margin-left: 0; }
  .ch-log { padding: .9rem .75rem .6rem; }
  .ch-otp { gap: .35rem; }
  .ch-otp input { height: 52px; font-size: 1.3rem; }
}
@media (max-width: 440px) { .ch-loc-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .ch-row, .ch-card, .ch-typing i, .ch-mic.is-on, .ch-otp-panel, .ch-err, .ch-pulse, .wk-adv-pin > span, .wk-adv-pin i, .ch-think .icon { animation: none; }
  .ch-done-ico circle, .ch-done-ico path { animation: none; stroke-dashoffset: 0; }
  .ch-radar i { animation: none; opacity: .5; transform: scale(.6); }
}
