/* Magi – the Magic Bakers helper (mascot.js). Loaded on the Quick Buy page and, when switched on, on every website page. */
/* ===== v2.5.5 – Magi, the talking cake helper (mascot.js) ===== */
.mg{position:fixed;left:8px;bottom:90px;z-index:40;display:flex;align-items:flex-end;gap:0;pointer-events:none;max-width:calc(100vw - 16px);transition:bottom .25s}
.mg>*{pointer-events:auto}
.mg-char{order:0;width:78px;height:98px;padding:0;border:0;background:none;cursor:pointer;flex:0 0 auto;filter:drop-shadow(0 4px 8px rgba(20,33,61,.25));animation:mgIn .5s cubic-bezier(.2,.9,.3,1.3) both}
.mg-char svg{width:100%;height:100%;display:block;overflow:visible}
@keyframes mgIn{from{opacity:0;transform:translateY(40px) scale(.6)}to{opacity:1;transform:none}}
.mg-body{animation:mgBob 2.6s ease-in-out infinite;transform-origin:60px 140px}
@keyframes mgBob{50%{transform:translateY(-3px)}}
.mg-eyes{animation:mgBlink 4.2s infinite;transform-origin:60px 63px}
@keyframes mgBlink{0%,93%,100%{transform:scaleY(1)}96%{transform:scaleY(.1)}}
.mg-mouth{opacity:0;transform-origin:60px 77px}
.mg-talk .mg-mouth{opacity:1;animation:mgTalk .22s ease-in-out infinite alternate}
.mg-talk .mg-smile{opacity:0}
@keyframes mgTalk{from{transform:scaleY(.25)}to{transform:scaleY(1)}}
.mg-arm-r{transform-origin:88px 102px}
.mg-wave .mg-arm-r{animation:mgWave .45s ease-in-out 4 alternate}
@keyframes mgWave{from{transform:rotate(-14deg)}to{transform:rotate(16deg)}}
.mg-head{transform-origin:60px 88px}
.mg-talk .mg-head{animation:mgNod 1.1s ease-in-out infinite}
@keyframes mgNod{50%{transform:rotate(-3deg)}}
.mg-bub{order:1;position:relative;margin:0 0 54px -6px;background:#fff;color:#14213d;border:1.5px solid #e6d9c0;border-radius:16px 16px 16px 4px;padding:8px 10px 10px 12px;width:min(270px,calc(100vw - 104px));box-shadow:0 8px 24px rgba(20,33,61,.18);font-size:14px;line-height:1.42;transform-origin:0 100%;animation:mgPop .3s ease-out both}
@keyframes mgPop{from{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}
.mg-bh{display:flex;align-items:center;gap:6px;margin-bottom:3px}
.mg-bh b{color:#b25e00;font-size:13px}.mg-bh small{color:#7d8290;font-size:11px;flex:1}
.mg-snd,.mg-x{border:0;background:#f6efe2;border-radius:50%;width:28px;height:28px;font-size:13px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.mg-tx{min-height:2.8em}
.mg-mini .mg-bub{display:none}
.mg-mini .mg-char{width:58px;height:74px}
.mg-gone{display:none}
.mg-back{position:fixed;left:8px;bottom:var(--mg-b,96px);z-index:40;width:40px;height:40px;border-radius:50%;border:1.5px solid #e6d9c0;background:#fff;font-size:20px;cursor:pointer;box-shadow:0 4px 12px rgba(20,33,61,.2);opacity:.85}
@media (min-width:900px){.mg{left:18px}.mg-bub{width:300px}}
@media (prefers-reduced-motion:reduce){.mg-body,.mg-eyes,.mg-talk .mg-mouth,.mg-talk .mg-head,.mg-wave .mg-arm-r{animation:none}.mg-talk .mg-mouth{opacity:0}.mg-talk .mg-smile{opacity:1}}
.mg-hold{display:none}
/* v2.5.6 – Magi as the Magic Bakers logo */
.mg-logo .mg-char{width:84px;height:104px}
.mg-logo .mg-head{transform-origin:60px 106px}
.mg-logo.mg-talk .mg-head{animation:mgSquash .26s ease-in-out infinite alternate}
@keyframes mgSquash{from{transform:scale(1,1)}to{transform:scale(1.05,.95)}}
.mg-waves{opacity:0}
.mg-talk .mg-waves{opacity:1;animation:mgWaves .5s ease-in-out infinite alternate}
@keyframes mgWaves{from{opacity:.25}to{opacity:1}}
.mg-logo .mg-arm-r{transform-origin:96px 70px}
.mg-logo .mg-arm-l{transform-origin:24px 76px;animation:mgArmL 2.6s ease-in-out infinite}
@keyframes mgArmL{50%{transform:rotate(8deg)}}
.mg-logo .mg-feet{animation:mgStep 2.6s ease-in-out infinite;transform-origin:60px 130px}
@keyframes mgStep{50%{transform:translateY(-1px)}}
.mg-logo.mg-mini .mg-char{width:62px;height:78px}
.mg-ask .mg-snd{animation:mgAsk 1s ease-in-out infinite;background:#f2c56b}
@keyframes mgAsk{50%{transform:scale(1.18)}}
.mg-back img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.mg-back{padding:2px;overflow:hidden}

/* v2.5.7 – Magi + Magic Bakers AI chat */
.mg,.mg *{box-sizing:border-box;font-family:inherit}
.mg-bub{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
.mg-asks{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.mg-asks button,.mg-asks a{font:inherit;font-size:12.5px;line-height:1.25;text-align:left;cursor:pointer;border:1px solid #e6d9c0;background:#fffaf1;color:#14213d;border-radius:12px;padding:6px 9px;text-decoration:none}
.mg-asks button:hover,.mg-asks a:hover{background:#f6efe2}
.mg-asks .mg-ai-main{background:#14213d;color:#fff;border-color:#14213d;font-weight:700}
.mg-asks .mg-order{background:linear-gradient(135deg,#f2d38d,#d9b46a);border-color:#d9b46a;font-weight:800}
body.mg-ai-on .mwai-trigger,body.mg-ai-on .mwai-open-button{display:none!important}
.mg-site{z-index:99990}
.mg-right{left:auto;right:8px;flex-direction:row-reverse}
.mg-right .mg-bub{margin:0 -6px 54px 0;border-radius:16px 16px 4px 16px}
.mg-back.mg-back-r{left:auto;right:12px;bottom:18px}
@media (min-width:900px){.mg-right{right:18px;left:auto}}
/* v2.5.10 – full-body character picture */
.mg-chr .mg-char{width:76px;height:128px;filter:drop-shadow(0 6px 10px rgba(20,33,61,.28))}
.mg-pic-wrap{position:relative;display:block;width:100%;height:100%;animation:mgBob 2.6s ease-in-out infinite;transform-origin:50% 100%}
.mg-pic{width:100%;height:100%;object-fit:contain;object-position:50% 100%;display:block;pointer-events:none;user-select:none;-webkit-user-select:none}
.mg-chr.mg-wave .mg-pic-wrap{animation:mgHello .5s ease-in-out 3 alternate,mgBob 2.6s ease-in-out 1.5s infinite}
@keyframes mgHello{from{transform:rotate(-5deg)}to{transform:rotate(5deg)}}
.mg-chr.mg-talk .mg-pic{animation:mgChat .28s ease-in-out infinite alternate;transform-origin:50% 100%}
@keyframes mgChat{from{transform:scale(1,1)}to{transform:scale(1.025,.975)}}
.mg-sw{position:absolute;right:-12px;top:14%;display:none}
.mg-sw i{display:block;width:14px;height:14px;border:3px solid #f2c56b;border-left:0;border-bottom:0;border-radius:0 14px 0 0;transform:rotate(45deg);margin:-2px 0;opacity:.85}
.mg-sw i+i{width:22px;height:22px;margin-top:-6px;opacity:.55}
.mg-chr.mg-talk .mg-sw{display:block;animation:mgWaves .5s ease-in-out infinite alternate}
.mg-chr .mg-bub{margin-bottom:84px}
.mg-chr.mg-mini .mg-char{width:52px;height:88px}
.mg-back.mg-back-chr{border-radius:14px;width:42px;height:62px}.mg-back.mg-back-chr img{object-fit:contain;border-radius:0}
@media (prefers-reduced-motion:reduce){.mg-pic-wrap,.mg-chr.mg-talk .mg-pic,.mg-chr.mg-wave .mg-pic-wrap{animation:none}}
/* v2.5.10 – Magi in the staff hubs */
.mg-hub{z-index:45}
.mg-hub.mg-chr .mg-char{width:64px;height:108px}
.mg-hub.mg-chr.mg-mini .mg-char{width:46px;height:78px}
.mg-hub .mg-round{border-radius:50%;border:3px solid #d9b46a;background:#fff;object-fit:cover}
.mg-hub.mg-logo .mg-char{width:62px;height:62px}.mg-hub.mg-logo.mg-mini .mg-char{width:48px;height:48px}
.mg-hub .mg-bub{margin-bottom:70px;width:min(290px,calc(100vw - 96px))}
.mg-hub.mg-mini .mg-bub{display:none}
.mg-cheer .mg-bub{border-color:#f2c56b;box-shadow:0 0 0 3px rgba(242,197,107,.35),0 8px 24px rgba(20,33,61,.18)}
.mg-cheer .mg-pic-wrap{animation:mgJump .5s ease-out 2,mgBob 2.6s ease-in-out 1s infinite}
@keyframes mgJump{0%,100%{transform:translateY(0)}45%{transform:translateY(-16px) rotate(-4deg)}}
.mgh-conf{position:fixed;inset:0;pointer-events:none;z-index:99999;overflow:hidden}
.mgh-conf i{position:absolute;top:-14px;width:8px;height:13px;border-radius:2px;animation:mghFall 2.6s linear forwards}
@keyframes mghFall{to{transform:translateY(105vh) rotate(600deg)}}
@media (prefers-reduced-motion:reduce){.mgh-conf{display:none}.mg-cheer .mg-pic-wrap{animation:none}}
