/* Bobby bubble — bottom right, avatar circle, iMessage typing dots. Token: bump ?v= with every edit (rule 134). */
/* Bubble palette (owner 2026-09-15, final): the TOP BAR of the chat window and the
   visitor's own message bubbles wear the navbar blue #232f3e (--hb-amazon-navy); the
   launcher orb, Send button and link pills keep the site's green/teal #0b5852 (the
   button hex). Gold accents and the green ONLINE dot unchanged. */
#hb-bubble-launcher,#hb-bubble-panel{--hb-bubble-blue:#232f3e;--hb-bubble-green:#0b5852;--hb-bubble-imessage:#007aff}
#hb-bubble-launcher{position:fixed;right:18px;bottom:18px;z-index:9999;width:60px;height:60px;border-radius:50%;border:3px solid var(--hb-gold,#f59e0b);background:#0b5852 url('/Images/Author/bobby.webp') center/cover no-repeat;cursor:pointer;box-shadow:0 4px 18px rgba(0,0,0,.35)}
#hb-bubble-launcher.close-mode{background:var(--hb-gold,#f59e0b);animation:hb-shift 4s ease-in-out infinite}
#hb-bubble-launcher.close-mode::before,#hb-bubble-launcher.close-mode::after{content:'';position:absolute;left:50%;top:50%;width:26px;height:3px;background:#fff;border-radius:2px}
#hb-bubble-launcher.close-mode::before{transform:translate(-50%,-50%) rotate(45deg)}
#hb-bubble-launcher.close-mode::after{transform:translate(-50%,-50%) rotate(-45deg)}
@keyframes hb-shift{0%,100%{transform:rotate(-5deg)}50%{transform:rotate(5deg)}}
#hb-bubble-launcher:focus-visible{outline:3px solid #f5c518;outline-offset:2px}
#hb-bubble-panel{position:fixed;right:18px;bottom:90px;top:calc(71px + env(safe-area-inset-top, 0px));z-index:1020;width:min(360px,calc(100vw - 36px));max-height:none;height:auto;display:none;flex-direction:column;background:var(--hb-cream,#fff8ed);border:1px solid rgba(23,32,51,.14);border-radius:16px;overflow:hidden;box-shadow:0 10px 40px rgba(0,0,0,.18)}
@media (min-width:992px){#hb-bubble-panel{top:90px}}
#hb-bubble-panel.open{display:flex}
#hb-bubble-panel,#hb-bubble-panel input,#hb-bubble-panel textarea,#hb-bubble-panel button,.hb-tease{font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Helvetica Neue',Helvetica,Arial,sans-serif}
.hb-head{display:flex;align-items:center;gap:10px;background:var(--hb-bubble-blue,#232f3e);color:#fff;padding:10px 12px;flex:0 0 auto}
.hb-avatar{width:38px;height:38px;border-radius:50%;border:2px solid var(--hb-gold,#f59e0b);background:url('/Images/Author/bobby.webp') center/cover no-repeat;flex:none}
.hb-name{font-weight:700;font-size:15px}
.hb-id{min-width:0;flex:1 1 auto;display:flex;flex-direction:column;gap:1px}
.hb-status{font-size:12px;opacity:.85;white-space:normal;overflow-wrap:anywhere;line-height:1.15}
/* OWNER ASK 2026-09-15: min-height:120px made the flex column unshrinkable, so on short
   viewports (phones in LANDSCAPE, short desktop windows) the overflow was clipped at the
   panel's bottom edge and the INPUT ROW + buttons disappeared. Basis 120px, floor 0: the
   chat area gives up height first, the controls never do. */
.hb-msgs{flex:1 1 120px;min-height:0;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px}
.hb-msg{max-width:85%;padding:8px 11px;border-radius:14px;font-size:14px;line-height:1.4;white-space:pre-wrap}
.hb-msg.bobby{background:#eef3f4;color:#123;align-self:flex-start;border-bottom-left-radius:4px;display:flex;gap:7px;align-items:flex-start}
/* OWNER ASK 2026-09-15: no avatar on every message — it was redundant next to the
   header photo. Old saved transcripts may still carry an empty .mini span; it has no
   styling left, so it renders as nothing. */
.hb-msg.bobby .mini{display:none}
.hb-msg.you{background:var(--hb-bubble-imessage,#007aff);color:#fff;align-self:flex-end;border-bottom-right-radius:4px;position:relative}
/* per-message delete (owner 2026-09-15): a small circle-x at the top-left of the
   visitor's own bubble. Subtle by default, red on hover, always reachable on touch. */
.hb-del{position:absolute;left:-9px;top:-9px;width:19px;height:19px;border-radius:50%;border:1.5px solid #fff;
background:#9aa3ad;color:#fff;font-size:12px;line-height:1;display:flex;align-items:center;justify-content:center;
cursor:pointer;padding:0;opacity:0;transition:opacity .15s ease,transform .15s ease,background .15s ease;
box-shadow:0 1px 4px rgba(0,0,0,.28);font-family:inherit}
.hb-msg.you:hover .hb-del,.hb-msg.you:focus-within .hb-del{opacity:1}
.hb-del:hover{background:#ef4444;transform:scale(1.12)}
.hb-del:focus-visible{opacity:1;outline:2px solid var(--hb-gold,#f59e0b);outline-offset:1px}
@media (hover:none){.hb-del{opacity:.9}}
.hb-msg.hb-gone{opacity:0;transform:translateY(-4px);transition:opacity .18s ease,transform .18s ease}
.hb-note{align-self:center;font-size:11.5px;color:#6b7280;font-style:italic;opacity:.9}
.hb-typing{align-self:flex-start;background:#eef3f4;border-radius:14px;border-bottom-left-radius:4px;padding:10px 14px;display:inline-flex;gap:5px}
.hb-typing span{width:8px;height:8px;border-radius:50%;background:#5a6b73;animation:hb-bounce 1.2s infinite}
.hb-typing span:nth-child(2){animation-delay:.15s}.hb-typing span:nth-child(3){animation-delay:.3s}
@keyframes hb-bounce{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-6px);opacity:1}}
.hb-input{display:flex;gap:8px;padding:10px;border-top:1px solid #e3d9b8;background:#fff;flex:0 0 auto}
.hb-input input,.hb-input textarea{flex:1;border:1px solid var(--hb-gold,#f59e0b);border-radius:20px;padding:8px 12px;font-size:14px}
/* the composer is a TEXTAREA now (owner ask 2026-09-15) so long questions WRAP; it grows with
   the text via inline height and this is the floor/step, never a resize handle. */
.hb-input textarea{font-family:inherit;line-height:1.35;resize:none;display:block;overflow-y:hidden;
background:#fff;color:inherit;min-height:38px}
/* OWNER ASK 2026-09-15: the send button wears the iOS Messages look — system blue
   (#007aff, the same token the visitor's own bubble already uses) as a circular button
   with a white up-arrow, instead of the teal "Send" pill. */
.hb-input button{border:none;border-radius:50%;width:38px;height:38px;padding:0;flex:none;align-self:center;
background:var(--hb-bubble-imessage,#007aff);color:#fff;display:flex;align-items:center;justify-content:center;
cursor:pointer;transition:filter .15s ease,transform .12s ease}
.hb-input button:hover{filter:brightness(1.06)}
.hb-input button:active{transform:scale(.94)}
.hb-input button:focus-visible{outline:2px solid var(--hb-gold,#f59e0b);outline-offset:2px}
.hb-input button svg{display:block}
@keyframes hb-pop-in{0%{transform:scale(0)}70%{transform:scale(1.12)}100%{transform:scale(1)}}
@keyframes hb-nudge{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}
#hb-bubble-launcher{animation:hb-pop-in .45s cubic-bezier(.2,1.4,.4,1) both,hb-breathe 3.5s ease-in-out .5s infinite}
@keyframes hb-breathe{0%,100%{transform:scale(1);box-shadow:0 4px 18px rgba(0,0,0,.35)}50%{transform:scale(1.05);box-shadow:0 4px 26px rgba(245,158,11,.45)}}
#hb-bubble-launcher.hb-attn{animation:hb-nudge 1.6s ease-in-out 3}
@keyframes hb-panel-in{0%{opacity:0;transform:translateY(26px) scale(.6);transform-origin:bottom right}55%{opacity:1;transform:translateY(-4px) scale(1.03)}75%{transform:translateY(2px) scale(.98)}100%{opacity:1;transform:none}}
#hb-bubble-panel.open{animation:hb-panel-in .38s cubic-bezier(.2,1.2,.3,1)}
.hb-dot{width:12px;height:12px;border-radius:50%;background:#f59e0b;flex:none;align-self:center;margin-left:6px;margin-right:2px;box-shadow:0 0 8px 1px currentColor}
.hb-beta{font-size:10px;font-weight:700;letter-spacing:.06em;color:#f5c518;border:1px solid rgba(245,197,24,.55);border-radius:6px;padding:1px 5px;margin-left:6px;align-self:center;opacity:.9;flex:0 0 auto;white-space:nowrap}
#hb-bubble-launcher .hb-badge{position:absolute;top:-6px;right:-6px;min-width:22px;height:22px;border-radius:11px;background:#ef4444;color:#fff;font-size:12px;font-weight:700;display:none;align-items:center;justify-content:center;padding:0 5px;border:2px solid #fff;font-family:inherit}
#hb-bubble-launcher .hb-badge.show{display:inline-flex}
.hb-dot.on{background:#22c55e;color:#22c55e}.hb-dot.off{background:#9ca3af;color:#9ca3af}
.hb-pills{display:flex;flex-wrap:wrap;gap:4px;margin-top:7px;align-items:center}
.hb-pills-label{flex:0 0 100%;font-size:11.5px;opacity:.62;margin-bottom:1px}
.hb-msg.bobby a{display:inline-block;color:var(--hb-bubble-green,#0b5852);background:#fff;border:1.5px solid var(--hb-gold,#f59e0b);border-radius:999px;padding:3px 12px;margin:2px 2px;text-decoration:none;font-weight:600;font-size:13px;box-shadow:0 1px 4px rgba(245,158,11,.25)}
.hb-msg.bobby a.hb-aff{background:#fff4dd;border-color:#e9a008;color:#8a5a06}
.hb-msg.bobby a:hover{background:var(--hb-gold,#f59e0b);color:#fff}
/* the auto-focused input was picking up Chromium's black default ring */
#hb-bubble-panel input:focus,#hb-bubble-panel input:focus-visible,#hb-bubble-panel textarea:focus,#hb-bubble-panel textarea:focus-visible{outline:none;border-color:var(--hb-gold,#f59e0b);box-shadow:0 0 0 3px rgba(245,158,11,.22)}
.hb-tease{position:fixed;right:88px;bottom:34px;z-index:9998;max-width:230px;background:#fff;border:1px solid rgba(23,32,51,.14);border-radius:14px;border-bottom-right-radius:4px;padding:9px 12px;font-size:13.5px;color:#172033;box-shadow:0 6px 22px rgba(0,0,0,.22);cursor:pointer;animation:hb-tease-in .3s cubic-bezier(.2,1.4,.4,1) both}
@keyframes hb-tease-in{from{opacity:0;transform:translateY(8px) scale(.9);transform-origin:bottom right}to{opacity:1;transform:none}}
.hb-tease small{display:block;color:#6b7280;font-size:11px;margin-top:2px}
/* one waiting indicator, never two: iMessage dots, then the same bubble becomes the
   small italic thought line. Clear control sits quietly under the message list. */
.hb-msg.hb-waiting .hb-dots{display:inline-flex;gap:5px;align-items:center;padding:2px 0}
.hb-msg.hb-waiting .hb-dots span{width:8px;height:8px;border-radius:50%;background:#5a6b73;animation:hb-bounce 1.2s infinite}
.hb-msg.hb-waiting .hb-dots span:nth-child(2){animation-delay:.15s}
.hb-msg.hb-waiting .hb-dots span:nth-child(3){animation-delay:.3s}
/* the italic "Bobby is looking that up…" line was REMOVED (owner 2026-09-15): the iMessage
   dials above are the only waiting state she shows — no thought text until the reply lands. */
.hb-foot{display:flex;justify-content:flex-end;padding:0 12px 6px;flex:0 0 auto}
.hb-clear{background:none;border:none;color:#6b7280;font-size:11.5px;cursor:pointer;padding:2px 6px;border-radius:8px;opacity:.75;font-family:inherit}
.hb-clear:hover{opacity:1;background:rgba(11,88,82,.07);color:var(--hb-bubble-green,#0b5852)}
.hb-clear.hb-armed{color:#b45309;font-weight:600;opacity:1}
.hb-clear:focus-visible{outline:2px solid var(--hb-gold,#f59e0b);outline-offset:1px}
@media (prefers-reduced-motion:reduce){#hb-bubble-launcher,#hb-bubble-launcher.close-mode,#hb-bubble-panel.open,.hb-typing span,.hb-tease{animation:none}}
@media (max-width:575px){
#hb-bubble-launcher{right:12px;bottom:calc(12px + env(safe-area-inset-bottom, 0px))}
#hb-bubble-panel{right:12px;left:12px;width:auto;bottom:calc(82px + env(safe-area-inset-bottom, 0px));top:calc(69px + env(safe-area-inset-top, 0px));max-height:none;height:auto;overscroll-behavior:contain}
.hb-msgs{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain}
.hb-tease{right:82px;left:12px;max-width:none;bottom:calc(28px + env(safe-area-inset-bottom, 0px))}
.hb-input input,.hb-input textarea{font-size:16px}
}

/* OWNER ASK 2026-09-15 (phones in LANDSCAPE, revised): the panel no longer hugs the left
   edge — it spans ALMOST the full landscape width, and the inside splits into two columns:
   the TEXT BOX on the left (composer column: entry box + send arrow + Clear under it) and the
   CHAT BUBBLES on the right, so the bubbles get the bulk of a thin, narrow screen. The right
   gutter is 84px = the launcher/X footprint (63px + 12px margin + gap), so the panel is ~90%
   of the width and still never sits on the launcher. Rows: header spans the top, the message
   column runs the full height under it, the composer column is split (box / Clear).
   Structure only — no markup or JS change, so rotating the phone re-lays it out live. */
/* Threshold note (2026-09-15): 520px was too tight — a phone whose landscape viewport reports
   taller (address bar hidden/shown changes it) kept the single-column card and the owner saw
   "changes aint showing". 620px + max-width 1200px covers every phone in landscape while
   leaving tablets (768 tall) and real desktops (1280+) on the original layout. */
@media (orientation:landscape) and (max-height:620px) and (max-width:1200px){
/* GEOMETRY on the bare id only. display:grid belongs to .open ALONE — putting display on the
   bare selector overrode the base `display:none`, so in landscape the panel could not be
   closed at all and stayed on screen indefinitely (owner, 2026-09-15). */
#hb-bubble-panel{left:12px;right:84px;top:72px;bottom:calc(12px + env(safe-area-inset-bottom, 0px));
width:auto;max-height:none;height:auto}
#hb-bubble-panel.open{display:grid;grid-template-columns:minmax(168px,26%) 1fr;grid-template-rows:auto 1fr auto}
.hb-head{grid-column:1 / -1;grid-row:1;padding:7px 10px;gap:8px}
.hb-avatar{width:30px;height:30px}
.hb-msgs{grid-column:2;grid-row:2 / 4;padding:8px;gap:6px;border-left:1px solid rgba(23,32,51,.10)}
.hb-input{grid-column:1;grid-row:2;flex-direction:column;align-items:stretch;justify-content:flex-end;
gap:7px;padding:8px;border-top:none;border-right:1px solid rgba(23,32,51,.10)}
.hb-input input,.hb-input textarea{flex:1 1 auto;min-height:44px;padding:9px 11px;border-radius:12px;
font-size:16px}   /* 16px: iOS Safari focus-zooms on anything smaller */
.hb-input button{width:36px;height:36px;align-self:flex-end;flex:none}
.hb-foot{grid-column:1;grid-row:3;padding:0 8px 6px;justify-content:flex-start}
}
