.assistant-widget{
    position:fixed;
    right:18px;
    bottom:18px;
    z-index:2600;
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.landing-body.has-whatsapp-float .assistant-widget{
    right:22px;
    bottom:22px;
}

.landing-body.has-whatsapp-float .whatsapp-float{
    right:22px;
    bottom:84px;
}

.landing-body.has-whatsapp-float .assistant-panel{
    bottom:128px;
    height:min(610px,calc(100vh - 170px));
}

.assistant-toggle{
    min-width:118px;
    min-height:46px;
    border:1px solid rgba(15,23,42,.12);
    background:#0f172a;
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    padding:0 14px;
    font-weight:900;
    box-shadow:0 16px 44px rgba(15,23,42,.22);
}

.assistant-toggle:hover,
.assistant-toggle:focus{
    background:#1e40af;
    outline:none;
}

.assistant-panel{
    position:absolute;
    right:0;
    bottom:58px;
    width:min(392px,calc(100vw - 32px));
    height:min(610px,calc(100vh - 92px));
    background:#fff;
    border:1px solid rgba(15,23,42,.12);
    box-shadow:0 26px 76px rgba(15,23,42,.24);
    display:none;
    grid-template-rows:auto minmax(0,1fr) auto auto;
    overflow:hidden;
}

.assistant-widget.is-open .assistant-panel{
    display:grid;
}

.assistant-panel-head{
    min-height:64px;
    background:linear-gradient(135deg,#0f172a,#1e3a8a);
    color:#fff;
    padding:14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.assistant-panel-head strong,
.assistant-panel-head span{
    display:block;
}

.assistant-panel-head strong{
    font-size:1rem;
    font-weight:950;
}

.assistant-panel-head span{
    color:#cbd5e1;
    font-size:.78rem;
    font-weight:800;
    margin-top:2px;
}

.assistant-panel-head button{
    width:34px;
    height:34px;
    border:1px solid rgba(255,255,255,.22);
    background:rgba(255,255,255,.08);
    color:#fff;
    font-size:1.3rem;
    line-height:1;
}

.assistant-messages{
    padding:14px;
    overflow:auto;
    background:#f8fafc;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.assistant-message{
    max-width:88%;
    padding:10px 12px;
    border:1px solid rgba(15,23,42,.08);
    background:#fff;
    color:#0f172a;
    font-size:.92rem;
    line-height:1.45;
    white-space:pre-wrap;
    word-break:break-word;
}

.assistant-message-user{
    align-self:flex-end;
    background:#1e40af;
    color:#fff;
    border-color:#1e40af;
}

.assistant-message-bot{
    align-self:flex-start;
}

.assistant-message-error{
    border-color:#fecaca;
    background:#fef2f2;
    color:#991b1b;
}

.assistant-starters{
    padding:10px 12px 0;
    display:flex;
    gap:7px;
    flex-wrap:wrap;
    border-top:1px solid rgba(15,23,42,.08);
    background:#fff;
}

.assistant-starters button{
    border:1px solid #dbeafe;
    background:#eff6ff;
    color:#1e40af;
    padding:7px 9px;
    font-size:.78rem;
    font-weight:850;
}

.assistant-starters button:hover{
    background:#dbeafe;
}

.assistant-form{
    padding:12px;
    display:grid;
    grid-template-columns:minmax(0,1fr) 82px;
    gap:8px;
    background:#fff;
}

.assistant-form textarea{
    width:100%;
    min-height:48px;
    max-height:120px;
    resize:vertical;
    border:1px solid #d8e0ec;
    padding:9px 10px;
    color:#0f172a;
    font-size:.9rem;
    outline:none;
}

.assistant-form textarea:focus{
    border-color:#1e40af;
    box-shadow:0 0 0 3px rgba(30,64,175,.11);
}

.assistant-form button{
    border:1px solid #1e40af;
    background:#1e40af;
    color:#fff;
    font-weight:900;
}

.assistant-form button:disabled{
    opacity:.7;
    cursor:wait;
}

@media(max-width:575.98px){
    .assistant-widget{
        right:10px;
        bottom:10px;
        left:10px;
    }

    .landing-body.has-whatsapp-float .assistant-widget{
        right:10px;
        bottom:10px;
    }

    .landing-body.has-whatsapp-float .whatsapp-float{
        right:18px;
        bottom:76px;
    }

    .assistant-toggle{
        width:100%;
    }

    .assistant-panel{
        right:0;
        left:0;
        width:100%;
        height:min(610px,calc(100vh - 78px));
    }

    .landing-body.has-whatsapp-float .assistant-panel{
        bottom:128px;
        height:min(520px,calc(100vh - 148px));
    }
}
