:root{--edo-primary:#1E3A8A}
#edo-chat-root,#edo-chat-root-shortcode{font-family:Arial,sans-serif}
.edo-btn{position:fixed;bottom:20px;right:20px;width:60px;height:60px;border-radius:50%;background:var(--edo-primary);color:#fff;border:none;font-size:26px;cursor:pointer;z-index:2147483647;box-shadow:0 4px 20px rgba(0,0,0,.3);display:flex;align-items:center;justify-content:center;overflow:hidden;padding:0}
.edo-btn img{width:100%;height:100%;object-fit:cover}

/* v1.4 FIX 1: Rectangular teaser popup above the bubble - like AI Engine Image 1 */
.edo-teaser{position:fixed;bottom:90px;right:20px;width:300px;max-width:88vw;background:var(--edo-primary);color:#fff;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.28);display:flex;gap:10px;align-items:center;padding:12px 14px;cursor:pointer;z-index:2147483647}
.edo-teaser img{width:40px;height:40px;border-radius:50%;object-fit:cover;background:#fff;flex-shrink:0;border:2px solid rgba(255,255,255,.9)}
.edo-teaser .edo-teaser-text{line-height:1.25;min-width:0;flex:1}
.edo-teaser .edo-teaser-title{font-size:15px;font-weight:800;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.edo-teaser .edo-teaser-sub{font-size:12.5px;opacity:.92;display:block;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.edo-teaser .edo-teaser-close{background:rgba(255,255,255,.18);border:none;color:#fff;width:26px;height:26px;border-radius:50%;cursor:pointer;font-size:15px;line-height:1;flex-shrink:0}
.edo-teaser.hidden{display:none}

.edo-box{position:fixed;bottom:90px;right:20px;width:370px;max-width:92vw;height:var(--edo-chat-height,70vh);max-height:var(--edo-chat-height,70vh);background:#fff;border-radius:16px;box-shadow:0 10px 40px rgba(0,0,0,.25);display:none;flex-direction:column;overflow:hidden;z-index:2147483647}
.edo-box.open{display:flex}
/* FIX 1: AI Engine style - ONE rectangular header with logo + text, picked from Settings form */
.edo-head{background:var(--edo-primary);color:#fff;padding:14px 16px;font-weight:700;display:flex;gap:12px;align-items:center;border-radius:16px 16px 0 0}
.edo-head img{width:46px;height:46px;border-radius:50%;object-fit:cover;background:#fff;flex-shrink:0;border:2px solid rgba(255,255,255,.9)}
.edo-head .edo-head-text{line-height:1.25;min-width:0}
.edo-head .edo-head-title{font-size:16px;font-weight:800;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.edo-head .edo-head-sub{font-size:12.5px;font-weight:400;opacity:.92;display:block;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.edo-head .edo-close{margin-left:auto;background:rgba(255,255,255,.18);border:none;color:#fff;width:28px;height:28px;border-radius:50%;cursor:pointer;font-size:16px;line-height:1;flex-shrink:0}
.edo-msgs{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px;background:#f1f5f9}
.edo-msg-row{display:flex;gap:8px;align-items:flex-end}
.edo-msg-row.user{justify-content:flex-end}
.edo-msg-row img{width:28px;height:28px;border-radius:50%;object-fit:cover;flex-shrink:0}
.edo-msg{max-width:82%;padding:10px 12px;border-radius:12px;font-size:14px;line-height:1.45}
.edo-msg.bot{background:#fff;border:1px solid #e2e8f0}
.edo-msg.user{background:var(--edo-primary);color:#fff}
.edo-thinking{display:inline-flex;gap:4px;align-items:center}
.edo-thinking i{width:7px;height:7px;background:#94a3b8;border-radius:50%;display:inline-block;animation:edoBlink 1s infinite}
.edo-thinking i:nth-child(2){animation-delay:.18s}.edo-thinking i:nth-child(3){animation-delay:.36s}
@keyframes edoBlink{0%,100%{opacity:.3;transform:translateY(0)}50%{opacity:1;transform:translateY(-3px)}}
.edo-cursor{display:inline-block;width:2px;height:14px;background:#0f172a;vertical-align:-2px;margin-left:1px;animation:edoBlink 0.8s infinite}
.edo-row{display:flex;border-top:1px solid #e2e8f0}
.edo-input{flex:1;border:none;padding:12px;outline:none;font-size:14px}
.edo-send{background:var(--edo-primary);color:#fff;border:none;padding:0 18px;cursor:pointer;font-weight:700}
.edo-quick{display:flex;flex-wrap:wrap;gap:6px;padding:8px;background:#fff;border-top:1px solid #e2e8f0}
.edo-quick button{background:var(--edo-primary);color:#fff;border:1px solid var(--edo-primary);border-radius:20px;padding:6px 11px;font-size:12px;cursor:pointer;font-weight:600}
.edo-quick button:hover{opacity:.88}


/* v1.6 ANIMATIONS - Bubble, Teaser, Chat Box */
@keyframes edoBubbleIn{0%{transform:scale(0);opacity:0}60%{transform:scale(1.15);opacity:1}100%{transform:scale(1);opacity:1}}
@keyframes edoBubblePulse{0%{box-shadow:0 4px 20px rgba(0,0,0,.3),0 0 0 0 rgba(30,58,138,.45)}70%{box-shadow:0 4px 20px rgba(0,0,0,.3),0 0 0 14px rgba(30,58,138,0)}100%{box-shadow:0 4px 20px rgba(0,0,0,.3),0 0 0 0 rgba(30,58,138,0)}}
@keyframes edoTeaserIn{0%{transform:translateY(20px) scale(.95);opacity:0}100%{transform:translateY(0) scale(1);opacity:1}}
@keyframes edoChatOpen{0%{transform:translateY(24px) scale(.94);opacity:0}100%{transform:translateY(0) scale(1);opacity:1}}
@keyframes edoFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
/* Circular bubble: pops in on load, gentle pulse ring, grows on hover */
.edo-btn{animation:edoBubbleIn .5s cubic-bezier(.34,1.56,.64,1) both, edoBubblePulse 2.4s ease-out 1.2s infinite;transition:transform .2s ease}
.edo-btn:hover{transform:scale(1.1) rotate(4deg)}
.edo-btn:active{transform:scale(.94)}
/* Rectangular teaser: slides + fades up when it appears after 3s, then gentle float */
.edo-teaser{transform:translateY(20px) scale(.95);opacity:0;transition:transform .45s cubic-bezier(.22,1,.36,1),opacity .45s ease;pointer-events:none}
.edo-teaser.show{animation:edoTeaserIn .45s cubic-bezier(.22,1,.36,1) both, edoFloat 3s ease-in-out 1s infinite;opacity:1;pointer-events:auto}
.edo-teaser.hidden{opacity:0;pointer-events:none}
/* Chat box: scales + slides up + fades in when clicked to open */
.edo-box{transform:translateY(24px) scale(.94);opacity:0;transition:transform .35s cubic-bezier(.22,1,.36,1),opacity .3s ease}
.edo-box.open{display:flex;animation:edoChatOpen .35s cubic-bezier(.22,1,.36,1) both}
/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion:reduce){
  .edo-btn,.edo-teaser,.edo-box{animation:none!important;transition:none!important}
}

/* v1.8: Links in bot replies are clickable */
.edo-msg.bot a{color:var(--edo-primary);font-weight:700;text-decoration:underline;word-break:break-all}
.edo-msg.bot a:hover{opacity:.8}
.edo-msg.user a{color:#fff;text-decoration:underline;word-break:break-all}

/* v1.9: Clear Chat button */
.edo-clear{background:rgba(255,255,255,.18);border:none;color:#fff;font-size:11px;padding:5px 9px;border-radius:20px;cursor:pointer;flex-shrink:0}
.edo-clear:hover{background:rgba(255,255,255,.32)}

/* v1.11: Pre-chat form (name + email) + no Clear button */
.edo-prechat{position:absolute;inset:0;background:rgba(241,245,249,.98);z-index:5;display:flex;align-items:center;justify-content:center;padding:16px}
.edo-prechat.hidden{display:none}
.edo-prechat-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px;width:100%;max-width:300px;box-shadow:0 8px 30px rgba(0,0,0,.12)}
.edo-prechat-title{font-size:17px;font-weight:800;color:#0f172a;margin-bottom:6px}
.edo-prechat-sub{font-size:13px;color:#475569;line-height:1.45;margin:0 0 12px}
.edo-prechat label{display:block;font-size:12px;font-weight:700;color:#334155;margin:10px 0 4px}
.edo-prechat input{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:10px;padding:10px 12px;font-size:14px;outline:none}
.edo-prechat input:focus{border-color:var(--edo-primary);box-shadow:0 0 0 2px rgba(30,58,138,.15)}
.edo-pre-error{color:#dc2626;font-size:12px;min-height:16px;margin-top:8px}
.edo-pre-start{width:100%;background:var(--edo-primary);color:#fff;border:none;border-radius:10px;padding:11px;font-size:14px;font-weight:700;cursor:pointer;margin-top:6px}
.edo-pre-start:hover{opacity:.92}
