.bw-ai{
    position:fixed;
    right:18px;
    bottom:18px;
    z-index:99999;
    font-family:Arial,sans-serif
}

.bw-ai-fab{
    border:0;
    border-radius:999px;
    background:#2563eb;
    color:#fff;
    padding:13px 18px;
    box-shadow:0 10px 30px #0004;
    font-weight:700;
    cursor:pointer;
    font-size:16px
}

.bw-ai-fab span{
    margin-left:7px
}

.bw-ai-panel{
    display:none;
    position:absolute;
    right:0;
    bottom:62px;
    width:min(380px,calc(100vw - 28px));
    height:560px;
    max-height:75vh;
    background:#fff;
    color:#172033;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 20px 60px #0005;
    border:1px solid #e5e7eb
}

.bw-ai-panel.open{
    display:flex;
    flex-direction:column
}

.bw-ai-panel header{
    background:#111827;
    color:#fff;
    padding:14px 16px;
    display:flex;
    justify-content:space-between;
    align-items:center
}

.bw-ai-panel header small{
    display:block;
    color:#cbd5e1;
    margin-top:3px
}

.bw-ai-close{
    background:transparent;
    border:0;
    color:#fff;
    font-size:27px;
    cursor:pointer
}

.bw-ai-body{
    flex:1;
    overflow:auto;
    padding:14px;
    background:#f8fafc
}

.bw-msg{
    max-width:88%;
    padding:10px 12px;
    border-radius:14px;
    margin:0 0 10px;
    line-height:1.45;
    white-space:pre-wrap;
    font-size:14px;
    word-break:break-word
}

.bw-msg.bot{
    background:#fff;
    border:1px solid #e5e7eb
}

.bw-msg.user{
    background:#2563eb;
    color:#fff;
    margin-left:auto
}

.bw-msg.wait{
    opacity:.65
}

.bw-quick{
    display:flex;
    gap:7px;
    flex-wrap:wrap;
    margin-bottom:12px
}

.bw-quick button{
    border:1px solid #bfdbfe;
    background:#eff6ff;
    color:#1d4ed8;
    border-radius:999px;
    padding:7px 9px;
    cursor:pointer;
    font-size:12px
}

.bw-ai-form{
    display:flex;
    gap:8px;
    padding:11px;
    background:#fff;
    border-top:1px solid #e5e7eb;
    position:relative
}

/*
|--------------------------------------------------------------------------
| INPUT CHAT
|--------------------------------------------------------------------------
*/

.bw-ai-form .bw-ai-input{
    flex:1;
    min-width:0;
    border:1px solid #cbd5e1;
    border-radius:12px;
    padding:11px;
    outline:none;
    font-size:14px
}

.bw-ai-form .bw-ai-input:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 2px #2563eb22
}

/*
|--------------------------------------------------------------------------
| HONEYPOT ANTI BOT
|--------------------------------------------------------------------------
|
| Jangan gunakan display:none karena beberapa bot mengabaikan
| field yang benar-benar disembunyikan.
|
*/

.bw-ai-honeypot{
    position:absolute !important;
    left:-99999px !important;
    top:-99999px !important;
    width:1px !important;
    height:1px !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    opacity:0 !important;
    pointer-events:none !important
}

/*
|--------------------------------------------------------------------------
| BUTTON KIRIM
|--------------------------------------------------------------------------
*/

.bw-ai-form button{
    border:0;
    border-radius:12px;
    background:#2563eb;
    color:#fff;
    padding:0 14px;
    font-weight:700;
    cursor:pointer
}

.bw-ai-form button:disabled{
    opacity:.55;
    cursor:not-allowed
}

/*
|--------------------------------------------------------------------------
| MOBILE
|--------------------------------------------------------------------------
*/

@media(max-width:600px){

    .bw-ai{
        right:10px;
        bottom:12px
    }

    .bw-ai-panel{
        position:fixed;
        left:8px;
        right:8px;
        bottom:76px;
        width:auto;
        height:70vh
    }

    .bw-ai-fab span{
        display:none
    }

    .bw-ai-fab{
        width:52px;
        height:52px;
        padding:0;
        font-size:22px
    }

    .bw-msg{
        font-size:14px;
        max-width:92%
    }
}