/* EltaChat widget — floating live chat */
#eltachat,#eltachat *{box-sizing:border-box}
#eltachat{position:fixed;right:20px;bottom:20px;z-index:2147483000;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial,sans-serif}
#eltachat .ec-bubble{width:60px;height:60px;border-radius:50%;background:var(--ec-color,#2b35d6);color:#fff;border:none;cursor:pointer;
  box-shadow:0 8px 24px rgba(15,26,43,.28);display:flex;align-items:center;justify-content:center;transition:transform .15s ease,box-shadow .15s ease}
#eltachat .ec-bubble:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(15,26,43,.34)}
#eltachat .ec-bubble svg{width:28px;height:28px;fill:#fff}
#eltachat .ec-badge{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;border-radius:10px;background:#e4252b;color:#fff;
  font-size:12px;font-weight:700;display:none;align-items:center;justify-content:center;padding:0 5px;border:2px solid #fff}

#eltachat .ec-panel{position:absolute;right:0;bottom:76px;width:360px;max-width:calc(100vw - 32px);height:520px;max-height:calc(100vh - 120px);
  background:#fff;border-radius:16px;box-shadow:0 20px 60px rgba(15,26,43,.28);display:none;flex-direction:column;overflow:hidden}
#eltachat.ec-open .ec-panel{display:flex;animation:ecpop .18s ease}
@keyframes ecpop{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

#eltachat .ec-head{background:var(--ec-color,#2b35d6);color:#fff;padding:16px 18px;display:flex;align-items:center;gap:10px}
#eltachat .ec-head .ec-dot{width:9px;height:9px;border-radius:50%;background:#4ade80;box-shadow:0 0 0 3px rgba(74,222,128,.25)}
#eltachat .ec-head h4{margin:0;font-size:15px;font-weight:700;line-height:1.2}
#eltachat .ec-head p{margin:1px 0 0;font-size:12px;opacity:.85}
#eltachat .ec-head .ec-x{margin-left:auto;background:none;border:none;color:#fff;font-size:22px;cursor:pointer;line-height:1;opacity:.85}
#eltachat .ec-head .ec-x:hover{opacity:1}

#eltachat .ec-body{flex:1;overflow-y:auto;padding:16px;background:#f6f8fc;display:flex;flex-direction:column;gap:8px}
#eltachat .ec-msg{max-width:80%;padding:9px 13px;border-radius:14px;font-size:14px;line-height:1.45;word-wrap:break-word;white-space:pre-wrap}
#eltachat .ec-msg.ec-visitor{align-self:flex-end;background:var(--ec-color,#2b35d6);color:#fff;border-bottom-right-radius:4px}
#eltachat .ec-msg.ec-agent{align-self:flex-start;background:#fff;color:#0f1a2b;border:1px solid #e9eef5;border-bottom-left-radius:4px}
#eltachat .ec-msg.ec-system{align-self:center;background:#e8edf6;color:#52607a;font-size:12.5px;text-align:center;max-width:92%}
#eltachat .ec-time{font-size:10px;opacity:.6;margin-top:3px;display:block}

#eltachat .ec-intro{padding:14px 16px}
#eltachat .ec-intro label{display:block;font-size:12.5px;color:#52607a;margin:8px 0 4px}
#eltachat .ec-intro input{width:100%;padding:9px 11px;border:1px solid #d9e1ec;border-radius:9px;font-size:14px}
#eltachat .ec-intro input:focus{outline:none;border-color:var(--ec-color,#2b35d6)}

#eltachat .ec-foot{border-top:1px solid #eef2f8;padding:10px;display:flex;gap:8px;background:#fff}
#eltachat .ec-foot textarea{flex:1;resize:none;border:1px solid #d9e1ec;border-radius:10px;padding:9px 11px;font-size:14px;max-height:90px;font-family:inherit}
#eltachat .ec-foot textarea:focus{outline:none;border-color:var(--ec-color,#2b35d6)}
#eltachat .ec-send{background:var(--ec-color,#2b35d6);border:none;color:#fff;width:40px;border-radius:10px;cursor:pointer;flex:0 0 40px;display:flex;align-items:center;justify-content:center}
#eltachat .ec-send:disabled{opacity:.5;cursor:default}
#eltachat .ec-send svg{width:18px;height:18px;fill:#fff}
#eltachat .ec-powered{text-align:center;font-size:10.5px;color:#9aa6bd;padding:4px 0 8px;background:#fff}

@media(max-width:480px){
  #eltachat{right:12px;bottom:12px}
  #eltachat .ec-panel{right:0;bottom:72px;width:calc(100vw - 24px);height:calc(100vh - 100px)}
}

/* --- polish: teaser, typing, intro --- */
#eltachat .ec-teaser{position:absolute;right:0;bottom:76px;max-width:240px;background:#fff;color:#0f1a2b;font-size:13.5px;line-height:1.4;
  padding:12px 14px;border-radius:14px;border-bottom-right-radius:4px;box-shadow:0 12px 34px rgba(15,26,43,.22);cursor:pointer;animation:ecpop .2s ease}
#eltachat .ec-introtitle{margin:2px 0 6px;color:#0f1a2b;font-weight:600;font-size:15px}
#eltachat .ec-start{width:100%;height:42px;margin-top:14px;border-radius:10px;font-weight:600;font-size:14px}
#eltachat .ec-msg.ec-typing{display:flex;gap:4px;align-items:center;padding:12px 14px}
#eltachat .ec-msg.ec-typing span{width:7px;height:7px;border-radius:50%;background:#9aa6bd;display:inline-block;animation:ecblink 1.2s infinite both}
#eltachat .ec-msg.ec-typing span:nth-child(2){animation-delay:.2s}
#eltachat .ec-msg.ec-typing span:nth-child(3){animation-delay:.4s}
@keyframes ecblink{0%,80%,100%{opacity:.25}40%{opacity:1}}

/* file attach button in composer */
#eltachat .ec-attach{background:none;border:none;cursor:pointer;font-size:18px;padding:0 6px;line-height:1;align-self:center;opacity:.75}
#eltachat .ec-attach:hover{opacity:1}
#eltachat .ec-msg img{margin-top:2px}
