/* Whole Earth Assistant */
.weg-asst{--weg-green:#36604e;--weg-green-dark:#2a4c3d;--weg-sage:#b1c2a0;--weg-cream:#f7f5ef;--weg-brass:#e2ae58;--weg-ink:#242323;--weg-radius:16px;font-family:var(--wh-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);color:var(--weg-ink);font-size:15px;line-height:1.5;box-sizing:border-box}
.weg-asst *,.weg-asst *::before,.weg-asst *::after{box-sizing:inherit}

/* launcher */
.weg-asst--bubble{position:fixed;right:22px;bottom:22px;z-index:99990}
.weg-asst-launcher{display:flex;align-items:center;gap:8px;background:var(--weg-green);color:#fff;border:0;border-radius:999px;padding:12px 18px 12px 14px;font:inherit;font-weight:600;cursor:pointer;box-shadow:0 8px 24px rgba(36,35,35,.22);transition:transform .15s ease,background .15s ease}
.weg-asst-launcher:hover{background:var(--weg-green-dark);transform:translateY(-1px)}
.weg-asst--open .weg-asst-launcher{display:none}
@media (max-width:991px){.weg-asst--desktop-only{display:none!important}}

/* panel */
.weg-asst-panel{display:none;flex-direction:column;background:#fff;border-radius:var(--weg-radius);box-shadow:0 18px 48px rgba(36,35,35,.28);overflow:hidden;border:1px solid rgba(54,96,78,.18)}
.weg-asst--bubble .weg-asst-panel{width:390px;max-width:calc(100vw - 32px);height:600px;max-height:calc(100vh - 44px)}
.weg-asst--bubble.weg-asst--open .weg-asst-panel{display:flex;animation:weg-asst-in .18s ease-out}
.weg-asst--page .weg-asst-panel{display:flex;height:70vh;min-height:520px;max-width:820px;margin:0 auto}
@keyframes weg-asst-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

.weg-asst-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;background:linear-gradient(135deg,var(--weg-green),var(--weg-green-dark));color:#fff}
.weg-asst-title{font-weight:700;font-size:16px;display:flex;align-items:center;gap:8px}
.weg-asst-dot{width:9px;height:9px;border-radius:50%;background:var(--weg-brass);box-shadow:0 0 0 3px rgba(226,174,88,.28)}
.weg-asst-head-actions{display:flex;align-items:center;gap:6px}
.weg-asst-head button,.weg-asst-head a{background:transparent;border:0;color:#fff;font:inherit;cursor:pointer;opacity:.85;text-decoration:none;padding:4px 8px;border-radius:8px}
.weg-asst-head button:hover,.weg-asst-head a:hover{opacity:1;background:rgba(255,255,255,.12)}
.weg-asst-close{font-size:24px;line-height:1}
.weg-asst-expand{font-size:16px}
.weg-asst-reset{font-size:13px}

.weg-asst-log{flex:1;overflow-y:auto;padding:16px;background:var(--weg-cream);display:flex;flex-direction:column;gap:10px}
.weg-asst-msg{display:flex}
.weg-asst-msg--user{justify-content:flex-end}
.weg-asst-bubble{max-width:86%;padding:10px 14px;border-radius:14px;background:#fff;border:1px solid rgba(54,96,78,.14);box-shadow:0 1px 2px rgba(0,0,0,.04)}
.weg-asst-msg--user .weg-asst-bubble{background:var(--weg-green);color:#fff;border-color:transparent;border-bottom-right-radius:4px}
.weg-asst-msg--assistant .weg-asst-bubble{border-bottom-left-radius:4px}
.weg-asst-bubble p{margin:0 0 8px;font:inherit;color:inherit}
.weg-asst-bubble p:last-child{margin-bottom:0}
.weg-asst-bubble ul{margin:4px 0 8px 18px;padding:0}
.weg-asst-bubble li{margin:2px 0}
.weg-asst-bubble a{color:var(--weg-green);text-decoration:underline;text-underline-offset:2px;font-weight:600}
.weg-asst-msg--user .weg-asst-bubble a{color:#fff}
.weg-asst-typing{display:inline-flex;gap:4px;padding:12px 14px;background:#fff;border-radius:14px;border:1px solid rgba(54,96,78,.14);width:max-content}
.weg-asst-typing span{width:7px;height:7px;border-radius:50%;background:var(--weg-sage);animation:weg-asst-blink 1.1s infinite}
.weg-asst-typing span:nth-child(2){animation-delay:.18s}.weg-asst-typing span:nth-child(3){animation-delay:.36s}
@keyframes weg-asst-blink{0%,80%,100%{opacity:.3}40%{opacity:1}}

.weg-asst-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;border-top:1px solid rgba(54,96,78,.14);background:#fff}
.weg-asst .weg-asst-input{flex:1;resize:none;border:1px solid rgba(54,96,78,.3);border-radius:12px;padding:10px 12px;margin:0;font:inherit;font-size:15px;line-height:1.4;height:42px;min-height:42px;max-height:120px;background:#fff;color:var(--weg-ink);box-shadow:none;width:auto}
.weg-asst-input:focus{outline:none;border-color:var(--weg-green);box-shadow:0 0 0 3px rgba(54,96,78,.15)}
.weg-asst-send{width:42px;height:42px;border:0;border-radius:12px;background:var(--weg-green);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex:none}
.weg-asst-send:hover{background:var(--weg-green-dark)}
.weg-asst--busy .weg-asst-send{opacity:.5;cursor:default}
.weg-asst-foot{padding:6px 14px 10px;font-size:11.5px;color:#6b6b6b;background:#fff;text-align:center}
.weg-asst-reset--link{background:none;border:0;color:var(--weg-green);font:inherit;cursor:pointer;text-decoration:underline;padding:0;margin-left:6px}

/* live chat */
.weg-asst-dot--live{background:#4cd964;box-shadow:0 0 0 3px rgba(76,217,100,.28)}
.weg-asst-msg--agent{flex-direction:column;align-items:flex-start}
.weg-asst-msg--agent .weg-asst-bubble{background:#e7efe9;border-color:rgba(54,96,78,.25);border-bottom-left-radius:4px}
.weg-asst-who{font-size:11px;color:#5a6b60;margin:0 0 2px 6px;font-weight:600}
.weg-asst-msg--system{justify-content:center}
.weg-asst-sys{font-size:12px;color:#6b6b6b;background:rgba(54,96,78,.08);border-radius:999px;padding:3px 12px;text-align:center}
.weg-asst--live .weg-asst-head{background:linear-gradient(135deg,#2a4c3d,#1f3a2e)}

/* quick-reply buttons */
.weg-asst-buttons{display:flex;flex-wrap:wrap;gap:8px;padding:2px 0 4px 4px}
.weg-asst .weg-asst-btn{font:inherit;font-size:14px;font-weight:600;padding:8px 14px;border-radius:999px;border:1.5px solid var(--weg-green);background:#fff;color:var(--weg-green);cursor:pointer;line-height:1.2}
.weg-asst .weg-asst-btn--primary{background:var(--weg-green);color:#fff}
.weg-asst .weg-asst-btn:hover{filter:brightness(1.08)}

/* narrow phones: keep the window title and Clear chat on one line each */
@media (max-width:420px){
  .weg-asst-title{font-size:15px;white-space:nowrap}
  .weg-asst-head button,.weg-asst-head a{white-space:nowrap;padding:4px 6px}
  .weg-asst-reset{font-size:12.5px}
}
