/* Fulfillmate AI assistant widget (v5, 14 Nov 2026). Fulfillmate tokens from the page's own switch/custom.css:
   Sora (display) + DM Sans (body), already loaded by the page. Claude-style structure, Fulfillmate colours. */
.fm-chat{--primary:#089BD9;--primary-dark:#065E85;--primary-light:#E6F5FC;--bg:#F7FAFB;--bg-alt:#EDF4F7;--text:#000;--text-muted:#4A5568;--text-light:#8A96A6;--border:#D4E0E8;--fm-bottom:20px;
  --font-display:'Sora',system-ui,sans-serif;--font-body:'DM Sans',system-ui,sans-serif;
  position:fixed;left:0;right:0;bottom:var(--fm-bottom);z-index:890;display:flex;flex-direction:column;align-items:center;pointer-events:none;
  font-family:var(--font-body);color:var(--text);line-height:1.5}
.fm-chat>*{pointer-events:auto}
.fm-chat *{box-sizing:border-box}
.fm-chat button,.fm-chat input,.fm-chat textarea{font-family:inherit}
.fm-chat :focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.fm-chat .fm-in:focus-visible,.fm-chat .fm-bar-in:focus-visible{outline:none}

/* the spark: original 8-ray mark in Fulfillmate blue, turns while an answer is being written */
.fm-spark{display:inline-flex;flex:none;color:var(--primary-dark)}
.fm-spark svg{width:100%;height:100%;transform-origin:50% 50%}
.fm-think .fm-spark svg,.fm-busy .fm-head-spark svg{animation:fmSpin 2.2s linear infinite,fmBreathe 1.4s ease-in-out infinite}
@keyframes fmSpin{to{transform:rotate(360deg)}}
@keyframes fmBreathe{0%,100%{opacity:1}50%{opacity:.55}}
@media(prefers-reduced-motion:reduce){.fm-think .fm-spark svg,.fm-busy .fm-head-spark svg{animation:fmBreathe 1.4s ease-in-out infinite}}

.fm-model{flex:none;font-size:12.5px;color:var(--text-light);padding:0 2px;white-space:nowrap}
.fm-go-btn{flex:none;width:34px;height:34px;border:0;border-radius:10px;background:var(--primary);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s}
.fm-go-btn:hover{background:var(--primary-dark)}
.fm-go-btn svg{width:18px;height:18px}

/* sticky bar: spark + name, typed prompt, model, send */
.fm-bar{display:flex;align-items:center;gap:10px;width:min(660px,calc(100vw - 32px));padding:8px 8px 8px 14px;background:#fff;
  border:1.5px solid rgba(8,155,217,.5);border-radius:16px;box-shadow:0 8px 28px rgba(6,40,61,.18),0 1px 3px rgba(6,40,61,.08)}
.fm-tag{display:flex;align-items:center;gap:7px;flex:none;padding-right:12px;border-right:1px solid var(--border)}
.fm-bar-ic{width:22px;height:22px}
.fm-tag b{font:600 13px/1 var(--font-display);color:var(--primary-dark);white-space:nowrap}
.fm-field{position:relative;flex:1;min-width:0;height:36px}
.fm-bar-in{position:absolute;inset:0;width:100%;border:0;background:transparent;font:400 16px/1.3 var(--font-body);color:var(--text);padding:0}
.fm-bar-in:focus{outline:none}
.fm-typed{position:absolute;inset:0;display:flex;align-items:center;font:400 15.5px/1.3 var(--font-body);color:var(--text-muted);pointer-events:none;white-space:nowrap;overflow:hidden}
.fm-typed-t{overflow:hidden;text-overflow:clip}
.fm-caret{flex:none;width:1.5px;height:18px;margin-left:2px;background:var(--primary);animation:fmCaret 1s steps(1) infinite}
@keyframes fmCaret{50%{opacity:0}}
@media(prefers-reduced-motion:reduce){.fm-caret{animation:none;opacity:0}}
.fm-typed-off{display:none}
.fm-bar:focus-within{border-color:var(--primary);box-shadow:0 8px 28px rgba(6,40,61,.22),0 0 0 3px rgba(8,155,217,.16)}
.fm-chat.open .fm-bar{display:none}

/* panel */
.fm-panel{display:none;width:min(520px,calc(100vw - 32px));height:min(640px,calc(100vh - var(--fm-bottom) - 24px));background:#fff;border:1px solid var(--border);
  border-radius:20px;box-shadow:0 18px 56px rgba(6,40,61,.24);flex-direction:column;overflow:hidden}
