/* Estbo Diaspora Agent — chat widget. Everything is scoped under #estbo-agent. */
#estbo-agent{--ea-blue:#1B04B4;--ea-ink:#0E0260;--ea-red:#FF0000;--ea-tint:#F3F2FC;--ea-line:#E4E1F5;
  position:fixed;bottom:20px;right:20px;z-index:99990;font-family:'Montserrat',system-ui,-apple-system,'Segoe UI',sans-serif;
  font-size:14.5px;line-height:1.55;color:#24213D;}
#estbo-agent.ea-left{right:auto;left:20px;}
#estbo-agent *,#estbo-agent *::before,#estbo-agent *::after{box-sizing:border-box;}
#estbo-agent button{font-family:inherit;}

/* launcher */
.ea-launch{display:flex;align-items:center;gap:10px;border:0;cursor:pointer;background:var(--ea-blue);color:#fff;
  height:58px;padding:0 20px 0 8px;border-radius:50px;box-shadow:0 12px 30px rgba(27,4,180,.35);font-weight:700;font-size:14.5px;
  transition:transform .2s,box-shadow .2s;}
.ea-launch:hover{transform:translateY(-2px);box-shadow:0 16px 36px rgba(27,4,180,.42);}
.ea-launch .ea-av{width:42px;height:42px;border-radius:50%;background:#fff;display:grid;place-items:center;flex:none;position:relative;}
.ea-launch .ea-av svg{width:22px;height:22px;fill:var(--ea-blue);}
.ea-launch .ea-av::after{content:"";position:absolute;right:1px;bottom:1px;width:11px;height:11px;border-radius:50%;background:#36E27B;border:2px solid var(--ea-blue);}
#estbo-agent.ea-open .ea-launch{display:none;}

/* panel */
.ea-panel{position:absolute;bottom:0;right:0;width:380px;height:min(620px,calc(100vh - 40px));background:#fff;border-radius:18px;
  box-shadow:0 24px 60px rgba(14,2,96,.28);display:none;flex-direction:column;overflow:hidden;border:1px solid var(--ea-line);}
#estbo-agent.ea-left .ea-panel{right:auto;left:0;}
#estbo-agent.ea-open .ea-panel{display:flex;animation:eaIn .22s ease-out;}
@keyframes eaIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

.ea-head{background:linear-gradient(135deg,var(--ea-blue),var(--ea-ink));color:#fff;padding:14px 14px 14px 16px;display:flex;align-items:center;gap:12px;flex:none;}
.ea-logo{width:44px;height:44px;border-radius:12px;background:#fff;display:grid;place-items:center;flex:none;overflow:hidden;}
.ea-logo img{width:38px;height:auto;display:block;}
.ea-logo svg{width:22px;height:22px;fill:var(--ea-blue);}
.ea-ht{flex:1;min-width:0;}
.ea-ht b{display:block;font-size:15px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ea-ht span{display:flex;align-items:center;gap:6px;font-size:12px;color:#D9D5FB;}
.ea-ht span i{width:7px;height:7px;border-radius:50%;background:#36E27B;display:block;flex:none;}
.ea-x{width:36px;height:36px;border-radius:10px;border:0;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;display:grid;place-items:center;flex:none;}
.ea-x:hover{background:rgba(255,255,255,.22);}
.ea-x svg{width:18px;height:18px;fill:currentColor;}

.ea-log{flex:1;overflow-y:auto;padding:16px 14px 8px;background:var(--ea-tint);display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain;}
.ea-msg{max-width:86%;padding:10px 13px;border-radius:14px;word-wrap:break-word;overflow-wrap:anywhere;white-space:normal;}
.ea-msg p{margin:0 0 8px;}
.ea-msg p:last-child{margin-bottom:0;}
.ea-msg ul,.ea-msg ol{margin:4px 0 8px;padding-left:20px;}
.ea-msg li{margin:2px 0;}
.ea-bot{align-self:flex-start;background:#fff;border:1px solid var(--ea-line);border-bottom-left-radius:4px;}
.ea-bot a{color:var(--ea-blue);font-weight:700;text-decoration:underline;}
.ea-me{align-self:flex-end;background:var(--ea-blue);color:#fff;border-bottom-right-radius:4px;}
.ea-me a{color:#fff;}
.ea-note{align-self:center;font-size:11.5px;color:#7A7799;text-align:center;padding:0 10px;}

.ea-typing{display:inline-flex;gap:4px;padding:4px 2px;}
.ea-typing i{width:7px;height:7px;border-radius:50%;background:#A9A4D8;display:block;animation:eaDot 1.1s infinite ease-in-out;}
.ea-typing i:nth-child(2){animation-delay:.15s}.ea-typing i:nth-child(3){animation-delay:.3s}
@keyframes eaDot{0%,80%,100%{transform:translateY(0);opacity:.5}40%{transform:translateY(-4px);opacity:1}}

.ea-sugs{display:flex;flex-wrap:wrap;gap:6px;padding:4px 0 2px;}
.ea-sug{border:1.5px solid var(--ea-blue);background:#fff;color:var(--ea-blue);font-weight:700;font-size:12.5px;padding:6px 11px;border-radius:50px;cursor:pointer;}
.ea-sug:hover{background:var(--ea-blue);color:#fff;}

.ea-form{display:flex;gap:8px;align-items:flex-end;padding:10px 12px;border-top:1px solid var(--ea-line);background:#fff;flex:none;}
.ea-in{flex:1;resize:none;border:1.5px solid var(--ea-line);border-radius:12px;padding:10px 12px;font:inherit;font-size:16px;line-height:1.4;
  max-height:110px;min-height:44px;color:#24213D;background:#fff;outline:none;}
.ea-in:focus{border-color:var(--ea-blue);}
.ea-send{width:44px;height:44px;border-radius:12px;border:0;background:var(--ea-red);color:#fff;cursor:pointer;display:grid;place-items:center;flex:none;}
.ea-send:disabled{background:#C9C6DE;cursor:not-allowed;}
.ea-send svg{width:20px;height:20px;fill:currentColor;}

.ea-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px 10px;background:#fff;font-size:11.5px;color:#7A7799;flex:none;}
.ea-wa{display:inline-flex;align-items:center;gap:6px;color:#128C3E !important;font-weight:700;text-decoration:none !important;font-size:12.5px;}
.ea-wa svg{width:16px;height:16px;fill:#25D366;}

#estbo-agent button:focus-visible,#estbo-agent a:focus-visible{outline:3px solid var(--ea-red);outline-offset:2px;}

@media (max-width:600px){
  #estbo-agent{bottom:14px;right:14px;}
  #estbo-agent.ea-left{left:14px;}
  .ea-launch{height:54px;padding:0 8px;}
  .ea-launch .ea-lbl{display:none;}
  .ea-launch .ea-av{width:40px;height:40px;}
  #estbo-agent.ea-open{top:0;left:0;right:0;bottom:0;}
  #estbo-agent.ea-open .ea-panel{position:fixed;inset:0;width:100%;height:100%;border-radius:0;border:0;}
}
@media (prefers-reduced-motion:reduce){
  .ea-launch,#estbo-agent.ea-open .ea-panel,.ea-typing i{animation:none;transition:none;}
}
