/* Site chat: the WIYAK assistant button and its panel, on every page. Markup is built by chat.js.
   Brand colours only. Sizes are in page pixels; --z (styles.css) is the page scale. */
.sc{--sc-gap:20px;--sc-btn:60px}
.sc-btn{position:fixed;z-index:46;inset-inline-end:var(--sc-gap);bottom:calc(var(--sc-gap) + env(safe-area-inset-bottom));width:var(--sc-btn);height:var(--sc-btn);border-radius:50%;display:grid;place-items:center;color:#fff;border:1px solid rgba(207,239,231,.28);
  background:radial-gradient(circle at 32% 26%,#1bb497 0,#16A085 34%,#0f5f57 100%);box-shadow:0 18px 38px -14px rgba(3,24,22,.75),0 0 0 6px rgba(22,160,133,.12);cursor:pointer;transition:transform .28s cubic-bezier(.2,.8,.2,1),opacity .25s,visibility .25s,bottom .35s cubic-bezier(.2,.8,.2,1)}
.sc-btn:hover{transform:translateY(-3px)}
.sc-btn:active{transform:scale(.95)}
.sc-btn svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sc-btn .d{fill:currentColor;stroke:none}
.sc-btn .dot{position:absolute;top:2px;inset-inline-end:2px;width:14px;height:14px;border-radius:50%;background:#FF7A66;border:2.5px solid #0B3D3A;opacity:0;scale:.4;transition:.25s}
.sc.unread .sc-btn .dot{opacity:1;scale:1}
.sc-btn:focus-visible,.sc-panel button:focus-visible,.sc-panel a:focus-visible{outline:3px solid #7fe3c8;outline-offset:3px}
.sc.open .sc-btn{transform:scale(.6);opacity:0;visibility:hidden}

/* the first-visit hint beside the button */
.sc-tip{position:fixed;z-index:46;inset-inline-end:calc(var(--sc-gap) + var(--sc-btn) + 14px);bottom:calc(var(--sc-gap) + 9px);display:flex;align-items:center;gap:4px;padding-inline:16px 4px;min-height:44px;border-radius:22px;background:#fff;color:#0B3D3A;font-size:15px;font-weight:500;box-shadow:0 16px 36px -16px rgba(3,24,22,.6);animation:scIn .4s cubic-bezier(.2,.8,.2,1) both}
.sc-tip button:first-child{color:inherit;font:inherit;padding:8px 0}
.sc-tip .x{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;color:#49706b}
.sc-tip .x svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}
.sc.open .sc-tip{display:none}

/* the panel */
.sc-panel{position:fixed;z-index:70;inset-inline-end:var(--sc-gap);bottom:calc(var(--sc-gap) + env(safe-area-inset-bottom));width:384px;height:min(600px,calc(100vh / var(--z) - 40px));height:min(600px,calc(100dvh / var(--z) - 40px));display:flex;flex-direction:column;border-radius:22px;overflow:hidden;background:#F8F7F3;color:#0B3D3A;border:1px solid rgba(11,61,58,.12);box-shadow:0 40px 90px -30px rgba(3,24,22,.7);transform-origin:bottom right;visibility:hidden;opacity:0;transform:translateY(16px) scale(.96);transition:opacity .22s,transform .3s cubic-bezier(.2,.8,.2,1),visibility .22s}
html[dir=rtl] .sc-panel{transform-origin:bottom left}
.sc.open .sc-panel{visibility:visible;opacity:1;transform:none}
.sc-head{flex:none;display:flex;align-items:center;gap:10px;padding:10px;padding-inline-start:14px;color:#fff;background:radial-gradient(260px 160px at 18% 0,rgba(22,160,133,.65),transparent 72%),linear-gradient(160deg,#11524d,#0B3D3A 60%,#072b29)}
.sc-ava{flex:none;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:rgba(207,239,231,.14);border:1px solid rgba(207,239,231,.24)}
.sc-ava img{width:26px;height:auto;display:block}
.sc-id{flex:1;min-width:0;line-height:1.35}
.sc-id b{display:block;font-size:15.5px;font-weight:600}
.sc-id small{display:flex;align-items:center;gap:6px;font-size:13px;color:rgba(230,246,241,.92)}
.sc-id small i{flex:none;width:8px;height:8px;border-radius:50%;background:#7fe3c8}
.sc-head button{flex:none;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;color:#fff}
.sc-head button:hover{background:rgba(207,239,231,.14)}
.sc-head svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sc.busy .sc-id small i{animation:scPulse 1.2s ease-in-out infinite}
@keyframes scPulse{50%{opacity:.35;transform:scale(.7)}}
/* Nothing in the log may shrink: it is a scrolling flex column, and the typing dots were squeezed flat.
   A new speaker gets more air than the buttons under a reply. */
.sc-log{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px;display:flex;flex-direction:column;scrollbar-width:thin;scrollbar-color:rgba(11,61,58,.22) transparent}
.sc-log>*{flex:none}
.sc-log>*+*{margin-top:14px}
.sc-log>.sc-acts{margin-top:8px}
.sc-log>:first-child{margin-top:auto}
.sc-m{max-width:84%;padding:8px 13px;border-radius:16px;font-size:14.5px;line-height:1.6;white-space:pre-line;overflow-wrap:anywhere}
.sc-m.b{align-self:flex-start;background:#fff;border:1px solid rgba(11,61,58,.09)}
.sc-m.u{align-self:flex-end;background:#0f5f57;color:#fff}
/* the pointed corner follows the side the bubble is on, not the language written in it */
html[dir=rtl] .sc-m.b,html[dir=rtl] .sc-ty,html:not([dir=rtl]) .sc-m.u{border-bottom-right-radius:5px}
html[dir=rtl] .sc-m.u,html:not([dir=rtl]) .sc-m.b,html:not([dir=rtl]) .sc-ty{border-bottom-left-radius:5px}
.sc-m.ok{align-self:center;max-width:100%;padding:7px 14px;border-radius:999px;background:#CFEFE7;color:#0B3D3A;font-size:13.5px;font-weight:500;text-align:center}
.sc-m.new{animation:scIn .3s cubic-bezier(.2,.8,.2,1) both}
@keyframes scIn{from{opacity:0;transform:translateY(8px)}}
.sc-acts,.sc-chips{display:flex;flex-wrap:wrap;gap:7px;align-self:flex-start;max-width:100%}
.sc-acts a,.sc-chips button{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:0 14px;border-radius:19px;font-size:14px;font-weight:500;line-height:1.3;font-family:inherit;text-align:start;transition:background .2s,color .2s}
.sc-chips button{background:#fff;border:1px solid rgba(22,160,133,.4);color:#0f5f57}
.sc-chips button:hover{background:#e3f5ef}
/* buttons under a reply are light, so they never read as something the visitor said */
.sc-acts a{background:#CFEFE7;color:#0B3D3A}
.sc-acts a:hover{background:#b9e6da}
.sc-acts svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* only the latest reply keeps its WhatsApp button */
.sc-acts:has(~.sc-acts>.wa)>.wa{display:none}
.sc-ty{align-self:flex-start;display:flex;align-items:center;min-height:38px;padding:0 14px;border-radius:16px;background:#fff;border:1px solid rgba(11,61,58,.09);animation:scIn .3s cubic-bezier(.2,.8,.2,1) both}
.sc-ty i{width:7px;height:7px;margin-inline-end:5px;border-radius:50%;background:#16A085;animation:scDot 1.3s ease-in-out infinite}
.sc-ty i:nth-child(2){animation-delay:.16s}.sc-ty i:nth-child(3){animation-delay:.32s;margin-inline-end:0}
.sc-ty span{overflow:hidden;white-space:nowrap;max-width:0;opacity:0;font-size:13.5px;color:#49706b;transition:max-width .45s cubic-bezier(.2,.8,.2,1),opacity .35s .1s,margin .45s}
.sc-ty.slow span{max-width:220px;opacity:1;margin-inline-start:10px}
@keyframes scDot{0%,60%,100%{opacity:.35;transform:none}30%{opacity:1;transform:translateY(-4px)}}
.sc-human{flex:none;display:flex;align-items:center;justify-content:center;gap:8px;min-height:38px;background:#fff;border-top:1px solid rgba(11,61,58,.09);color:#0f5f57;font-size:13.5px;font-weight:500;line-height:1.3;font-family:inherit}
.sc-human:hover{background:#e3f5ef}
.sc-human svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.sc-form{flex:none;padding:8px 12px 6px;background:#fff;border-top:1px solid rgba(11,61,58,.09)}
/* the field grows with the text, up to five lines, then scrolls. The hidden copy (::after) gives the height, so the page scale cannot upset it */
.sc-box{display:flex;align-items:flex-end;gap:6px;padding:4px;border-radius:24px;border:1px solid rgba(11,61,58,.2);background:#F8F7F3;transition:border-color .2s,box-shadow .2s}
.sc-box:focus-within{border-color:#16A085;box-shadow:0 0 0 1px #16A085}
.sc-grow{flex:1;min-width:0;display:grid}
.sc-grow::after{content:attr(data-v) ' ';visibility:hidden;pointer-events:none}
.sc-grow textarea,.sc-grow::after{grid-area:1/1;box-sizing:border-box;min-width:0;min-height:40px;max-height:calc(5lh + 16px);margin:0;padding:8px 4px;padding-inline-start:14px;border:0;font-family:inherit;font-size:calc(16px / var(--z));line-height:24px;letter-spacing:normal;white-space:pre-wrap;overflow-wrap:anywhere;overflow:hidden}
.sc-grow textarea{width:100%;resize:none;overflow-y:auto;background:none;color:#0B3D3A;scrollbar-width:thin;scrollbar-color:rgba(11,61,58,.22) transparent}
.sc-grow textarea:focus{outline:0}
.sc-grow textarea::placeholder{color:#567873}
.sc-form button{flex:none;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:#fff;background:#0f5f57;transition:background .2s,color .2s}
.sc-form button:hover{background:#0B3D3A}
.sc-form button:disabled,.sc-form:has(textarea:placeholder-shown) button{background:#CFEFE7;color:#0f5f57}
.sc-form svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html[dir=rtl] .sc-form svg{transform:scaleX(-1)}
.sc-note{flex:none;padding:0 16px 8px;background:#fff;font-size:12px;line-height:1.5;text-align:center;color:#49706b}
.sc-note a{text-decoration:underline;text-underline-offset:2px;color:inherit}

/* dark theme */
html[data-theme=dark] .sc-panel{background:#072b29;color:#e6f6f1;border-color:rgba(207,239,231,.18)}
html[data-theme=dark] .sc-m.b,html[data-theme=dark] .sc-ty{background:#11524d;border-color:rgba(207,239,231,.12)}
html[data-theme=dark] .sc-m.u{background:#16A085;background:linear-gradient(160deg,#13806f,#0f6b60)}
html[data-theme=dark] .sc-chips button{background:rgba(207,239,231,.07);border-color:rgba(127,227,200,.4);color:#CFEFE7}
html[data-theme=dark] .sc-chips button:hover{background:rgba(207,239,231,.15)}
html[data-theme=dark] .sc-form,html[data-theme=dark] .sc-note{background:#0B3D3A}
html[data-theme=dark] .sc-form{border-color:rgba(207,239,231,.12)}
html[data-theme=dark] .sc-box{background:#072b29;border-color:rgba(207,239,231,.24)}
html[data-theme=dark] .sc-box:focus-within{border-color:#16A085}
html[data-theme=dark] .sc-grow textarea{color:#e6f6f1}
html[data-theme=dark] .sc-form button:disabled,html[data-theme=dark] .sc-form:has(textarea:placeholder-shown) button{background:rgba(207,239,231,.12);color:#CFEFE7}
html[data-theme=dark] .sc-acts a{background:rgba(207,239,231,.14);color:#CFEFE7}
html[data-theme=dark] .sc-acts a:hover{background:rgba(207,239,231,.24)}
html[data-theme=dark] .sc-ty i{background:#7fe3c8}
html[data-theme=dark] .sc-ty span{color:rgba(207,239,231,.82)}
html[data-theme=dark] .sc-grow textarea::placeholder,html[data-theme=dark] .sc-note{color:rgba(207,239,231,.82)}

/* tablets and phones: the button stands above the floating "start" bar, and steps aside for the menu and the pinned phone */
html.menu-open .sc-btn,html.menu-open .sc-tip{opacity:0;visibility:hidden}
@media (max-width:1560px){.sc.at-foot .sc-btn,.sc.at-foot .sc-tip{opacity:0;visibility:hidden}}
@media (max-width:1100px){
  .sc{--sc-gap:14px;--sc-btn:56px}
  .m-cta.show~.sc .sc-btn{bottom:calc(88px + env(safe-area-inset-bottom))}
  .m-cta.show~.sc .sc-tip{bottom:calc(94px + env(safe-area-inset-bottom))}
  body.chn-pinned .sc-btn,body.chn-pinned .sc-tip{opacity:0;visibility:hidden}
}
/* a mouse can have a smaller field; on touch it is drawn at 16px or the iPhone zooms in (styles.css) */
@media (hover:hover) and (pointer:fine){.sc-grow textarea,.sc-grow::after{font-size:15px !important}}
@media (pointer:coarse){
  .sc-acts a,.sc-chips button,.sc-human{min-height:44px}
  .sc-form button{width:44px;height:44px}
  .sc-grow textarea,.sc-grow::after{min-height:44px;padding-block:10px;max-height:calc(5lh + 20px)}
  .sc-m{font-size:15.5px}
}
/* phones: the panel takes the whole screen, so the keyboard never squeezes it (chat.js keeps it inside the visible area) */
@media (max-width:600px){
  .sc-panel{inset:0;width:auto;height:auto;border:0;border-radius:0}
  .sc.kb .sc-panel{bottom:auto;height:calc(var(--vvh) / var(--z))}
  .sc-head{padding-top:calc(12px + env(safe-area-inset-top))}
  .sc-note{padding-bottom:calc(10px + env(safe-area-inset-bottom))}
  .sc.kb .sc-note{display:none}
  html.sc-lock,html.sc-lock body{overflow:hidden}
}
@media (prefers-reduced-motion:reduce){.sc-btn,.sc-panel,.sc-tip,.sc-m.new,.sc-ty,.sc-ty i,.sc-ty span,.sc.busy .sc-id small i{animation:none;transition:none}}
@media print{.sc{display:none}}
html[data-theme=dark] .sc-human{background:#0B3D3A;border-color:rgba(207,239,231,.12);color:#CFEFE7}
html[data-theme=dark] .sc-human:hover{background:rgba(207,239,231,.12)}
