/* ===== Estilos del widget ===== */
.uxbot-bubble{
    position:fixed; bottom:22px; right:22px; z-index:99998;
    width:56px; height:56px; border-radius:50%;
    background:#0a7; color:#fff; border:none; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    box-shadow:0 6px 20px rgba(0,0,0,.25);
    transition:transform .2s ease;
}
.uxbot-bubble:hover{ transform:scale(1.06); }
.uxbot-bubble-dot{
    position:absolute; top:6px; right:6px; width:10px; height:10px;
    background:#ff3b30; border-radius:50%; border:2px solid #fff;
}
.uxbot-window{
    position:fixed; bottom:88px; right:22px; z-index:99999;
    width:360px; max-width:calc(100vw - 24px);
    height:520px; max-height:calc(100vh - 120px);
    background:#fff; border-radius:14px; overflow:hidden;
    box-shadow:0 12px 40px rgba(0,0,0,.28);
    display:flex; flex-direction:column;
    font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
.uxbot-hidden{ display:none !important; }
.uxbot-header{
    background:#0a7; color:#fff; padding:10px 12px;
    display:flex; justify-content:space-between; align-items:center;
}
.uxbot-header-info strong{ display:block; font-size:14px; }
.uxbot-status{ font-size:11px; opacity:.85; }
.uxbot-header-actions{ display:flex; align-items:center; gap:6px; }
.uxbot-wa-link{
    color:#fff; display:flex; align-items:center; justify-content:center;
    width:30px; height:30px; border-radius:50%;
    background:rgba(255,255,255,.18); text-decoration:none;
}
.uxbot-wa-link:hover{ background:rgba(255,255,255,.3); }
.uxbot-close{
    background:transparent; border:none; color:#fff; font-size:22px;
    cursor:pointer; line-height:1; padding:0 4px;
}
.uxbot-messages{
    flex:1; overflow-y:auto; padding:12px; background:#f7f9fb;
    display:flex; flex-direction:column; gap:8px;
}
.uxbot-header-info{    display: flex;
    flex-direction: column;}
.uxbot-bubble-text img {
    max-width: 140px;
    max-height: 140px;
    border-radius: 8px;
    display: block;
    margin: 0;
}
.uxbot-wa-link path{fill:#FFF;}
.uxbot-msg{ display:flex; }
.uxbot-msg-user{ justify-content:flex-end; }
.uxbot-bubble-text{
    max-width:80%; padding:8px 12px; border-radius:12px;
    font-size:13.5px; line-height:1.4; word-wrap:break-word;
}
.uxbot-msg-bot .uxbot-bubble-text{ background:#fff; color:#222; border:1px solid #e3e8ee; }
.uxbot-msg-user .uxbot-bubble-text{ background:#0a7; color:#fff; }
.uxbot-msg-bot a{ color:#0a7; text-decoration:underline; }
.uxbot-form{ display:flex; border-top:1px solid #e3e8ee; background:#fff; }
.uxbot-input{
    flex:1; border:none; padding:12px; font-size:14px; outline:none;
}
.uxbot-send{
    background:#0a7; color:#fff; border:none; padding:0 16px; cursor:pointer;
}
.uxbot-send:disabled{ opacity:.5; cursor:not-allowed; }
.uxbot-footer{
    border-top:1px solid #e3e8ee; padding:8px 12px; text-align:center;
    background:#fff;display: flex;
}
.uxbot-wa-footer{
    font-size:12px; color:#0a7; text-decoration:none;
}
.uxbot-wa-footer:hover{ text-decoration:underline; }
.uxbot-typing .uxbot-bubble-text::after{
    content:'…'; animation:uxbotDots 1.2s steps(4,end) infinite;
}
@keyframes uxbotDots{ 0%{content:'';} 25%{content:'.';} 50%{content:'..';} 75%{content:'...';} }
@media (max-width:420px){
    .uxbot-window{ width:100vw; height:100vh; bottom:0; right:0; border-radius:0; }
}