.ceimp-av-root{--av-navy:#0d2d52;--av-turq:#13a7b8;--av-ink:#162d42;position:fixed;right:clamp(12px,2.2vw,28px);bottom:clamp(14px,2.2vw,28px);z-index:99990;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;line-height:1.5;color:var(--av-ink)}
.ceimp-av-root *{box-sizing:border-box}
.ceimp-av-launch{display:flex;align-items:center;gap:9px;border:1px solid #d6eaf0;background:white;color:var(--av-navy);box-shadow:0 12px 35px #0d2d5233;border-radius:100px;padding:5px 16px 5px 5px;font:700 14px system-ui;cursor:pointer;min-height:58px;transition:transform .18s ease,box-shadow .18s ease}
.ceimp-av-launch:hover{transform:translateY(-3px);box-shadow:0 16px 35px #0d2d5244}
.ceimp-av-launch img{height:52px;width:52px;object-fit:contain;object-position:center top;background:#eef8fa;border-radius:50%}
.ceimp-av-panel[hidden]{display:none!important}
.ceimp-av-panel{width:min(380px,calc(100vw - 24px));height:min(545px,calc(100dvh - 115px));display:flex;flex-direction:column;overflow:hidden;position:absolute;right:0;bottom:76px;background:white;color:var(--av-ink);border-radius:20px;border:1px solid #dce8ee;box-shadow:0 22px 65px #062b4b55}
.ceimp-av-header{display:flex;align-items:center;gap:11px;background:var(--av-navy);color:white;padding:12px 14px;flex-shrink:0}
.ceimp-av-header>div:nth-child(2){flex:1;min-width:0}.ceimp-av-header strong{display:block;font-size:15px;color:white}.ceimp-av-header small{display:block;font-size:11px;color:#d1eaf0}
.ceimp-av-avatar{width:47px;height:47px;border-radius:14px;background:#f0fbfd;overflow:hidden;flex-shrink:0}.ceimp-av-avatar img{width:100%;height:100%;object-fit:cover;object-position:top}
.ceimp-av-close{height:38px;width:38px;background:#ffffff18;border:1px solid #ffffff30;color:white;font-size:26px;line-height:1;border-radius:12px;cursor:pointer}
.ceimp-av-messages{flex:1;min-height:80px;overflow-y:auto;overscroll-behavior:contain;padding:16px;background:linear-gradient(#f7fbfd,#f1f8fa);display:flex;flex-direction:column;align-items:flex-start;gap:12px}
.ceimp-av-bubble{font-size:13px;line-height:1.55;max-width:92%;padding:11px 13px;margin:0!important;border-radius:13px 13px 13px 3px;background:#fff;border:1px solid #e1edf1;color:var(--av-ink);white-space:pre-line}
.ceimp-av-bubble.ceimp-av-user{align-self:flex-end;background:#d9f6f5;border-color:#caeae8;border-radius:13px 13px 3px 13px}
.ceimp-av-chips{display:flex;gap:7px;overflow-x:auto;padding:10px 12px;flex-shrink:0;border-top:1px solid #eaf0f4;scrollbar-width:thin}
.ceimp-av-chips button{flex-shrink:0;border-radius:20px;padding:7px 10px;background:#f0f8fa;border:1px solid #cde8ee;color:#0e4865;font:600 11px system-ui;cursor:pointer;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ceimp-av-form{display:flex;gap:7px;padding:10px 12px;flex-shrink:0}.ceimp-av-form input{flex:1;min-width:0;padding:10px 12px;height:42px;border:1px solid #cbdde5;border-radius:10px;background:white;color:var(--av-ink);font:13px system-ui}.ceimp-av-form button{border:0;padding:0 12px;background:var(--av-turq);color:#fff;font-weight:700;border-radius:10px;cursor:pointer}
.ceimp-av-footer{border-top:1px solid #edf1f4;padding:9px 12px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0}.ceimp-av-footer span{font-size:10px;max-width:180px;color:#617384}.ceimp-av-footer a{font-weight:700;color:#087b64;font-size:12px;text-decoration:none}
.ceimp-av-root :is(button,input,a):focus-visible{outline:3px solid #15b8cd;outline-offset:2px}
.ceimp-av-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:520px){.ceimp-av-root{right:12px;bottom:calc(14px + env(safe-area-inset-bottom))}.ceimp-av-panel{height:min(570px,calc(100dvh - 110px))}.ceimp-av-launch span{font-size:12px}}
@media(prefers-reduced-motion:reduce){.ceimp-av-launch{transition:none}.ceimp-av-launch:hover{transform:none}}
/* Integración opcional con CEIMP Cotizaciones 1.1 */
.ceimp-av-quick{padding:11px 12px 9px;background:#fff;border-top:1px solid #e9eff2;flex-shrink:0}
.ceimp-av-quick[hidden]{display:none!important}
.ceimp-av-quick>strong{display:block;font-size:12px;margin-bottom:7px;color:#16384e}
.ceimp-av-services{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:9px}
.ceimp-av-services button{font:600 11px system-ui;background:#f0f7fa;color:#17455b;border:1px solid #d4e6eb;border-radius:14px;padding:7px 9px;cursor:pointer;min-height:32px}
.ceimp-av-services button[aria-pressed="true"]{background:#0c7084;color:#fff;border-color:#0c7084}
.ceimp-av-quote{display:block;text-align:center;background:#0d6c7d;color:#fff!important;font-weight:700;font-size:13px;text-decoration:none;border-radius:10px;padding:11px 12px;min-height:42px}
.ceimp-av-quote:hover{background:#095666}
@media(max-width:520px){.ceimp-av-panel{height:min(650px,calc(100dvh - 108px))}.ceimp-av-quick{padding:9px 11px}.ceimp-av-services button{min-height:38px}}

/* CEIMP 1.2: evitar superposición con WhatsApp, independiente del tema. */
.ceimp-av-root{bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;right:clamp(12px,2.2vw,28px)!important}
.ceimp-av-panel{height:min(545px,calc(100dvh - 205px));max-height:calc(100dvh - 205px)}
@media(max-width:520px){
 .ceimp-av-root{bottom:calc(87px + env(safe-area-inset-bottom,0px))!important;right:12px!important}
 .ceimp-av-panel{height:min(570px,calc(100dvh - 185px));max-height:calc(100dvh - 185px)}
}
@media(max-height:480px){.ceimp-av-panel{height:calc(100dvh - 160px);max-height:calc(100dvh - 160px)}}
