/* Keep one support control in the same corner across shop and configurator. */
html body #fb-chat:has(>button#fb-chat-launcher.chat-fab) {
  --chat-edge:max(12px,env(safe-area-inset-right));
  --chat-bottom:max(12px,env(safe-area-inset-bottom));
  --chat-size:46px;
  position:fixed!important;
  inset:auto var(--chat-edge) var(--chat-bottom) auto!important;
  height:var(--chat-size);
  width:var(--chat-size);
  z-index:40;
}
html body #fb-chat button#fb-chat-launcher.chat-fab:enabled {
  position:static!important;display:grid!important;place-items:center;
  width:100%!important;height:100%!important;min-height:44px!important;
  padding:0!important;margin:0;
  box-sizing:border-box;border:2px solid #af542b!important;border-radius:50%!important;
  background:#233e48!important;color:#fff;
  box-shadow:0 2px 8px rgb(19 42 55 / 20%);
  cursor:pointer;
}
html body #fb-chat #fb-chat-launcher .chat-brand-icon{display:block;width:32px;height:30px;overflow:hidden;grid-area:1/1}
html body #fb-chat #fb-chat-launcher::before,html body #fb-chat #fb-chat-launcher::after{content:none!important}
html body #fb-chat .chat-invite {position:absolute;right:calc(100% + 8px);bottom:5px;padding:8px 12px;white-space:nowrap;border:1px solid #dcdad7;border-radius:6px;background:white;color:#242424;font:600 14px/1.25 system-ui;box-shadow:0 2px 9px #0001;animation:fb-chat-greeting 9s both}
@keyframes fb-chat-greeting {0%,12%,100% {visibility:hidden;opacity:0} 18%,90% {visibility:visible;opacity:1}}
html body #fb-chat[data-greeted] .chat-invite,html body:has(.fb-mf:is([data-leaf],[data-stage="opening"],[data-stage="shape"])) #fb-chat .chat-invite {display:none}
@media(prefers-reduced-motion:reduce){html body #fb-chat .chat-invite {animation-timing-function:step-end}}
html body #fb-chat #fb-chat-launcher:focus-visible {outline:3px solid #bb5105;outline-offset:2px}
@media(hover:hover) {
  html body #fb-chat button#fb-chat-launcher.chat-fab:enabled:hover {background:#233e48!important}
}
html body #fb-chat .chat-panel{display:flex;flex-direction:column;padding:0!important;overflow:hidden;width:min(400px,calc(100vw - 24px));border:0;border-radius:2px!important;background:#f1f5f6;box-shadow:0 24px 70px rgba(20,28,40,.35)}
html body #fb-chat .chat-panel[hidden]{display:none!important}
html body #fb-chat .chat-panel>header{display:flex;align-items:center;gap:12px;padding:12px 14px;background:#1b2330;color:#fff;border:0}
html body #fb-chat .chat-head{display:grid;gap:1px;flex:1;min-width:0}
html body #fb-chat .chat-head b{font-size:15px;color:#fff}
html body #fb-chat .chat-head small{font-size:12px;color:rgba(255,255,255,.72)}
html body #fb-chat .chat-close{width:44px;height:44px;border:0;background:none;color:#fff;font-size:24px;cursor:pointer;border-radius:50%}
html body #fb-chat .chat-close:hover{background:rgba(255,255,255,.14)}
html body #fb-chat .chat-log{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:6px;padding:14px 12px;max-height:none;background:none}
html body #fb-chat .chat-msg{position:relative;margin:0;max-width:82%;padding:8px 10px 6px;border-radius:12px;font-size:14px;line-height:1.45;color:#1b2330;box-shadow:0 1px 1px rgba(0,0,0,.12);word-wrap:break-word}
html body #fb-chat .chat-msg time{display:block;margin-top:2px;text-align:right;font-size:11px;opacity:.55}
html body #fb-chat .chat-msg.bot{align-self:flex-start;background:#fff;border-top-left-radius:3px}
html body #fb-chat .chat-msg.me{align-self:flex-end;background:#dcece7;border-top-right-radius:3px}
html body #fb-chat .chat-typing{display:flex;gap:4px;padding:12px 14px}
html body #fb-chat .chat-typing i{width:7px;height:7px;border-radius:50%;background:#8a94a3;animation:fbtype 1s infinite ease-in-out}
html body #fb-chat .chat-typing i:nth-child(2){animation-delay:.15s}html body #fb-chat .chat-typing i:nth-child(3){animation-delay:.3s}
@keyframes fbtype{0%,60%,100%{opacity:.3;transform:none}30%{opacity:1;transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){html body #fb-chat .chat-typing i{animation:none}}
html body #fb-chat .chat-chips{display:flex;flex-wrap:wrap;gap:6px;padding:6px 12px;max-height:112px;overflow-y:auto}
html body #fb-chat .chat-chips button{border:1px solid #c9d0d9;background:#fff;color:#1b2330;border-radius:16px;padding:6px 12px;font:inherit;font-size:13px;cursor:pointer}
html body #fb-chat .chat-chips button:hover{background:#f3f5f8}
html body #fb-chat .chat-form{display:flex;gap:8px;align-items:center;padding:8px 10px;background:#f0f2f5;border:0}
html body #fb-chat .chat-form input{flex:1;min-width:0;min-height:42px;padding:8px 14px;border:0;border-radius:21px;background:#fff;color:#1b2330;font:inherit;font-size:16px}
html body #fb-chat .chat-form button{width:42px;height:42px;min-height:42px;padding:0;border:0;border-radius:50%;background:#1b2330;color:#fff;display:grid;place-items:center;cursor:pointer;flex:none}
html body #fb-chat .chat-form button svg{width:20px;height:20px}
html body #fb-chat .chat-note{margin:0;padding:6px 12px 8px;font-size:11px;line-height:1.35;color:#5a6472;background:#f0f2f5}
html body #fb-chat button:focus-visible,html body #fb-chat input:focus-visible{outline:2px solid #2e5c96;outline-offset:2px}

html body #fb-chat section#fb-chat-panel {
  position:fixed;inset:auto var(--chat-edge) calc(var(--chat-bottom) + var(--chat-size) + 8px) auto;
  width:min(390px,calc(100vw - var(--chat-edge) - 12px));
  height:min(520px,calc(100dvh - var(--chat-bottom) - var(--chat-size) - 20px));
  max-height:none;
}
@media(min-width:1150px) {
  html body #main .fb-chapter-rail .fb-rail-foot {padding-inline-end:38px}
  html body #main .fb-chapter-rail .fb-rail-review {--rail-pad:5px;gap:4px}
}
@media(max-width:900px) {
  html body:has(#main .fb-mf[data-leaf],#main .fb-product-decision[data-dock][data-picked]) #fb-chat:has(>#fb-chat-launcher) {
    --chat-bottom:calc(82px + env(safe-area-inset-bottom));
  }
  html body footer.site-foot[data-footer7]{padding-bottom:calc(72px + env(safe-area-inset-bottom))!important}
}

/* The launcher is the circular exception in the shop's shared shape layer. */
@layer fb-shape {
  #fb-chat #fb-chat-launcher.chat-fab {border-radius:50% !important}
}
