/* ecreative chat widget */
.ecw-launch{position:fixed;right:20px;bottom:calc(20px + env(safe-area-inset-bottom));z-index:40;display:inline-flex;align-items:center;gap:10px;min-height:56px;padding:0 22px 0 18px;border:0;border-radius:999px;background:var(--brand,#15803D);color:#fff;font:600 1rem/1 var(--body,system-ui,sans-serif);box-shadow:0 10px 30px -8px rgba(20,22,31,.45);cursor:pointer;transition:transform .2s ease,background .2s ease,bottom .25s ease}
.ecw-launch:hover{background:var(--brand-dk,#116932)}
.ecw-launch:focus-visible{outline:3px solid rgba(21,128,61,.45);outline-offset:3px}
.ecw-launch svg{width:22px;height:22px;flex:none}
body:has(.mobile-bar:not(.is-hidden)) .ecw-launch{bottom:calc(96px + env(safe-area-inset-bottom))}
@media(min-width:900px){body:has(.mobile-bar:not(.is-hidden)) .ecw-launch{bottom:24px}.ecw-launch{right:24px;bottom:24px}}
.ecw-open .ecw-launch{transform:scale(0);pointer-events:none}

.ecw-panel{position:fixed;z-index:45;right:24px;bottom:24px;width:380px;height:min(600px,calc(100vh - 48px));display:flex;flex-direction:column;background:#fff;border:1px solid var(--line,#E2E0D9);border-radius:16px;box-shadow:0 24px 60px -16px rgba(20,22,31,.35);overflow:hidden;font-family:var(--body,system-ui,sans-serif);color:var(--ink,#14161F);opacity:0;transform:translateY(16px);pointer-events:none;visibility:hidden;transition:opacity .2s ease,transform .2s ease,visibility 0s .2s}
.ecw-open .ecw-panel{opacity:1;transform:none;pointer-events:auto;visibility:visible;transition:opacity .2s ease,transform .2s ease}
@media(max-width:600px){.ecw-panel{left:0;right:0;bottom:0;width:auto;height:min(82vh,640px);height:min(82dvh,640px);border-radius:16px 16px 0 0;border-bottom:0}}

.ecw-head{display:flex;align-items:center;gap:12px;padding:12px 8px 12px 18px;background:var(--ink,#14161F);color:#fff}
.ecw-head-txt{flex:1;min-width:0}
.ecw-title{margin:0;font:700 1.0625rem/1.2 var(--head,system-ui,sans-serif)}
.ecw-sub{margin:2px 0 0;font-size:.8125rem;color:#C9CDD6}
.ecw-dot{width:10px;height:10px;border-radius:50%;background:var(--mint,#4ADE80);flex:none}
.ecw-close{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;border-radius:10px;background:transparent;color:#fff;cursor:pointer}
.ecw-close:hover{background:rgba(255,255,255,.12)}
.ecw-close:focus-visible{outline:3px solid var(--mint,#4ADE80);outline-offset:-3px}
.ecw-close svg{width:22px;height:22px}

.ecw-log{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:var(--paper,#F7F6F2);overscroll-behavior:contain}
.ecw-msg{max-width:86%;padding:10px 14px;border-radius:14px;font-size:.9375rem;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}
.ecw-bot{align-self:flex-start;background:#fff;border:1px solid var(--line,#E2E0D9);border-bottom-left-radius:4px}
.ecw-user{align-self:flex-end;background:var(--brand,#15803D);color:#fff;border-bottom-right-radius:4px}
.ecw-err{align-self:flex-start;background:#FCEBC6;color:#5C3B00;font-weight:500}
.ecw-typing{align-self:flex-start;display:flex;gap:5px;padding:14px 16px;background:#fff;border:1px solid var(--line,#E2E0D9);border-radius:14px;border-bottom-left-radius:4px}
.ecw-typing span{width:7px;height:7px;border-radius:50%;background:#8A919C;animation:ecw-b 1s infinite ease-in-out}
.ecw-typing span:nth-child(2){animation-delay:.15s}.ecw-typing span:nth-child(3){animation-delay:.3s}
@keyframes ecw-b{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.ecw-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:2px}
.ecw-chip{min-height:44px;padding:8px 14px;border:1px solid var(--brand,#15803D);border-radius:999px;background:#fff;color:var(--brand-dk,#116932);font:600 .875rem/1.2 var(--body,system-ui,sans-serif);cursor:pointer;text-align:left}
.ecw-chip:hover{background:var(--tint,#E9F6EE)}

.ecw-foot{border-top:1px solid var(--line,#E2E0D9);padding:10px 12px calc(8px + env(safe-area-inset-bottom));background:#fff}
.ecw-form{display:flex;gap:8px;align-items:flex-end}
.ecw-input{flex:1;min-height:44px;max-height:120px;padding:10px 14px;border:1px solid #8A919C;border-radius:12px;font:inherit;font-size:1rem;resize:none;color:var(--ink,#14161F);background:#fff}
.ecw-input:focus{outline:3px solid rgba(21,128,61,.35);outline-offset:1px}
.ecw-send{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border:0;border-radius:12px;background:var(--brand,#15803D);color:#fff;cursor:pointer}
.ecw-send:hover{background:var(--brand-dk,#116932)}
.ecw-send:disabled{opacity:.5;cursor:default}
.ecw-send svg{width:20px;height:20px}
.ecw-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:4px;font-size:.8125rem;color:var(--muted,#4B5563)}
.ecw-meta a{display:inline-flex;align-items:center;min-height:44px;font-weight:600;color:var(--brand-dk,#116932)}
.sr-only-ecw{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media(prefers-reduced-motion:reduce){.ecw-launch,.ecw-panel{transition:none}.ecw-typing span{animation:none}}
