/* _content/com.gudang2go.UI.Ai/AILLMWidget.razor.rz.scp.css */
.ai-chat-fab[b-cwb3my98pe] {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--rz-primary);
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(99,102,241,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease;
    color: #fff;
}

    .ai-chat-fab:hover[b-cwb3my98pe] {
        transform: scale(1.08);
        box-shadow: 0 10px 32px rgba(99,102,241,.65);
    }

    .ai-chat-fab .badge[b-cwb3my98pe] {
        position: absolute;
        top: -4px;
        right: -4px;
        background: #ef4444;
        color: #fff;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
    }

/* ── Popup ── */
.ai-chat-popup[b-cwb3my98pe] {
    position: fixed;
    bottom: 100px;
    right: 28px;
    z-index: 9998;
    width: 380px;
    max-height: 560px;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: #0f0f1a;
    box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(99,102,241,.25);
    animation: popIn .25s cubic-bezier(.34,1.56,.64,1) both;
}

@@keyframes popIn {
    from[b-cwb3my98pe] {
        opacity: 0;
        transform: scale(.85) translateY(16px);
    }

    to[b-cwb3my98pe] {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header */
.ai-chat-header[b-cwb3my98pe] {
    background: var(--rz-primary);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

    .ai-chat-header .avatar[b-cwb3my98pe] {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: rgba(255,255,255,.2);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }

    .ai-chat-header .info h4[b-cwb3my98pe] {
        margin: 0;
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        font-family: 'Sora', sans-serif;
    }

    .ai-chat-header .info span[b-cwb3my98pe] {
        color: rgba(255,255,255,.75);
        font-size: 12px;
        display: flex;
        align-items: center;
        gap: 5px;
    }

        .ai-chat-header .info span[b-cwb3my98pe]::before {
            content: '';
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #4ade80;
            display: inline-block;
        }

    .ai-chat-header .close-btn[b-cwb3my98pe] {
        margin-left: auto;
        background: rgba(255,255,255,.15);
        border: none;
        border-radius: 8px;
        width: 32px;
        height: 32px;
        color: #fff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background .15s;
    }

        .ai-chat-header .close-btn:hover[b-cwb3my98pe] {
            background: rgba(255,255,255,.3);
        }

/* Messages */
.ai-chat-messages[b-cwb3my98pe] {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #ffff;
    min-height: 300px;
}

    .ai-chat-messages[b-cwb3my98pe]::-webkit-scrollbar {
        width: 4px;
    }

    .ai-chat-messages[b-cwb3my98pe]::-webkit-scrollbar-thumb {
        background: rgba(99,102,241,.4);
        border-radius: 4px;
    }

.msg[b-cwb3my98pe] {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    gap: 4px;
}

    .msg.user[b-cwb3my98pe] {
        align-self: flex-end;
        align-items: flex-end;
    }

    .msg.assistant[b-cwb3my98pe] {
        align-self: flex-start;
        align-items: flex-start;
    }

    .msg .bubble[b-cwb3my98pe] {
        padding: 10px 14px;
        border-radius: 16px;
        font-size: 14px;
        line-height: 1.55;
        font-family: 'Inter', sans-serif;
        word-break: break-word;
    }

    .msg.user .bubble[b-cwb3my98pe] {
        background: var(--rz-secondary);
        color: #fff;
        border-bottom-right-radius: 4px;
    }

    .msg.assistant .bubble[b-cwb3my98pe] {
        background: var(--rz-primary);
        color: #e2e8f0;
        border-bottom-left-radius: 4px;
        border: 1px solid rgba(99,102,241,.2);
    }

    .msg .timestamp[b-cwb3my98pe] {
        font-size: 10px;
        color: #4a4a6a;
    }

/* Typing indicator */
.typing-indicator[b-cwb3my98pe] {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    background: #1e1e30;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(99,102,241,.2);
    width: fit-content;
}

    .typing-indicator span[b-cwb3my98pe] {
        width: 7px;
        height: 7px;
        background: #6366f1;
        border-radius: 50%;
        animation: bounce .9s infinite;
    }

        .typing-indicator span:nth-child(2)[b-cwb3my98pe] {
            animation-delay: .15s;
        }

        .typing-indicator span:nth-child(3)[b-cwb3my98pe] {
            animation-delay: .3s;
        }

@@keyframes bounce {
    0%[b-cwb3my98pe], 60%[b-cwb3my98pe], 100%[b-cwb3my98pe] {
        transform: translateY(0);
    }

    30%[b-cwb3my98pe] {
        transform: translateY(-7px);
    }
}

/* Input area */
.ai-chat-input-area[b-cwb3my98pe] {
    padding: 14px 16px;
    background: #fff;
    border-top: 1px solid rgba(99,102,241,.15);
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

    .ai-chat-input-area textarea[b-cwb3my98pe] {
        flex: 1;
        background: var(--rz-base);
        border: 1px solid rgba(99,102,241,.25);
        border-radius: 12px;
        padding: 10px 14px;
        color: #000;
        font-size: 14px;
        font-family: 'Inter', sans-serif;
        resize: none;
        outline: none;
        max-height: 100px;
        line-height: 1.5;
        transition: border-color .2s;
    }

        .ai-chat-input-area textarea:focus[b-cwb3my98pe] {
            border-color: #6366f1;
        }

        .ai-chat-input-area textarea[b-cwb3my98pe]::placeholder {
            color: #4a4a6a;
        }

.send-btn[b-cwb3my98pe] {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--rz-primary);
    border: none;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s, opacity .15s;
    flex-shrink: 0;
}

    .send-btn:hover:not(:disabled)[b-cwb3my98pe] {
        transform: scale(1.07);
    }

    .send-btn:disabled[b-cwb3my98pe] {
        opacity: .45;
        cursor: not-allowed;
    }

@@media (max-width: 480px) {
    .ai-chat-popup[b-cwb3my98pe] {
        width: calc(100vw - 32px);
        right: 16px;
    }
}
