/* Floating contact widget (shared).
   A round chat button in the bottom-right corner opens a small B2B contact
   panel: email, quote form and chat apps. Nothing is asked of the visitor
   before they are ready to talk, and no third-party script is loaded.
   The header carries a soft wave over a navy-to-blue gradient, so the panel
   has a brand edge without turning into an advertising block. */

.mtc-cw{position:fixed;z-index:950;right:24px;bottom:calc(24px + var(--mtc-banner-h,0px));
  display:flex;flex-direction:column;align-items:flex-end;gap:14px;
  transition:opacity .25s ease,transform .25s ease}
.mtc-cw.is-hidden{opacity:0;pointer-events:none;transform:translateY(12px)}

/* ---------- the round button: white ring, blue gradient, white bubble ---------- */
.mtc-cw-btn{position:relative;width:58px;height:58px;padding:0;border-radius:50%;
  border:3px solid #fff;cursor:pointer;
  background:radial-gradient(125% 125% at 28% 20%,#3189db 0%,#1467ba 46%,#0a4682 100%);
  color:var(--on-dark);display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 24px rgba(9,40,80,.30),0 2px 6px rgba(9,40,80,.18),0 0 0 1px rgba(9,40,80,.06);
  transition:transform .2s cubic-bezier(.22,.61,.36,1),box-shadow .2s ease,filter .2s ease}
.mtc-cw-btn:hover{transform:translateY(-2px) scale(1.05);filter:brightness(1.06);
  box-shadow:0 16px 32px rgba(9,40,80,.34),0 4px 10px rgba(9,40,80,.2),0 0 0 1px rgba(9,40,80,.06)}
.mtc-cw-btn:active{transform:translateY(0) scale(.99)}
.mtc-cw-btn:focus-visible{outline:3px solid rgba(255,204,0,.9);outline-offset:3px}
.mtc-cw-btn>svg{width:27px;height:27px;display:block}
/* S538: a 12px green dot sat in the corner of this button. Green reads as
   "online now" or "live chat" everywhere else on the web, and this widget has
   no live channel behind it -- a buyer who is not ready to talk can read the
   dot as a reason not to click. The blue disc stands on its own. */

/* back to top: a smaller disc under the chat button, only after scrolling */
/* S465: centre the small back-to-top button under the 58px contact
   button. Both are right-aligned in the flex column, so half the
   width difference (7px, also 7px at 54/40 phone sizes) lines up
   their centres - including while the 330px panel is open. */
.mtc-cw-top{width:44px;height:44px;margin-right:7px;padding:0;border-radius:50%;
  border:1px solid #dbe8f4;background:#fff;color:var(--brand);
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  box-shadow:0 4px 14px rgba(9,40,80,.16);
  opacity:0;visibility:hidden;pointer-events:none;transform:translateY(8px);
  transition:opacity .22s ease,transform .22s ease,background .16s ease,color .16s ease,border-color .16s ease}
.mtc-cw-top.is-on{opacity:1;visibility:visible;pointer-events:auto;transform:none}
.mtc-cw-top:hover{background:#0054a5;border-color:#0054a5;color:var(--on-dark)}
.mtc-cw-top:focus-visible{outline:3px solid rgba(0,84,165,.55);outline-offset:3px}
.mtc-cw-top svg{width:20px;height:20px;display:block}

/* ---------- the panel ---------- */
.mtc-cw-panel{width:330px;max-width:calc(100vw - 32px);background:#fff;
  border-radius:18px;overflow:hidden;
  box-shadow:0 24px 52px rgba(9,40,80,.20),0 4px 12px rgba(9,40,80,.08);
  transform-origin:100% 100%;animation:mtc-cw-in .22s cubic-bezier(.22,.61,.36,1)}
@keyframes mtc-cw-in{
  from{opacity:0;transform:translateY(10px) scale(.965)}
  to{opacity:1;transform:none}
}

/* header: gradient plus two offset waves that hand over to the white body */
.mtc-cw-head{position:relative;padding:15px 20px 30px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M0 34c50-24 96-24 150-8s112 26 168 8c34-11 62-10 82-2v28H0z' fill='%23ffffff' fill-opacity='.20'/%3E%3C/svg%3E") left bottom / 100% 44px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M0 42c44-20 86-22 138-8s116 24 170 6c34-11 66-9 92 0v20H0z' fill='%23ffffff'/%3E%3C/svg%3E") left bottom / 100% 32px no-repeat,
    linear-gradient(118deg,#0a4380 0%,#115fae 46%,#2a8ad4 100%)}
.mtc-cw-head strong{display:block;font-size:1.04rem;font-weight:700;color:var(--on-dark);line-height:1.28}
.mtc-cw-head span{display:block;margin-top:5px;font-size:.79rem;color:var(--on-dark);line-height:1.5}

.mtc-cw-list{list-style:none;margin:0;padding:8px 10px}
.mtc-cw-list a{display:flex;align-items:center;gap:12px;padding:10px 10px;border-radius:12px;
  background:linear-gradient(180deg,#fbfdff 0%,#f3f9ff 100%);border:1px solid #eef5fc;
  color:var(--ink);text-decoration:none;line-height:1.3;
  transition:background .16s ease,border-color .16s ease}
.mtc-cw-list a:hover,.mtc-cw-list a:focus-visible{background:#eaf3fd;border-color:#dbeaf9;text-decoration:none}
.mtc-cw-list a:focus-visible{outline:2px solid rgba(0,84,165,.35);outline-offset:-2px}

/* line icons, no filled tile behind them */
.mtc-cw-ic{flex:0 0 26px;width:26px;height:26px;display:flex;align-items:center;justify-content:center;
  color:var(--brand)}
.mtc-cw-ic svg{width:24px;height:24px;display:block}
.mtc-cw-tx{flex:1 1 auto;min-width:0}
.mtc-cw-tx b{display:block;font-size:.9rem;font-weight:700;color:var(--brand-deep)}
.mtc-cw-tx small{display:block;margin-top:2px;font-size:.76rem;font-weight:400;color:var(--muted)}
.mtc-cw-go{flex:0 0 auto;color:var(--on-dark);transition:transform .16s ease,color .16s ease}
.mtc-cw-go svg{width:14px;height:14px;display:block}
.mtc-cw-list a:hover .mtc-cw-go{color:var(--brand);transform:translateX(2px)}

.mtc-cw-foot{display:flex;align-items:center;gap:7px;padding:11px 20px 13px;
  border-top:1px solid #eef4fa;background:#fff;
  font-size:.75rem;color:var(--muted);line-height:1.45}
.mtc-cw-foot svg{width:14px;height:14px;flex:0 0 14px;display:block;color:var(--brand)}

/* second level: the two chat apps */
.mtc-cw-back{display:inline-flex;align-items:center;gap:4px;margin:8px 0 0 12px;padding:4px 7px;
  border:0;border-radius:5px;background:none;color:var(--brand);font-size:.76rem;font-weight:700;
  line-height:1;cursor:pointer;transition:background .16s ease}
.mtc-cw-back:hover{background:#eef6fb}
.mtc-cw-back svg{width:13px;height:13px;display:block}

@media (max-width:575.98px){
  .mtc-cw{right:14px;bottom:calc(16px + var(--mtc-banner-h,0px));gap:10px}
  .mtc-cw-btn{width:54px;height:54px}
  .mtc-cw-btn>svg{width:25px;height:25px}
  .mtc-cw-top{width:40px;height:40px}
  .mtc-cw-top svg{width:18px;height:18px}
  .mtc-cw-panel{width:calc(100vw - 28px);max-width:none}
}

@media (prefers-reduced-motion:reduce){
  .mtc-cw,.mtc-cw-btn,.mtc-cw-list a,.mtc-cw-go,.mtc-cw-top{transition:none}
  .mtc-cw-panel{animation:none}
  .mtc-cw-btn:hover{transform:none}
  .mtc-cw-list a:hover .mtc-cw-go{transform:none}
}
