.chat-btn-floating {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #D47A10;
    /* Warna Orange Khas */
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chat-btn-floating:hover {
    transform: scale(1.1);
    background-color: #b56205; 
}

/* Jendela Popup Chat */
.chat-popup {
    display: none;
    /* Default sembunyi */
    position: fixed;
    bottom: 150px;
    right: 30px;
    width: 380px;
    height: 500px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    overflow: hidden;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Chat */
.chat-header {
    background-color: #970101;
    /* Warna Gelap Header */
    color: white;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chat-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.chat-header .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    /* background: none; */
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
}

/* Area Pesan (Body) */
.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

/* Input Area */
.chat-input-area {
    padding: 10px;
    border-top: 1px solid #ddd;
    background: #fff;
    display: flex;
}

.chat-input-area input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
}

/* Bubble Chat Styles */
.msg {
    display: flex;
    align-items: flex-end;
    margin-bottom: 15px;
}

.msg-img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    background-color: #ddd;
    background-size: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Gambar Avatar Dummy */
.img-ai {
    /* background-image: url('https://cdn-icons-png.flaticon.com/512/4712/4712035.png'); */
    background-image: url('../img/img-ai.png');
}

.img-user {
    /* background-image: url('https://cdn-icons-png.flaticon.com/512/9131/9131529.png'); */
    background-image: url('../img/img-user.png');
}

.msg-bubble {
    max-width: 80%;
    padding: 12px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Pesan Kiri (AI) */
.left-msg .msg-bubble {
    background-color: #D47A10;
    color: white;
    border-bottom-left-radius: 0;
}

/* Pesan Kanan (User) */
.right-msg {
    flex-direction: row-reverse;
}

.right-msg .msg-img {
    margin-right: 0;
    margin-left: 10px;
}

.right-msg .msg-bubble {
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-bottom-right-radius: 0;
}

/* Animasi Mengetik (Typing Dots) */
.typing {
    display: flex;
    align-items: center;
    height: 20px;
}

.typing .dot {
    height: 7px;
    width: 7px;
    background-color: #fff;
    border-radius: 50%;
    display: inline-block;
    margin-right: 3px;
    animation: typingAnimation 1.5s infinite ease-in-out;
}

.typing .dot:nth-child(1) {
    animation-delay: 200ms;
}

.typing .dot:nth-child(2) {
    animation-delay: 300ms;
}

.typing .dot:nth-child(3) {
    animation-delay: 400ms;
}

@keyframes typingAnimation {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Responsif untuk Mobile */
@media (max-width: 480px) {
    .chat-popup {
        width: 90%;
        right: 5%;
        bottom: 90px;
    }
}