/* Ask Bloom: the AI chat, bottom right */
.chat{position:fixed;right:22px;bottom:22px;z-index:60;font-family:var(--sans)}
html:not(.age-ok) .chat{display:none}
.chat__open{display:flex;align-items:center;gap:10px;height:56px;padding:0 22px 0 18px;border:0;border-radius:999px;background:var(--ink);color:#fff;font:600 15px/1 var(--sans);cursor:pointer;box-shadow:0 18px 40px -16px rgba(0,0,0,.55);transition:transform .3s var(--ease),background .25s}
.chat__open:hover{background:#000;transform:translateY(-2px)}
.chat__open svg{width:22px;height:22px}
.chat.is-open .chat__open{display:none}
.chat__panel{position:absolute;right:0;bottom:0;display:flex;flex-direction:column;width:min(380px,calc(100vw - 24px));height:min(580px,calc(100svh - 120px));overflow:hidden;border-radius:24px;background:var(--paper);box-shadow:0 30px 80px -20px rgba(0,0,0,.35),0 0 0 1px var(--line);transform-origin:100% 100%;animation:chat-in .45s var(--ease)}
.chat__panel[hidden]{display:none}
@keyframes chat-in{from{opacity:0;transform:translateY(16px) scale(.96)}}
.chat__head{display:flex;align-items:center;gap:12px;padding:16px 16px 16px 18px;background:var(--ink);color:#fff}
.chat__avatar{display:grid;flex:none;place-items:center;width:42px;height:42px;border-radius:50%;background:#fff}
.chat__avatar img{width:28px;height:auto}
.chat__title{font-family:var(--serif);font-size:20px;line-height:1.1}
.chat__sub{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:12.5px;color:#fff}
.chat__sub i{width:7px;height:7px;border-radius:50%;background:var(--leaf)}
.chat__close{display:grid;flex:none;place-items:center;width:36px;height:36px;margin-left:auto;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;transition:background .2s}
.chat__close:hover{background:rgba(255,255,255,.24)}
.chat__close svg{width:16px;height:16px}
.chat__log{display:flex;flex:1;flex-direction:column;gap:10px;overflow-y:auto;padding:18px 16px;overscroll-behavior:contain}
.chat__msg{max-width:86%;padding:11px 14px;border-radius:18px;font-size:14.5px;line-height:1.45;overflow-wrap:anywhere}
.chat__msg--bot{align-self:flex-start;border-bottom-left-radius:6px;background:var(--cream);color:var(--ink)}
.chat__msg--me{align-self:flex-end;border-bottom-right-radius:6px;background:var(--ink);color:#fff}
.chat__msg a{display:table;margin-top:9px;padding:8px 14px;border-radius:999px;background:var(--ink);color:#fff;font-size:13px;font-weight:600;text-decoration:none}
.chat__typing{display:flex;align-self:flex-start;gap:4px;padding:15px 14px;border-radius:18px;border-bottom-left-radius:6px;background:var(--cream)}
.chat__typing i{width:6px;height:6px;border-radius:50%;background:var(--ink);opacity:.3;animation:chat-dot 1s infinite}
.chat__typing i:nth-child(2){animation-delay:.15s}
.chat__typing i:nth-child(3){animation-delay:.3s}
@keyframes chat-dot{40%{opacity:1;transform:translateY(-3px)}}
.chat__chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 14px}
.chat__chips[hidden]{display:none}
.chat__chips button{padding:8px 13px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font:500 13px/1.2 var(--sans);cursor:pointer;transition:border-color .2s}
.chat__chips button:hover{border-color:var(--ink)}
.chat__form{display:flex;gap:8px;padding:12px 12px 8px;border-top:1px solid var(--line);background:#fff}
.chat__form input{flex:1;min-width:0;height:46px;padding:0 16px;border:1px solid var(--line);border-radius:999px;background:var(--paper);color:var(--ink);font:15px var(--sans);outline:none;transition:border-color .2s}
.chat__form input:focus{border-color:var(--ink)}
.chat__form button{display:grid;flex:none;place-items:center;width:46px;height:46px;border:0;border-radius:50%;background:var(--ink);color:#fff;cursor:pointer}
.chat__form button svg{width:18px;height:18px}
.chat__note{padding:0 12px 10px;background:#fff;color:var(--ink);font-size:11.5px;text-align:center}
.chat .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:1100px){.chat{bottom:96px}}
@media (max-width:760px){
  .chat{right:12px;bottom:92px}
  .chat__open{justify-content:center;width:56px;padding:0}
  .chat__open span{display:none}
  .chat.is-open{left:12px;bottom:12px}
  .chat__panel{width:100%;height:min(620px,calc(100svh - 24px))}
}
@media (prefers-reduced-motion:reduce){
  .chat__panel{animation:none}
  .chat__typing i{animation:none;opacity:.6}
}