.fm-chat.open .fm-panel{display:flex}
.fm-panel.fm-empty{height:auto;max-height:calc(100vh - var(--fm-bottom) - 24px)}
.fm-head{display:flex;align-items:center;gap:9px;padding:12px 14px 12px 18px;border-bottom:1px solid var(--bg-alt);background:#fff}
.fm-head-spark{width:20px;height:20px}
.fm-name{flex:1;font:600 14px/1.2 var(--font-display);color:var(--text)}
.fm-chat-x{background:transparent;border:0;color:var(--text-light);cursor:pointer;font-size:26px;line-height:1;padding:2px 8px;border-radius:8px}
.fm-chat-x:hover{background:var(--bg-alt);color:var(--text)}
.fm-log{flex:1;overflow-y:auto;padding:22px 18px 10px;display:flex;flex-direction:column;gap:22px;background:#fff}
.fm-empty .fm-log{flex:none;overflow:visible;padding:34px 18px 14px}

/* empty state: spark and greeting centred above a taller composer */
.fm-hello{display:flex;align-items:center;justify-content:center;gap:12px;text-align:center}
.fm-hello-spark{width:34px;height:34px}
.fm-hello-t{margin:0;font:600 clamp(21px,5vw,26px)/1.2 var(--font-display);letter-spacing:-.01em;color:var(--text)}

/* messages: assistant plain on the ground, user in a light tint */
.fm-user{align-self:flex-end;max-width:86%;background:var(--bg-alt);color:var(--text);padding:10px 15px;border-radius:16px;font-size:15.5px;line-height:1.5;word-wrap:break-word}
.fm-bot{display:flex;gap:11px;align-items:flex-start;max-width:100%}
.fm-bot-spark{width:20px;height:20px;margin-top:3px}
.fm-bot-body{flex:1;min-width:0;font-family:var(--font-body);font-size:15.5px;line-height:1.65;color:var(--text)}
.fm-bot-body p{margin:0 0 12px}
.fm-bot-body p:last-child{margin-bottom:0}
.fm-bot-body ul{margin:0 0 12px;padding-left:22px}
.fm-bot-body li{margin:5px 0;padding-left:2px}
.fm-bot-body li::marker{color:var(--text-light)}
.fm-bot-body strong{font-weight:700}
.fm-txt:empty{display:none}
.fm-act{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.fm-act:empty{display:none}
.fm-chipbtn{display:inline-flex;align-items:center;font:500 12.5px/1 var(--font-display);padding:9px 14px;border-radius:10px;border:1px solid var(--border);background:#fff;color:var(--text);cursor:pointer;text-decoration:none;transition:background .15s,border-color .15s}
.fm-chipbtn:hover{background:var(--primary-light);border-color:var(--primary)}
.fm-chipbtn-main{background:var(--primary);border-color:var(--primary);color:#fff}
.fm-chipbtn-main:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
a.fm-chipbtn-main{color:#fff}

/* composer: one rounded box. Conversation = single line with the send control inside at the right (Claude "Reply" layout). */
.fm-foot{padding:6px 14px 10px;background:#fff}
.fm-comp{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--border);border-radius:16px;padding:8px 8px 8px 16px;box-shadow:0 2px 12px rgba(6,40,61,.07)}
.fm-comp:focus-within{border-color:var(--primary);box-shadow:0 2px 12px rgba(6,40,61,.1),0 0 0 3px rgba(8,155,217,.14)}
.fm-in{display:block;flex:1;min-width:0;border:0;outline:none;resize:none;background:transparent;font:400 16px/1.45 var(--font-body);color:var(--text);min-height:24px;max-height:120px;padding:5px 0}
.fm-in::placeholder{color:var(--text-light)}
.fm-comp .fm-go-btn{background:transparent;color:var(--text-light)}
.fm-comp .fm-go-btn.fm-ready{background:var(--primary);color:#fff}
.fm-comp .fm-go-btn.fm-ready:hover{background:var(--primary-dark)}
/* empty state: taller box, placeholder top-left, send along the bottom right */
.fm-empty .fm-comp{flex-direction:column;align-items:stretch;gap:6px;padding:14px 10px 10px 16px;min-height:104px}
.fm-empty .fm-in{min-height:44px}
.fm-empty .fm-comp .fm-go-btn{align-self:flex-end}

/* under the box, outside it: disclaimer centred, model at the right */
.fm-meta{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;margin:9px 4px 0}
.fm-note{text-align:center;font-size:12px;color:var(--text-light)}
.fm-meta-r{text-align:right;font-size:12.5px;color:var(--text)}
.fm-chips{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin-top:14px}
.fm-chips:empty{display:none}
.fm-chip{text-align:left;background:#fff;border:1px solid var(--border);color:var(--text);border-radius:12px;padding:9px 14px;font:400 14px/1.35 var(--font-body);cursor:pointer}
.fm-chip:hover{background:var(--primary-light);border-color:var(--primary)}

@media(max-width:767px){
  .fm-panel{width:calc(100vw - 16px);height:min(80vh,calc(100vh - var(--fm-bottom) - 12px));border-radius:18px}
  .fm-panel.fm-empty{height:auto}
  .fm-log{padding:18px 14px 8px}
  .fm-bar{width:calc(100vw - 24px)}
}
@media(max-width:480px){
  .fm-bar .fm-model{display:none}
  .fm-tag{padding-right:9px}
  .fm-typed{font-size:14.5px}
  /* disclaimer stacks under the model name when the row will not fit */
  .fm-meta{grid-template-columns:1fr;gap:2px;justify-items:center}
  .fm-meta-l{display:none}
  .fm-meta-r{order:-1;text-align:center}
}

/* entrance (14 Nov 2026): the bar rises in after the hero has loaded, then pulses twice so it is noticed */
.fm-bar{animation:fmBarIn .8s cubic-bezier(.2,.8,.2,1) 1.4s both,fmBarPulse 1.6s ease-out 2.3s 2}
@keyframes fmBarIn{from{opacity:0;transform:translateY(40px) scale(.96)}to{opacity:1;transform:none}}
@keyframes fmBarPulse{0%{box-shadow:0 8px 28px rgba(6,40,61,.18),0 0 0 0 rgba(8,155,217,.5)}100%{box-shadow:0 8px 28px rgba(6,40,61,.18),0 0 0 16px rgba(8,155,217,0)}}
@media(prefers-reduced-motion:reduce){.fm-bar{animation:none}}

/* ===== v6 phones (max-width 700px): slim bar, full-screen sheet, desktop untouched ===== */
@media(max-width:700px){
  .fm-chat{bottom:calc(10px + env(safe-area-inset-bottom,0px))}
  /* bar: spark + input + send only, about 48px tall */
  .fm-bar{width:calc(100vw - 20px);height:48px;padding:3px 3px 3px 12px;gap:8px;border-radius:14px}
  .fm-tag{padding-right:0;border-right:0}
  .fm-tag b,.fm-bar .fm-model{display:none}
  .fm-bar-ic{width:22px;height:22px}
  .fm-field{height:40px}
  .fm-bar-in{font-size:16px}
  .fm-typed{font-size:16px}
  .fm-bar .fm-go-btn{width:40px;height:40px;border-radius:11px}

  /* open: a full-screen sheet. widget.js sets height and top from visualViewport so the keyboard never covers the composer */
  .fm-chat.open{top:0;bottom:auto;height:100dvh;z-index:1500;background:#fff;align-items:stretch;pointer-events:auto}
  .fm-chat.open .fm-panel,.fm-chat.open .fm-panel.fm-empty{width:100%;height:100%;max-height:none;border:0;border-radius:0;box-shadow:none}
  .fm-head{flex:none;min-height:52px;padding:4px 4px 4px 16px}
  .fm-chat-x{width:44px;height:44px;font-size:30px;display:flex;align-items:center;justify-content:center;padding:0}
  .fm-log{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:16px 14px 8px}
  .fm-user{font-size:16px}
  .fm-bot-body{font-size:16px}
  .fm-chipbtn{min-height:44px;padding:0 16px;font-size:13.5px}

  /* empty state: greeting centred in the middle, chips above the composer, composer pinned at the bottom - no scrolling */
  .fm-empty .fm-log{flex:1;display:flex;flex-direction:column;justify-content:center;overflow:hidden;padding:12px 18px}
  .fm-hello-spark{width:30px;height:30px}
  .fm-foot{display:flex;flex-direction:column;flex:none;padding:6px 12px calc(8px + env(safe-area-inset-bottom,0px))}
  .fm-chips{order:-1;margin:0 0 10px;gap:8px;align-items:stretch}
  .fm-chip{min-height:44px;font-size:15px;padding:10px 14px;display:flex;align-items:center}
  .fm-kb .fm-chips{display:none}
  .fm-kb .fm-empty .fm-log{justify-content:flex-start}

  /* composer: single line, 16px, send inside at the right (44px target) */
  .fm-comp,.fm-empty .fm-comp{flex-direction:row;align-items:center;gap:6px;min-height:52px;padding:4px 4px 4px 14px;border-radius:14px}
  .fm-in,.fm-empty .fm-in{font-size:16px;min-height:24px;max-height:96px;padding:9px 0}
  .fm-comp .fm-go-btn,.fm-empty .fm-comp .fm-go-btn{width:44px;height:44px;align-self:center;border-radius:11px}

  /* disclaimer and model under the box, small, one line when it fits */
  .fm-meta{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:0 10px;margin:7px 2px 0}
  .fm-meta-l{display:none}
  .fm-meta-r{order:0;text-align:center;font-size:11.5px}
  .fm-note{font-size:11.5px}
}


/* ===== v7 phones: type in the bar, the sheet opens on send, no greeting, no chips ===== */
.fm-head-model,.fm-head-fill{display:none}
@media(max-width:700px){
  .fm-chat{transition:none}
  .fm-hello,.fm-chips{display:none!important}
  .fm-head-model{display:inline;font-size:12px;color:var(--text-light);white-space:nowrap}
  .fm-head-fill{display:block;flex:1}
  .fm-name{flex:none}
  .fm-meta-r,.fm-meta-l{display:none}
  .fm-meta{display:block;margin:6px 2px 0;text-align:center}
  .fm-note{display:block;font-size:11.5px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:clip;letter-spacing:-.005em}
  .fm-foot{padding:6px 12px calc(6px + env(safe-area-inset-bottom,0px))}
}

.fm-chat.fm-bar-done .fm-bar{animation:none!important}
