.zifchat-widget{position:fixed;bottom:22px;z-index:999999;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}.zifchat-right{right:22px}.zifchat-left{left:22px}.zifchat-launcher{width:62px;height:62px;border:0;border-radius:22px;background:var(--zifchat-bubble,#25d366);box-shadow:0 12px 34px rgba(15,23,42,.24);cursor:pointer;display:grid;place-items:center;transition:.2s transform,.2s border-radius}.zifchat-launcher:hover{transform:translateY(-2px)}.zifchat-launcher svg{width:30px;fill:#fff}.zifchat-x{display:none;color:#fff;font-size:32px;line-height:1}.is-open .zifchat-chat-icon{display:none}.is-open .zifchat-x{display:block}.zifchat-window{position:absolute;bottom:78px;width:350px;max-width:calc(100vw - 32px);background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:22px;box-shadow:0 24px 70px rgba(15,23,42,.22);overflow:hidden;opacity:0;transform:translateY(14px) scale(.97);pointer-events:none;transition:.2s}.zifchat-right .zifchat-window{right:0}.zifchat-left .zifchat-window{left:0}.is-open .zifchat-window{opacity:1;transform:none;pointer-events:auto}.zifchat-header{background:var(--zifchat-header,#075e54);color:#fff;padding:17px;display:flex;align-items:center;gap:11px}.zifchat-avatar{width:42px;height:42px;border-radius:14px;background:rgba(255,255,255,.18);display:grid;place-items:center;font-weight:800}.zifchat-header-copy{display:flex;flex-direction:column;flex:1}.zifchat-header-copy strong{font-size:15px}.zifchat-header-copy span{font-size:12px;opacity:.8;margin-top:2px}.zifchat-close{border:0;background:transparent;color:#fff;font-size:26px;cursor:pointer}.zifchat-body{padding:20px;background:linear-gradient(145deg,#f0f5f3,#e8eeeb);min-height:145px}.zifchat-message{display:inline-block;max-width:88%;padding:12px 14px;background:#fff;border-radius:4px 14px 14px 14px;color:#17211d;font-size:14px;line-height:1.5;box-shadow:0 2px 8px rgba(15,23,42,.07)}.zifchat-compose{display:flex;gap:8px;align-items:flex-end;padding:11px;background:#fff;border-top:1px solid #eef1f0}.zifchat-compose textarea{box-sizing:border-box;flex:1;resize:none;min-height:42px;max-height:92px;border:1px solid #dfe5e2;border-radius:14px;padding:11px 13px;outline:0;font:inherit;font-size:14px}.zifchat-compose textarea:focus{border-color:#25d366;box-shadow:0 0 0 3px rgba(37,211,102,.1)}.zifchat-compose button{width:42px;height:42px;border:0;border-radius:14px;background:#25d366;display:grid;place-items:center;cursor:pointer}.zifchat-compose button svg{width:19px;fill:#fff}.zifchat-powered{text-align:center;font-size:10px;color:#8a9690;padding:0 0 8px;background:#fff}.zifchat-powered strong{color:#4d5a54}@media(max-width:420px){.zifchat-widget{bottom:16px}.zifchat-right{right:16px}.zifchat-left{left:16px}.zifchat-window{width:calc(100vw - 32px)}}.zifchat-section-title{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#718078;margin:18px 2px 8px}.zifchat-agents{display:grid;gap:7px}.zifchat-agent{width:100%;border:1px solid #e2e8e5;background:#fff;border-radius:14px;padding:10px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer;transition:.18s}.zifchat-agent:hover,.zifchat-agent.is-selected{border-color:#25d366;box-shadow:0 4px 16px rgba(37,211,102,.12)}.zifchat-agent-avatar{width:36px;height:36px;border-radius:12px;background:#eafaf0;color:#138a43;display:grid;place-items:center;font-weight:800}.zifchat-agent-copy{display:flex;flex-direction:column;flex:1}.zifchat-agent-copy strong{font-size:13px;color:#17211d}.zifchat-agent-copy small{font-size:11px;color:#718078;margin-top:2px}.zifchat-chevron{font-size:22px;color:#9aa6a0}.zifchat-quick-replies{display:flex;flex-wrap:wrap;gap:7px}.zifchat-quick{border:1px solid #dce6e1;background:#fff;color:#33443c;border-radius:999px;padding:8px 10px;font-size:12px;cursor:pointer}.zifchat-quick:hover{border-color:#25d366;color:#138a43}.zifchat-body{max-height:380px;overflow:auto}

.zifchat-agent-avatar{overflow:hidden}.zifchat-agent-avatar img{width:100%;height:100%;object-fit:cover;display:block}

.zifchat-agent.is-unavailable{opacity:.55;cursor:not-allowed;background:#f8faf9}.zifchat-agent.is-unavailable:hover{border-color:#e2e8e5;box-shadow:none}.zifchat-agent.is-unavailable .zifchat-chevron{display:none}

/* ZifChat Pro AI layer */
.zifchat-ai-panel{padding:14px;border-bottom:1px solid #e5e7eb;background:#fff}
.zifchat-ai-intro{font-size:13px;line-height:1.45;margin-bottom:10px}
.zifchat-ai-messages{max-height:190px;overflow:auto;display:flex;flex-direction:column;gap:7px;margin:8px 0}
.zifchat-ai-msg{max-width:88%;padding:8px 10px;border-radius:10px;font-size:13px;line-height:1.4}
.zifchat-ai-msg.user{align-self:flex-end;background:#dcfce7}
.zifchat-ai-msg.assistant{align-self:flex-start;background:#f3f4f6}
.zifchat-ai-form{display:flex;gap:6px}
.zifchat-ai-input{min-width:0;flex:1;padding:9px 10px;border:1px solid #d1d5db;border-radius:8px}
.zifchat-ai-form button,.zifchat-ai-human,.zifchat-ai-handoff{cursor:pointer}
.zifchat-ai-form button{padding:8px 12px;border:0;border-radius:8px;background:#16a34a;color:#fff}
.zifchat-ai-human{margin-top:8px;padding:0;border:0;background:transparent;text-decoration:underline;font-size:12px}
.zifchat-ai-handoff{display:block;margin:5px 0 0;padding:8px 10px;border:0;border-radius:8px;background:#16a34a;color:#fff}

/* ZifChat Pro AI full-chat mode */
.zifchat-ai-mode .zifchat-body{padding:0;background:#fff;min-height:360px;max-height:440px;overflow:hidden}
.zifchat-ai-mode .zifchat-body>:not(.zifchat-ai-panel){display:none!important}
.zifchat-ai-mode .zifchat-compose{display:none!important}
.zifchat-ai-mode .zifchat-ai-panel{display:flex;flex-direction:column;box-sizing:border-box;min-height:360px;max-height:440px;padding:16px;background:#fff;border:0}
.zifchat-ai-welcome{display:flex;gap:10px;padding-bottom:12px;border-bottom:1px solid #eef1f0;font-size:13px;line-height:1.45}
.zifchat-ai-avatar{flex:0 0 34px;width:34px;height:34px;border-radius:11px;background:#eafaf0;color:#138a43;display:grid;place-items:center;font-size:11px;font-weight:800}
.zifchat-ai-welcome strong{display:block;margin-bottom:2px}.zifchat-ai-messages{flex:1;max-height:none;min-height:190px;overflow-y:auto;padding:12px 2px;display:flex;flex-direction:column;gap:8px;margin:0}
.zifchat-ai-msg{max-width:86%;padding:9px 11px;border-radius:12px;font-size:13px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.zifchat-ai-msg.user{align-self:flex-end;background:#dcfce7;border-bottom-right-radius:4px}.zifchat-ai-msg.assistant{align-self:flex-start;background:#f3f4f6;border-bottom-left-radius:4px}
.zifchat-ai-form{display:flex;gap:7px;padding-top:10px;border-top:1px solid #eef1f0}.zifchat-ai-input{box-sizing:border-box;min-width:0;flex:1;height:42px;padding:9px 11px;border:1px solid #d8dfdc;border-radius:12px;outline:0;font:inherit;font-size:13px}
.zifchat-ai-form button{height:42px;padding:0 15px;border:0;border-radius:12px;background:#16a34a;color:#fff;font-weight:600}.zifchat-ai-human{align-self:flex-start;margin-top:9px;padding:0;border:0;background:transparent;color:#475569;text-decoration:underline;font-size:12px}
.zifchat-ai-handoff{align-self:flex-start;margin-top:2px;padding:8px 11px;border:0;border-radius:9px;background:#16a34a;color:#fff;font-size:12px;font-weight:600}
.zifchat-ai-typing{display:flex!important;gap:4px;align-items:center;width:42px;min-height:18px}.zifchat-ai-typing span{width:6px;height:6px;border-radius:50%;background:#8b9791;animation:zifchatTyping 1s infinite ease-in-out}.zifchat-ai-typing span:nth-child(2){animation-delay:.15s}.zifchat-ai-typing span:nth-child(3){animation-delay:.3s}@keyframes zifchatTyping{0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-3px);opacity:1}}


/* ZifChat Premium Widget polish — additive; behavior unchanged */
.zifchat-widget,.zifchat-panel,.zifchat-chat{font-synthesis:none}
.zifchat-panel,.zifchat-chat{border:1px solid rgba(17,54,34,.10);box-shadow:0 22px 65px rgba(15,36,25,.18)}
.zifchat-panel button,.zifchat-chat button,.zifchat-launcher{transition:transform .14s ease,box-shadow .14s ease,opacity .14s ease}
.zifchat-panel button:hover,.zifchat-chat button:hover{transform:translateY(-1px)}
.zifchat-panel button:focus-visible,.zifchat-chat button:focus-visible,.zifchat-launcher:focus-visible{outline:3px solid rgba(21,128,61,.28);outline-offset:2px}
.zifchat-agent,.zifchat-agent-card{transition:background .15s,border-color .15s,transform .15s}
.zifchat-agent:hover,.zifchat-agent-card:hover{transform:translateY(-1px)}
.zifchat-agent img,.zifchat-agent-card img{object-fit:cover}
.zifchat-ai-message,.zifchat-message{line-height:1.52}
@media(max-width:600px){.zifchat-panel,.zifchat-chat{max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 28px)!important}}
@media(prefers-reduced-motion:reduce){.zifchat-panel button,.zifchat-chat button,.zifchat-launcher,.zifchat-agent,.zifchat-agent-card{transition:none!important;transform:none!important}}


/* RC5 — visible premium frontend motion */
@keyframes zifchatPopIn{0%{opacity:0;transform:translateY(16px) scale(.78)}70%{opacity:1;transform:translateY(-3px) scale(1.04)}100%{opacity:1;transform:none}}
@keyframes zifchatNudgeIn{0%,35%{opacity:0;transform:translateX(8px)}100%{opacity:1;transform:none}}
@keyframes zifchatOpen{0%{opacity:0;transform:translateY(22px) scale(.94)}100%{opacity:1;transform:none}}
@keyframes zifchatRowIn{0%{opacity:0;transform:translateY(8px)}100%{opacity:1;transform:none}}
.zifchat-launcher{animation:zifchatPopIn .55s cubic-bezier(.2,.85,.2,1) both}
.zifchat-launcher-nudge{position:absolute;bottom:10px;right:74px;white-space:nowrap;background:#fff;color:#1f352a;border:1px solid #dce8e1;border-radius:12px;padding:9px 12px;font-size:12px;font-weight:700;box-shadow:0 8px 24px rgba(15,36,25,.13);animation:zifchatNudgeIn .7s ease .65s both;pointer-events:none}
.zifchat-left .zifchat-launcher-nudge{left:74px;right:auto}
.zifchat-launcher-nudge:after{content:"";position:absolute;right:-5px;top:50%;width:9px;height:9px;background:#fff;border-top:1px solid #dce8e1;border-right:1px solid #dce8e1;transform:translateY(-50%) rotate(45deg)}
.zifchat-left .zifchat-launcher-nudge:after{left:-5px;right:auto;border:0;border-left:1px solid #dce8e1;border-bottom:1px solid #dce8e1}
.zifchat-just-opened .zifchat-window{animation:zifchatOpen .32s cubic-bezier(.2,.85,.2,1) both}
.zifchat-just-opened .zifchat-agent,.zifchat-just-opened .zifchat-quick{animation:zifchatRowIn .3s ease both}
.zifchat-just-opened .zifchat-agent:nth-child(2),.zifchat-just-opened .zifchat-quick:nth-child(2){animation-delay:.05s}
.zifchat-just-opened .zifchat-agent:nth-child(3),.zifchat-just-opened .zifchat-quick:nth-child(3){animation-delay:.10s}
.zifchat-ai-msg{animation:zifchatRowIn .2s ease both}
@media(max-width:480px){.zifchat-launcher-nudge{display:none}}
@media(prefers-reduced-motion:reduce){.zifchat-launcher,.zifchat-launcher-nudge,.zifchat-just-opened .zifchat-window,.zifchat-just-opened .zifchat-agent,.zifchat-just-opened .zifchat-quick,.zifchat-ai-msg{animation:none!important}}

/* RC6 — contextual page-aware frontend */
.zifchat-launcher-nudge{max-width:230px;overflow:hidden;text-overflow:ellipsis}
.zifchat-ai-welcome{animation:zifchatRowIn .28s ease both}
.zifchat-ai-panel{background:linear-gradient(180deg,#fff,#fbfdfc)}


/* RC7 — clear, dismissible attention animation */
@keyframes zifchatAttentionBounce{0%,100%{transform:translateY(0)}12%{transform:translateY(-9px)}24%{transform:translateY(0)}34%{transform:translateY(-5px)}44%{transform:translateY(0)}}
@keyframes zifchatClickMeFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
.zifchat-launcher{animation:zifchatPopIn .55s cubic-bezier(.2,.85,.2,1) both,zifchatAttentionBounce 2.8s ease-in-out 1.1s infinite!important}
.zifchat-launcher-nudge{display:flex;align-items:center;gap:8px;animation:zifchatNudgeIn .7s ease .55s both,zifchatClickMeFloat 2.1s ease-in-out 1.3s infinite!important;padding:8px 8px 8px 12px!important;pointer-events:auto!important}
.zifchat-launcher-nudge[hidden]{display:none!important}
.zifchat-nudge-dismiss{display:grid;place-items:center;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:#eef3f0;color:#53665c;font-size:16px;line-height:1;cursor:pointer}
.zifchat-nudge-dismiss:hover{background:#e2ebe6;color:#243b2f}
.zifchat-widget.is-open .zifchat-launcher{animation:none!important}
@media(prefers-reduced-motion:reduce){.zifchat-launcher,.zifchat-launcher-nudge{animation:none!important}}


/* v1.15 Final UI Release Candidate — frontend finish */
.zifchat-window{transform-origin:bottom right}
.zifchat-left .zifchat-window{transform-origin:bottom left}
.zifchat-header{min-height:54px}
.zifchat-body{scrollbar-width:thin;scrollbar-color:#aebbb4 transparent}
.zifchat-ai-messages{scrollbar-width:thin;scrollbar-color:#aebbb4 transparent}
.zifchat-ai-msg{line-height:1.55}
.zifchat-ai-msg.user{box-shadow:0 3px 10px rgba(22,163,74,.07)}
.zifchat-ai-msg.assistant{box-shadow:0 3px 10px rgba(15,36,25,.045)}
.zifchat-ai-form{gap:9px}
.zifchat-ai-input{min-height:44px}
.zifchat-ai-form button,.zifchat-ai-handoff{min-height:42px;font-weight:750}
.zifchat-ai-human{transition:color .15s,opacity .15s}
.zifchat-ai-human:hover{opacity:.78}
.zifchat-launcher:focus-visible,.zifchat-close:focus-visible,.zifchat-agent:focus-visible,.zifchat-quick:focus-visible,.zifchat-ai-form button:focus-visible,.zifchat-ai-handoff:focus-visible,.zifchat-nudge-dismiss:focus-visible{outline:3px solid rgba(21,128,61,.22);outline-offset:2px}
@media(max-width:480px){
 .zifchat-window{width:calc(100vw - 24px)!important;max-width:none!important;bottom:76px!important}
 .zifchat-right .zifchat-window{right:-4px!important}.zifchat-left .zifchat-window{left:-4px!important}
 .zifchat-ai-messages{max-height:42vh!important}
}

.zifchat-human-mode .zifchat-body{padding-top:14px}.zifchat-human-mode .zifchat-message{background:linear-gradient(135deg,#f6faf7,#fff);border:1px solid #dfe9e3}.zifchat-human-mode .zifchat-agents{margin-top:6px}.zifchat-woo-cta{display:block!important;width:100%;margin:12px 0!important;border-radius:10px!important;min-height:46px!important;font-weight:800!important}

.zifchat-return-ai{display:flex;align-items:center;justify-content:center;gap:7px;width:calc(100% - 32px);margin:12px 16px 0;padding:10px 14px;border:1px solid #cfe1d6;border-radius:10px;background:#f5faf7;color:#176536;font:inherit;font-weight:750;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}.zifchat-return-ai:hover{background:#edf8f1;border-color:#afd2bd;transform:translateY(-1px)}.zifchat-return-ai[hidden]{display:none!important}.zifchat-return-ai:focus-visible{outline:3px solid rgba(21,128,61,.18);outline-offset:2px}

/* Compact AI return action: intentionally secondary, like "Talk to a human". */
.zifchat-return-ai{width:auto!important;min-height:0!important;margin:8px auto 2px!important;padding:5px 9px!important;border:0!important;border-radius:7px!important;background:transparent!important;box-shadow:none!important;color:#65766d!important;font-size:12px!important;font-weight:650!important;line-height:1.3!important;transform:none!important}
.zifchat-return-ai:hover{background:#f3f7f4!important;color:#176536!important;transform:none!important}
.zifchat-return-ai:focus-visible{outline:2px solid rgba(21,128,61,.22)!important;outline-offset:2px}

.zifchat-woo-cta{background:#25D366!important;border-color:#25D366!important;color:#fff!important;text-shadow:none!important;box-shadow:none!important}
.zifchat-woo-cta:hover,.zifchat-woo-cta:focus{background:#1ebe5d!important;border-color:#1ebe5d!important;color:#fff!important}
.zifchat-woo-cta:focus-visible{outline:3px solid rgba(37,211,102,.24)!important;outline-offset:2px}

/* ZifChat 1.17 final frontend cleanup */
.zifchat-widget{--zif-ui-radius:14px}
.zifchat-panel{border-radius:20px!important}
.zifchat-agent{border-radius:14px!important}
.zifchat-compose input,.zifchat-compose textarea{border-radius:12px!important}
.zifchat-return-ai{font-size:12px!important;margin-top:6px!important}

/* v1.21.6 — compact viewport-safe widget + iOS input fix */
.zifchat-window{height:auto!important;min-height:0!important;max-height:calc(100dvh - 118px);display:flex;flex-direction:column}
.zifchat-header{flex:0 0 auto}
.zifchat-body{flex:0 1 auto;min-height:0;overflow-y:auto}
.zifchat-compose,.zifchat-powered{flex:0 0 auto}
@media(max-width:600px){
 .zifchat-widget{bottom:12px!important;right:12px!important;left:auto!important}
 .zifchat-window{position:fixed!important;top:12px!important;right:12px!important;bottom:86px!important;left:12px!important;width:auto!important;max-width:none!important;max-height:none!important;height:auto!important;border-radius:18px!important}
 .zifchat-body{max-height:none!important;overscroll-behavior:contain}
 .zifchat-compose textarea,.zifchat-ai-input{font-size:16px!important}
 .zifchat-compose textarea{min-height:46px}
 .zifchat-ai-input{height:46px!important;min-height:46px!important}
 .zifchat-ai-mode .zifchat-body{flex:1 1 auto;min-height:0!important;max-height:none!important}
 .zifchat-ai-mode .zifchat-ai-panel{flex:1 1 auto;min-height:0!important;max-height:none!important}
 .zifchat-ai-messages{min-height:0!important;max-height:none!important}
}

/* v1.21.7 — conversation-first sizing and mobile keyboard viewport */
/* Desktop/tablet: the window must hug its real content. No decorative empty top/bottom space. */
.zifchat-window{
  height:fit-content!important;
  min-height:0!important;
  max-height:min(680px,calc(100dvh - 112px))!important;
  padding:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
}
.zifchat-window>.zifchat-header{order:0;flex:0 0 auto!important;margin:0!important}
.zifchat-window>.zifchat-body{order:1;flex:0 1 auto!important;min-height:0!important;margin:0!important;overflow-y:auto!important}
.zifchat-window>.zifchat-return-ai{order:2}
.zifchat-window>.zifchat-compose{order:3;flex:0 0 auto!important;margin:0!important}
.zifchat-window>.zifchat-powered{order:4;flex:0 0 auto!important;margin:0!important;padding:7px 0 10px!important}
.zifchat-human-mode .zifchat-body{max-height:min(430px,calc(100dvh - 270px))!important}
.zifchat-ai-mode .zifchat-window{height:min(620px,calc(100dvh - 112px))!important}
.zifchat-ai-mode .zifchat-body{flex:1 1 auto!important;min-height:0!important;max-height:none!important}
.zifchat-ai-mode .zifchat-ai-panel{height:100%!important;min-height:0!important;max-height:none!important}
.zifchat-ai-mode .zifchat-ai-messages{flex:1 1 auto!important;min-height:90px!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain}

@media(max-width:600px){
  /* Use the *visible* iOS/Android viewport. JS updates these values when the keyboard opens. */
  .zifchat-window{
    position:fixed!important;
    top:var(--zifchat-vv-top,8px)!important;
    right:8px!important;
    bottom:auto!important;
    left:8px!important;
    width:auto!important;
    max-width:none!important;
    height:calc(var(--zifchat-vv-height,100dvh) - 16px)!important;
    max-height:calc(var(--zifchat-vv-height,100dvh) - 16px)!important;
    border-radius:18px!important;
  }
  .zifchat-header{padding:13px 15px!important;min-height:58px!important}
  .zifchat-body{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
  .zifchat-compose{padding:9px!important;flex:0 0 auto!important}
  .zifchat-powered{padding:5px 0 7px!important;line-height:1.2!important}
  .zifchat-compose textarea,.zifchat-ai-input{font-size:16px!important;line-height:1.35!important;-webkit-text-size-adjust:100%}
  .zifchat-ai-mode .zifchat-window{height:calc(var(--zifchat-vv-height,100dvh) - 16px)!important}
  .zifchat-ai-mode .zifchat-body,.zifchat-ai-mode .zifchat-ai-panel{flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important}
  .zifchat-ai-mode .zifchat-ai-messages{flex:1 1 auto!important;min-height:80px!important;max-height:none!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
  /* Keep the launcher out of the way while the keyboard is occupying the visual viewport. */
  .zifchat-keyboard-open .zifchat-launcher,.zifchat-keyboard-open .zifchat-launcher-nudge{display:none!important}
}

/* v1.22.10 — mobile compact chat when keyboard is closed.
 * Preserve the visual-viewport/full-height conversation mode only while typing. */
@media(max-width:600px){
  .zifchat-window,
  .zifchat-ai-mode .zifchat-window{
    top:auto!important;
    bottom:12px!important;
    height:auto!important;
    max-height:calc(var(--zifchat-vv-height,100dvh) - 24px)!important;
  }
  .zifchat-window>.zifchat-body,
  .zifchat-ai-mode .zifchat-body{
    flex:0 1 auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:calc(var(--zifchat-vv-height,100dvh) - 155px)!important;
  }
  .zifchat-ai-mode .zifchat-ai-panel{
    flex:0 1 auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }
  .zifchat-ai-mode .zifchat-ai-messages{
    flex:0 1 auto!important;
    min-height:80px!important;
    max-height:min(330px,calc(var(--zifchat-vv-height,100dvh) - 310px))!important;
    overflow-y:auto!important;
  }

  /* While the software keyboard is open, expand into the visible viewport so
   * the visitor can keep recent conversation context above the input. */
  .zifchat-keyboard-open .zifchat-window,
  .zifchat-keyboard-open.zifchat-ai-mode .zifchat-window{
    top:var(--zifchat-vv-top,8px)!important;
    bottom:auto!important;
    height:calc(var(--zifchat-vv-height,100dvh) - 16px)!important;
    max-height:calc(var(--zifchat-vv-height,100dvh) - 16px)!important;
  }
  .zifchat-keyboard-open .zifchat-window>.zifchat-body,
  .zifchat-keyboard-open.zifchat-ai-mode .zifchat-body,
  .zifchat-keyboard-open.zifchat-ai-mode .zifchat-ai-panel{
    flex:1 1 auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }
  .zifchat-keyboard-open.zifchat-ai-mode .zifchat-ai-messages{
    flex:1 1 auto!important;
    min-height:80px!important;
    max-height:none!important;
  }
}


/* v1.22.11: Free chat text sizing + safe AI links */
.zifchat-message,.zifchat-ai-msg{font-size:var(--zifchat-font-size,14px)!important}
.zifchat-ai-welcome,.zifchat-agent-copy strong{font-size:calc(var(--zifchat-font-size,14px) - 1px)!important}
.zifchat-agent-copy small,.zifchat-quick,.zifchat-section-title,.zifchat-ai-human,.zifchat-ai-handoff{font-size:calc(var(--zifchat-font-size,14px) - 2px)!important}
.zifchat-ai-input,.zifchat-compose textarea{font-size:var(--zifchat-font-size,14px)}
.zifchat-ai-link{color:#08783d;text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:2px;font-weight:650;overflow-wrap:anywhere;word-break:break-word}
.zifchat-ai-link:hover,.zifchat-ai-link:focus{color:#065f32;text-decoration-thickness:2px}
@media(max-width:600px){.zifchat-ai-input,.zifchat-compose textarea{font-size:16px!important}}

/* v1.23 commerce CTA + proactive prompt */
.zifchat-commerce-cta{margin-top:10px!important;background:#25d366!important;border-color:#25d366!important;color:#fff!important;font-weight:700!important}.zifchat-commerce-cta:hover{filter:brightness(.96)}.zifchat-launcher-nudge span{display:block;max-width:260px;white-space:normal;line-height:1.35}.zifchat-launcher-nudge{max-width:300px!important;white-space:normal!important}

/* v1.23 RC2 — polished proactive engagement */
.zifchat-launcher-nudge{
  min-width:220px;max-width:min(310px,calc(100vw - 112px))!important;
  padding:14px 42px 14px 16px!important;border-radius:18px!important;
  border:1px solid rgba(15,74,52,.12)!important;background:rgba(255,255,255,.98)!important;
  color:#18352a!important;box-shadow:0 18px 48px rgba(15,36,25,.18)!important;
  font-size:13px!important;font-weight:650!important;line-height:1.48!important;
  cursor:pointer;align-items:flex-start!important;overflow:visible!important;text-overflow:clip!important;
  animation:zifchatPromptEnter .42s cubic-bezier(.2,.9,.25,1.15) both,zifchatPromptFloat 3.2s ease-in-out .65s infinite!important;
}
.zifchat-launcher-nudge span{display:block!important;max-width:none!important;white-space:normal!important;overflow-wrap:anywhere;letter-spacing:-.005em}
.zifchat-launcher-nudge:before{content:"✦";display:grid;place-items:center;flex:0 0 25px;width:25px;height:25px;margin-top:-2px;border-radius:9px;background:rgba(37,211,102,.12);color:#15934b;font-size:14px;font-weight:900}
.zifchat-launcher-nudge:after{right:-6px!important;width:11px!important;height:11px!important}
.zifchat-left .zifchat-launcher-nudge:after{left:-6px!important;right:auto!important}
.zifchat-nudge-dismiss{position:absolute;right:10px;top:10px;width:26px!important;height:26px!important;background:#f0f5f2!important;color:#61736a!important;transition:.18s ease}
.zifchat-nudge-dismiss:hover{background:#e5eee9!important;color:#1d3a2d!important;transform:scale(1.05)}
.zifchat-no-prompt-animation{animation:none!important}
@keyframes zifchatPromptEnter{from{opacity:0;transform:translateY(10px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes zifchatPromptFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@media(max-width:480px){.zifchat-launcher-nudge{display:flex!important;min-width:0;max-width:calc(100vw - 105px)!important;font-size:12.5px!important;padding:12px 38px 12px 13px!important}.zifchat-launcher-nudge[hidden]{display:none!important}.zifchat-launcher-nudge:before{display:none}}
@media(prefers-reduced-motion:reduce){.zifchat-launcher-nudge{animation:none!important}}


/* v1.23 TEST RC5 — authoritative mobile proactive layout.
 * Explicit width prevents shrink-to-min-content collapse when long smart prompts wrap. */
@media(max-width:600px){
  .zifchat-widget{right:10px!important;left:auto!important;bottom:10px!important;max-width:calc(100vw - 20px)!important}
  .zifchat-launcher-nudge{
    box-sizing:border-box!important;
    right:74px!important;left:auto!important;bottom:7px!important;
    width:min(300px,calc(100vw - 104px))!important;
    min-width:min(220px,calc(100vw - 104px))!important;
    max-width:calc(100vw - 104px)!important;
    padding:12px 40px 12px 14px!important;
    display:flex!important;align-items:flex-start!important;gap:9px!important;
    white-space:normal!important;
    writing-mode:horizontal-tb!important;text-orientation:mixed!important;
    word-break:normal!important;overflow-wrap:normal!important;
  }
  .zifchat-launcher-nudge[hidden]{display:none!important}
  .zifchat-launcher-nudge span{
    display:block!important;flex:1 1 auto!important;min-width:0!important;width:auto!important;max-width:none!important;
    white-space:normal!important;writing-mode:horizontal-tb!important;text-orientation:mixed!important;
    word-break:normal!important;overflow-wrap:break-word!important;hyphens:none!important;
    line-height:1.4!important;text-align:left!important;
  }
  .zifchat-nudge-dismiss{right:8px!important;top:8px!important;flex:0 0 26px!important}
  .zifchat-launcher-nudge:before{display:grid!important}
}
@media(max-width:380px){
  .zifchat-launcher-nudge{width:calc(100vw - 96px)!important;min-width:0!important;right:70px!important;padding-left:12px!important;font-size:12px!important}
  .zifchat-launcher-nudge:before{display:none!important}
}

/* v1.25.0-test.28 — Feedback, Reviews & Support */
.zifchat-feedback-bar{display:flex;justify-content:center;gap:12px;padding:8px 12px;border-top:1px solid #edf2ef;background:#fff}.zifchat-feedback-bar button{appearance:none;border:0;background:transparent;color:#65756d;font:inherit;font-size:11px;cursor:pointer;text-decoration:underline;text-underline-offset:2px}.zifchat-feedback-bar button:hover{color:#176b42}.zifchat-feedback-modal[hidden]{display:none!important}.zifchat-feedback-modal{position:fixed;z-index:2147483647;inset:0;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(15,23,42,.48)}.zifchat-feedback-dialog{position:relative;box-sizing:border-box;width:min(430px,100%);max-height:min(720px,calc(100vh - 36px));overflow:auto;padding:24px;border-radius:18px;background:#fff;box-shadow:0 24px 80px rgba(15,23,42,.28);color:#263a31;font-family:inherit}.zifchat-feedback-x{position:absolute;right:12px;top:10px;width:34px;height:34px;border:0;border-radius:50%;background:#f1f5f3;color:#52635b;font-size:22px;cursor:pointer}.zifchat-feedback-kicker{font-size:10px;font-weight:800;letter-spacing:.12em;color:#17814f}.zifchat-feedback-content h3{margin:7px 0 6px;font-size:20px}.zifchat-feedback-content>p{margin:0 0 17px;color:#66776f;line-height:1.5}.zifchat-feedback-content label{display:block;margin:13px 0}.zifchat-feedback-content label>span{display:block;margin-bottom:6px;font-size:12px;font-weight:750}.zifchat-feedback-content textarea,.zifchat-feedback-content input,.zifchat-feedback-content select{box-sizing:border-box;width:100%;padding:10px 11px;border:1px solid #cad7d0;border-radius:10px;background:#fff;font:inherit;font-size:14px}.zifchat-feedback-content textarea{resize:vertical}.zifchat-feedback-content .zifchat-feedback-helpful{display:flex;align-items:center;gap:8px;font-size:13px}.zifchat-feedback-content .zifchat-feedback-helpful input{width:auto}.zifchat-stars{display:flex;gap:5px;margin:13px 0}.zifchat-stars button{border:0;background:transparent;color:#cbd5d0;font-size:30px;line-height:1;cursor:pointer;padding:2px}.zifchat-stars button.is-on{color:#e3a008}.zifchat-feedback-submit{width:100%;margin-top:6px;padding:11px 14px;border:0;border-radius:10px;background:#176b42;color:#fff;font-weight:800;cursor:pointer}.zifchat-feedback-submit:disabled{opacity:.6}.zifchat-feedback-status{min-height:18px;margin-top:9px;font-size:12px;color:#9a3412}.zifchat-feedback-status.is-success{color:#176b42}@media(max-width:520px){.zifchat-feedback-modal{align-items:flex-end;padding:10px}.zifchat-feedback-dialog{width:100%;max-height:82vh;border-radius:18px 18px 12px 12px}}

/* v1.25.0-test.33 — customer widget visual refinement.
 * Sizing/keyboard rules above remain authoritative. */
.zifchat-window{border-color:rgba(16,62,37,.11)!important;box-shadow:0 28px 82px rgba(13,39,25,.22)!important}
.zifchat-header{position:relative;padding:16px 17px!important;background:var(--zifchat-header,#075e54)!important}.zifchat-header:after{content:"";position:absolute;inset:auto 0 0;height:1px;background:rgba(255,255,255,.08)}
.zifchat-avatar{border:1px solid rgba(255,255,255,.16);box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}.zifchat-header-copy strong{font-size:15px!important;letter-spacing:-.01em}.zifchat-close{width:34px;height:34px;border-radius:10px!important;display:grid;place-items:center}.zifchat-close:hover{background:rgba(255,255,255,.10)}
.zifchat-body{background:linear-gradient(150deg,#f4f8f5,#eaf0ec)!important}.zifchat-message{border:1px solid #e3ebe6!important;box-shadow:0 5px 16px rgba(15,36,25,.055)!important}.zifchat-section-title{margin-top:17px!important;color:#64766d!important}.zifchat-agent{min-height:58px;padding:10px 11px!important;border-color:#dfe8e3!important;box-shadow:0 2px 7px rgba(15,36,25,.025)}.zifchat-agent:hover,.zifchat-agent.is-selected{transform:translateY(-1px);border-color:#83c9a0!important;background:#fbfffc!important;box-shadow:0 7px 18px rgba(24,124,71,.08)!important}.zifchat-agent-avatar{width:38px!important;height:38px!important;border-radius:12px!important}.zifchat-quick{min-height:34px;padding:7px 11px!important;border-color:#d7e3dc!important;background:rgba(255,255,255,.94)!important;font-weight:650}.zifchat-quick:hover{background:#f5fbf7!important}
.zifchat-compose{padding:10px 11px!important;border-top-color:#e6ece8!important}.zifchat-compose textarea{min-height:44px!important;border-color:#d6e1da!important;background:#fbfdfc!important}.zifchat-compose button{width:44px!important;height:44px!important;border-radius:13px!important;box-shadow:0 5px 14px rgba(37,211,102,.18)}.zifchat-powered{padding-top:2px!important;color:#98a39d!important}
.zifchat-ai-panel{background:#fff!important}.zifchat-ai-welcome{padding-bottom:13px!important}.zifchat-ai-msg{padding:10px 12px!important;border:1px solid transparent}.zifchat-ai-msg.assistant{background:#f4f7f5!important;border-color:#e6ece8!important}.zifchat-ai-msg.user{background:#e2f8e9!important;border-color:#ccefd7!important}.zifchat-ai-form{padding-top:11px!important}.zifchat-ai-input{border-color:#d4dfd8!important;background:#fbfdfc!important}.zifchat-ai-form button,.zifchat-ai-handoff{background:#176b42!important}.zifchat-ai-form button:hover,.zifchat-ai-handoff:hover{background:#105a36!important}
.zifchat-feedback-bar{padding:9px 12px!important;background:#fcfdfc!important}.zifchat-feedback-bar button{text-decoration:none!important;font-weight:650!important}.zifchat-feedback-bar button:hover{text-decoration:underline!important}.zifchat-feedback-modal{backdrop-filter:blur(4px)}.zifchat-feedback-dialog{padding:26px!important;border:1px solid #dce7e1;border-radius:22px!important;box-shadow:0 30px 90px rgba(12,37,24,.28)!important}.zifchat-feedback-content h3{font-size:22px!important;letter-spacing:-.025em}.zifchat-feedback-content textarea,.zifchat-feedback-content input,.zifchat-feedback-content select{min-height:44px!important;border-color:#cbd9d1!important;border-radius:11px!important}.zifchat-feedback-content textarea:focus,.zifchat-feedback-content input:focus,.zifchat-feedback-content select:focus{outline:0;border-color:#55a678!important;box-shadow:0 0 0 3px rgba(23,107,66,.10)!important}.zifchat-feedback-submit{min-height:44px!important;border-radius:11px!important;background:#176b42!important}.zifchat-feedback-submit:hover{background:#105a36!important}.zifchat-feedback-x{display:grid;place-items:center}
.zifchat-launcher{box-shadow:0 16px 38px rgba(15,42,27,.24)!important}.zifchat-launcher:active{transform:translateY(0) scale(.97)!important}
@media(max-width:600px){.zifchat-header{padding:13px 15px!important}.zifchat-feedback-dialog{padding:22px 19px!important}.zifchat-agent{min-height:56px}.zifchat-quick{min-height:36px}}
@media(prefers-reduced-motion:reduce){.zifchat-agent:hover{transform:none!important}.zifchat-launcher:active{transform:none!important}}
