
.chatbot-widget {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 5px 20px #0003;
}

.chat-window {
    display: none;
    position: absolute;
    right: 0;
    bottom: 75px;
    width: 350px;
    height: 480px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 35px #0003;
    overflow: hidden;
    flex-direction: column;
}

.chat-window.active {
    display: flex;
}

.chat-header {
    background: #142d50;
    color: white;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
}

.chat-header span {
    font-size: 12px;
    color: #86efac;
}

.chat-header button {
    background: none;
    border: none;
    color: white;
    font-size: 25px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 85%;
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ai-message {
    background: #f1f5f9;
    color: #1e293b;
    align-self: flex-start;
}

.user-message {
    background: #2563eb;
    color: white;
    align-self: flex-end;
}

.chat-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    gap: 8px;
}

.chat-input-area input {
    flex: 1;
    min-width: 0;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 14px;
    outline: none;
}

.chat-input-area button {
    width: 40px;
    border: none;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    cursor: pointer;
}

.chat-input-area button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .chatbot-widget {
        right: 15px;
        bottom: 15px;
    }

    .chat-window {
        position: fixed;
        width: calc(100vw - 30px);
        height: min(480px, 70vh);
        right: 15px;
        bottom: 85px;
    }
}

/* Percakapan yang sedang aktif */
.conversation-item {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 6px;

    text-align: left;
    color: #334155;
    background: transparent;

    border: none;
    border-radius: 8px;

    cursor: pointer;
    transition: 0.2s ease;
}

/* Efek ketika mouse diarahkan */
.conversation-item:hover {
    background: #e2e8f0;
}

/* Percakapan yang dipilih */
.conversation-item.active {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
    border-left: 4px solid #2563eb;
}