#wk-chat-root{--wk-accent:#8c4fe8;--wk-mobile-bottom:96px;--wk-ink:#f7f0ff;--wk-muted:#b7a8c8;--wk-line:rgba(224,199,255,.13);position:fixed;z-index:99990;bottom:24px;font-family:inherit;direction:rtl;text-align:right;color:var(--wk-ink);font-size:14px;line-height:1.6;color-scheme:dark}
#wk-chat-root *{box-sizing:border-box}
#wk-chat-root [hidden]{display:none!important}
#wk-chat-root button,#wk-chat-root input,#wk-chat-root textarea{font:inherit;letter-spacing:normal;text-transform:none;box-shadow:none;margin:0}
#wk-chat-root button{cursor:pointer;border:0;min-width:0;min-height:0;line-height:1.4}
#wk-chat-root button:disabled{cursor:default;opacity:.45}
#wk-chat-root button:focus-visible,#wk-chat-root input:focus-visible,#wk-chat-root textarea:focus-visible{outline:2px solid #e6b5ff;outline-offset:4px}
#wk-chat-root.wk-left{left:max(18px,env(safe-area-inset-left));right:auto}
#wk-chat-root.wk-right{right:max(18px,env(safe-area-inset-right));left:auto}
#wk-chat-root .wk-bubble{display:flex;align-items:center;gap:4px;position:relative;width:76px;height:76px;padding:0;background:transparent!important;background-image:none!important;border:0!important;border-radius:0;color:#f4dcff;overflow:visible;box-shadow:none!important;transition:transform .18s ease}
#wk-chat-root .wk-bubble>svg{width:76px;height:76px;overflow:visible;filter:drop-shadow(0 4px 7px #170a2870)}
#wk-chat-root .wk-bubble:hover{transform:translateY(-3px)}
#wk-chat-root .wk-launch-label{position:absolute;left:78px;white-space:nowrap;padding:6px 11px;font-size:11px;font-weight:600;line-height:1.6;border:1px solid var(--wk-line);border-radius:12px;background:#21132bef;color:#f1ddff;opacity:0;transform:translateX(-6px);pointer-events:none;transition:opacity .18s,transform .18s}
#wk-chat-root.wk-right .wk-launch-label{right:78px;left:auto}
#wk-chat-root .wk-bubble:hover .wk-launch-label,#wk-chat-root .wk-bubble:focus-visible .wk-launch-label{opacity:1;transform:none}
#wk-chat-root .wk-panel{position:absolute;bottom:88px;width:min(390px,calc(100vw - 36px));height:min(590px,calc(100dvh - 132px));min-height:290px;display:flex;flex-direction:column;border:1px solid #ba8cdf42;border-radius:25px;overflow:hidden;background:#160f20;box-shadow:0 24px 80px #10081770,0 0 0 5px #d5aeff08;animation:wk-chat-in .18s ease-out}
#wk-chat-root.wk-left .wk-panel{left:0;right:auto}
#wk-chat-root.wk-right .wk-panel{right:0;left:auto}
#wk-chat-root .wk-header{display:flex;align-items:center;gap:12px;padding:20px 18px 17px;background:radial-gradient(ellipse at 15% 0,#a54dd733,transparent 70%),linear-gradient(120deg,#282037,#20152c);border-bottom:1px solid var(--wk-line);flex-shrink:0;min-height:101px}
#wk-chat-root .wk-avatar{display:grid;place-items:center;width:52px;height:52px;flex:0 0 52px;border-radius:18px;border:1px solid #d2a6fa3b;background:#ffffff06}
#wk-chat-root .wk-avatar svg{width:44px;height:44px}
#wk-chat-root .wk-heading{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
#wk-chat-root .wk-brand{font-family:inherit;letter-spacing:2px;font-size:9px;color:#cb9deb;align-self:flex-start}
#wk-chat-root .wk-heading strong{font-size:15px;font-weight:700;color:var(--wk-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#wk-chat-root .wk-status{font-size:10px;color:var(--wk-muted)}
#wk-chat-root .wk-status.is-online{color:#b5e8ce}
#wk-chat-root .wk-status.is-offline{color:#e6c896}
#wk-chat-root .wk-close{padding:7px;width:32px;height:32px;flex:0 0 32px;border-radius:11px;background:#ffffff07;color:#d8c7e8}
#wk-chat-root .wk-close:hover{background:#ffffff12}
#wk-chat-root .wk-close svg{display:block;width:18px;height:18px}
#wk-chat-root .wk-body{display:flex;flex:1;min-height:0;flex-direction:column;padding:16px 14px 0;gap:12px;background:radial-gradient(ellipse at 0 10%,#a666ce0b,transparent 60%)}
#wk-chat-root .wk-welcome{display:flex;align-items:flex-start;gap:10px;padding:11px 12px;background:#ae76da0c;border:1px solid #ae76da19;border-radius:14px;flex-shrink:0}
#wk-chat-root .wk-welcome>span{color:#e9c5ff;font-size:23px;line-height:1.15}
#wk-chat-root .wk-welcome p{margin:0;font-size:12px;color:#ded0ec;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
#wk-chat-root .wk-start{display:flex;flex-direction:column;gap:14px;padding:5px 3px;overflow:auto}
#wk-chat-root .wk-start label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#ddcee9;font-weight:500}
#wk-chat-root .wk-start label>span{font-size:10px;color:var(--wk-muted);display:contents}
#wk-chat-root .wk-start input{width:100%;height:46px;padding:10px 13px;border:1px solid #dec9fa22;background:#ffffff04;border-radius:12px;color:var(--wk-ink);outline:none;font-size:13px}
#wk-chat-root .wk-start input:focus{border-color:#b879e7}
#wk-chat-root .wk-start input::placeholder,#wk-chat-root .wk-send textarea::placeholder{color:#8d7d9f;opacity:1}
#wk-chat-root .wk-start-button{height:47px;border-radius:13px;margin-top:4px;color:#fff;background:linear-gradient(110deg,#9048d2,#6534a8);font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:11px}
#wk-chat-root .wk-start-note{font-size:10px;color:#9b89ad;margin:0;text-align:center}
#wk-chat-root .wk-chat{display:flex;flex-direction:column;flex:1;min-height:0;gap:9px}
#wk-chat-root .wk-messages{display:flex;flex-direction:column;gap:10px;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#6c47855e transparent;padding:3px 2px 10px}
#wk-chat-root .wk-empty{margin:auto;text-align:center;color:#9683aa;font-size:12px;padding:16px}
#wk-chat-root .wk-msg{max-width:87%;position:relative;font-size:13px;line-height:1.9;padding:10px 12px 7px;border:1px solid var(--wk-line);border-radius:16px;flex-shrink:0;animation:wk-message-in .16s ease-out;overflow-wrap:anywhere}
#wk-chat-root .wk-msg.me{align-self:flex-start;background:linear-gradient(125deg,#6d3b96,#4e2c73);border-color:#b981e436;border-top-right-radius:5px;color:#fbf3ff}
#wk-chat-root .wk-msg.them{align-self:flex-end;background:#271d34;border-color:#e0c7ff12;border-top-left-radius:5px;color:#ecdfF7}
#wk-chat-root .wk-message-text{white-space:pre-wrap;unicode-bidi:plaintext}
#wk-chat-root .wk-msg-meta{display:flex;align-items:center;justify-content:flex-end;gap:8px;font-size:9px;line-height:1.6;color:#d1b8e5;margin-top:5px;min-height:15px;flex-wrap:wrap}
#wk-chat-root .wk-msg-meta time{white-space:nowrap}
#wk-chat-root .wk-msg.them .wk-msg-meta{color:#ac9cbf}
#wk-chat-root .wk-msg[data-state=failed]{border-color:#e9a39975}
#wk-chat-root .wk-retry{color:#ffd6c8;background:transparent;padding:0;font-size:10px;text-decoration:underline;text-underline-offset:3px}
#wk-chat-root .wk-notice,#wk-chat-root .wk-start-error{font-size:11px;line-height:1.7;color:#efc2b7;border-radius:10px;padding:8px 10px;background:#cd826b12;border:1px solid #cd826b22;flex-shrink:0}
#wk-chat-root .wk-send{display:flex;align-items:flex-end;gap:8px;flex-shrink:0;padding:8px;border:1px solid #dcc2f226;border-radius:17px;background:#261b32}
#wk-chat-root .wk-send:focus-within{border-color:#b981e465}
#wk-chat-root .wk-send textarea{flex:1;display:block;min-width:0;width:100%;padding:7px 5px;min-height:38px;max-height:116px;resize:none;color:var(--wk-ink);background:transparent;border:0;border-radius:0;outline:none!important;font-size:13px;line-height:1.7;box-shadow:none!important}
#wk-chat-root .wk-send button{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center;padding:9px;background:linear-gradient(135deg,#a366df,var(--wk-accent));border-radius:12px;color:white}
#wk-chat-root .wk-send button svg{display:block;width:20px;height:20px}
#wk-chat-root .wk-footer{padding:9px 12px 10px;text-align:center;font-size:9px;color:#9a85ad;flex-shrink:0;background:#160f20}
#wk-chat-root .wk-footer span[dir]{color:#c9adde}
#wk-chat-root .wk-footer>span:last-child{padding-right:3px;color:#d4a6ed}
@keyframes wk-chat-in{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
@keyframes wk-message-in{from{opacity:.4;transform:translateY(3px)}to{opacity:1;transform:none}}
@media(max-width:520px){
 #wk-chat-root{bottom:calc(var(--wk-mobile-bottom) + env(safe-area-inset-bottom));font-size:14px}
 #wk-chat-root.wk-left{left:max(12px,env(safe-area-inset-left))}
 #wk-chat-root.wk-right{right:max(12px,env(safe-area-inset-right))}
 #wk-chat-root .wk-bubble,#wk-chat-root .wk-bubble>svg{width:65px;height:65px}
 #wk-chat-root .wk-launch-label{display:none}
 #wk-chat-root .wk-panel,#wk-chat-root.wk-left .wk-panel,#wk-chat-root.wk-right .wk-panel{position:fixed;top:calc(var(--wk-visible-top,0px) + max(10px,env(safe-area-inset-top)));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));bottom:auto;width:auto;height:calc(var(--wk-visible-height,100dvh) - 20px);max-height:calc(var(--wk-visible-height,100dvh) - 20px);min-height:0;border-radius:22px}
 #wk-chat-root.wk-is-open .wk-bubble{visibility:hidden}
 #wk-chat-root .wk-header{padding:15px;min-height:87px}
 #wk-chat-root .wk-body{padding:12px 12px 0}
 #wk-chat-root .wk-start input{font-size:16px}
 #wk-chat-root .wk-send textarea{font-size:16px}
}
@media(prefers-reduced-motion:reduce){#wk-chat-root *,#wk-chat-root *::before,#wk-chat-root *::after{animation:none!important;transition:none!important}}

#wk-chat-root.wk-compact .wk-welcome{display:none}
#wk-chat-root.wk-compact .wk-header{min-height:68px;padding-top:10px;padding-bottom:10px}
#wk-chat-root.wk-compact .wk-avatar{width:42px;height:42px;flex-basis:42px}
#wk-chat-root.wk-compact .wk-avatar svg{width:36px;height:36px}

/* Account/guest onboarding follows the same Witch Kids palette. */
#wk-chat-root .wk-choice{display:grid;gap:12px;padding:8px 0 18px}
#wk-chat-root .wk-choice[hidden],#wk-chat-root .wk-order-fields[hidden],#wk-chat-root .wk-reconnect[hidden]{display:none!important}
#wk-chat-root .wk-choice p{margin:4px 0 8px;color:#efe2ff;font-size:14px}
#wk-chat-root .wk-choice button,#wk-chat-root .wk-reconnect{border:1px solid #8155a8;border-radius:16px;background:linear-gradient(135deg,#613994,#3b2455);color:#fff;padding:15px 12px;font:inherit;cursor:pointer;text-align:right}
#wk-chat-root .wk-change-intent{background:transparent;border:0;color:#cda4ff;font:inherit;cursor:pointer;padding:0 0 8px;text-align:right}
#wk-chat-root .wk-order-fields{display:grid;gap:8px}
#wk-chat-root .wk-reconnect{margin:12px 0;width:100%}

/* 0.4: clear, always-visible support launcher and compact mobile conversation. */
#wk-chat-root .wk-bubble{width:auto;height:52px;gap:6px;flex-direction:row-reverse}
#wk-chat-root .wk-bubble>svg{width:52px;height:52px;flex-shrink:0}
#wk-chat-root .wk-launch-label,#wk-chat-root.wk-right .wk-launch-label{position:static;display:flex;align-items:center;gap:7px;opacity:1;transform:none;padding:8px 12px;border-radius:20px;font-size:12px;background:#21162ded;box-shadow:0 3px 14px #190d2825}
#wk-chat-root .wk-launch-label:before{content:"";width:6px;height:6px;border-radius:50%;background:#cab5e4;flex-shrink:0}
#wk-chat-root.wk-online .wk-launch-label:before{background:#8ee4bc;box-shadow:0 0 0 3px #8ee4bc14}
#wk-chat-root .wk-panel{bottom:66px}
#wk-chat-root .wk-choice{overflow:auto;flex-shrink:1;padding-bottom:10px;gap:9px}
@media(max-width:520px){
 #wk-chat-root .wk-bubble{width:auto;height:46px}
 #wk-chat-root .wk-bubble>svg{width:46px;height:46px}
 #wk-chat-root .wk-launch-label{font-size:11px;padding:7px 10px}
 #wk-chat-root .wk-panel,#wk-chat-root.wk-left .wk-panel,#wk-chat-root.wk-right .wk-panel{top:auto;bottom:calc(var(--wk-mobile-bottom) + 58px + env(safe-area-inset-bottom));height:min(440px,52dvh);max-height:calc(var(--wk-visible-height,100dvh) - 22px);border-radius:20px}
 #wk-chat-root.wk-compact .wk-panel,#wk-chat-root.wk-compact.wk-left .wk-panel,#wk-chat-root.wk-compact.wk-right .wk-panel{top:calc(var(--wk-visible-top,0px) + 10px);bottom:auto;height:calc(var(--wk-visible-height,100dvh) - 20px)}
 #wk-chat-root .wk-header{padding:10px 12px;min-height:70px;gap:9px}
 #wk-chat-root .wk-avatar{width:42px;height:42px;flex-basis:42px;border-radius:14px}
 #wk-chat-root .wk-avatar svg{width:36px;height:36px}
 #wk-chat-root .wk-heading strong{font-size:13px}
 #wk-chat-root .wk-body{padding:9px 10px 0;gap:8px}
 #wk-chat-root .wk-welcome{padding:7px 9px}
 #wk-chat-root .wk-welcome p{font-size:11px;line-height:1.6}
 #wk-chat-root .wk-choice p{font-size:12px;margin:0 0 3px}
 #wk-chat-root .wk-choice button{padding:11px 12px;font-size:12px;border-radius:12px}
 #wk-chat-root .wk-start{gap:8px;padding-top:0}
 #wk-chat-root .wk-start input{height:40px}
 #wk-chat-root .wk-start-button{height:41px;flex-shrink:0}
 #wk-chat-root .wk-footer{padding:5px 10px;font-size:8px}
}

@media(max-width:520px){#wk-chat-root.wk-onboarding .wk-welcome{display:none}}

/* 0.4.2: mobile support stays docked to the lower-left corner. */
@media(max-width:520px){
 #wk-chat-root .wk-panel,#wk-chat-root.wk-left .wk-panel,#wk-chat-root.wk-right .wk-panel,
 #wk-chat-root.wk-compact .wk-panel,#wk-chat-root.wk-compact.wk-left .wk-panel,#wk-chat-root.wk-compact.wk-right .wk-panel{
  top:auto;left:max(12px,env(safe-area-inset-left));right:auto;
  bottom:calc(var(--wk-mobile-bottom) + env(safe-area-inset-bottom));
  --wk-panel-width:min(250px,calc(100vw - 24px),calc((100dvh - var(--wk-mobile-bottom) - env(safe-area-inset-bottom) - 24px) * 9 / 16));
  width:var(--wk-panel-width);height:calc(var(--wk-panel-width) * 16 / 9);aspect-ratio:9 / 16;
  min-height:0;max-height:none;border-radius:18px;
 }
 #wk-chat-root.wk-keyboard .wk-panel,#wk-chat-root.wk-keyboard.wk-left .wk-panel,#wk-chat-root.wk-keyboard.wk-right .wk-panel{
  top:auto;left:max(12px,env(safe-area-inset-left));right:auto;
  bottom:calc(100dvh - var(--wk-visible-top,0px) - var(--wk-visible-height,100dvh) + 8px);
  width:min(250px,calc(100vw - 24px));height:min(444.444px,calc(var(--wk-visible-height,100dvh) - 16px));
  min-height:0;max-height:calc(var(--wk-visible-height,100dvh) - 16px);
 }
 #wk-chat-root .wk-header{min-height:62px;padding:9px 10px;gap:8px}
 #wk-chat-root .wk-avatar{width:34px;height:34px;flex-basis:34px;border-radius:11px}
 #wk-chat-root .wk-avatar svg{width:30px;height:30px}
 #wk-chat-root .wk-heading strong{font-size:12px}
 #wk-chat-root .wk-status{font-size:9px}
 #wk-chat-root .wk-close{width:30px;height:30px;flex-basis:30px}
 #wk-chat-root .wk-panel:has(.wk-chat:not([hidden])) .wk-welcome{display:none}
 #wk-chat-root .wk-messages{gap:7px}
 #wk-chat-root .wk-msg{font-size:12px;padding:7px 10px 5px;max-width:90%}
 #wk-chat-root .wk-body{padding:8px 9px 0;gap:7px}
 #wk-chat-root .wk-send{padding:5px;gap:5px;border-radius:14px}
 #wk-chat-root .wk-send textarea{font-size:16px;padding:5px 3px;min-height:34px}
 #wk-chat-root .wk-send button{width:34px;height:34px;flex-basis:34px;padding:7px}
}

/* Product questions inherit the storefront's button font and geometry. */
.wk-product-help{margin:12px 0 18px;clear:both}
.wk-product-help .wk-product-question{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:44px;font-family:inherit;font-size:13px;font-weight:600;border:1px solid var(--wd-primary-color,#aa80bf);border-radius:15px;background:linear-gradient(135deg,#f7b0b812,#e98d9a0a);color:var(--wd-primary-color,#aa80bf);padding:10px 14px;line-height:1.6;box-shadow:none;cursor:pointer}
.wk-product-help .wk-product-question:hover{background:var(--wd-primary-color,#aa80bf);color:white}
.wk-product-question svg{width:20px;height:20px;flex-shrink:0}
#wk-chat-root .wk-product-card{display:flex;align-items:center;gap:8px;padding:7px;background:#ffffff09;border:1px solid var(--wk-line);border-radius:12px;color:var(--wk-ink);text-decoration:none;font-size:11px;line-height:1.7;overflow:hidden}
#wk-chat-root .wk-product-card img{width:44px;height:44px;object-fit:cover;border-radius:8px;flex-shrink:0}
#wk-chat-root .wk-product-preview{display:flex;gap:5px;align-items:center;flex-shrink:0}
#wk-chat-root .wk-product-preview .wk-product-card{flex:1;min-width:0}
#wk-chat-root .wk-product-preview>button{color:#e6c9ff;background:transparent;font-size:22px;padding:4px}
#wk-chat-root .wk-msg .wk-product-card{margin-bottom:7px}
#wk-chat-root .wk-reply-alert{position:absolute;bottom:62px;left:0;width:220px;border:1px solid #aa80bf;background:#281a38;color:#f8edff;border-radius:14px;padding:10px 12px;font-size:12px;line-height:1.7;box-shadow:0 5px 18px #0005}
#wk-chat-root.wk-has-reply .wk-launch-label:before{background:#ffb4d7;box-shadow:0 0 0 4px #ffb4d726}
#wk-chat-root .wk-chat{min-height:0}
@media(max-width:520px){.wk-product-help .wk-product-question{font-size:12px;min-height:42px}}
