:root {
    --primary-color: #2c3e50;
    --secondary-color: #ecf0f1;
    --accent-color: #3498db;
    --text-color: #333333;
    --light-gray: #bdc3c7;
}

.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10001;
}

.chatbot-toggle:hover {
    background-color: #34495e;
    transform: translateY(-2px);
}

.chatbot-toggle::before {
    content: '\1F4AC';
    font-size: 20px;
}

.chat-window {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 10001;
}

.chat-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-chat:hover {
    transform: rotate(90deg);
}

.chat-history {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

#send-button {
    background-color: #2c3e50; /* Warna biru tua, sesuaikan dengan header */
    color: white;
    border: none;
    border-radius: 5px; /* Sudut sedikit membulat */
    padding: 10px 15px; /* Padding atas-bawah dan kiri-kanan */
    margin-left: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#send-button:hover {
    background-color: #34495e; /* Warna sedikit lebih terang saat hover */
}

.chat-input {
    display: flex;
    align-items: center; /* Menyejajarkan input dan tombol */
    padding: 10px;
    background-color: #f5f5f5;
}

#user-input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    font-size: 14px;
}

#send-button::before {
    content: '\27A4';
    font-size: 20px;
}

.user-message, .bot-message {
    max-width: 80%;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.user-message {
    background-color: #3498db; /* Warna biru untuk pesan pengguna */
    color: white;
    align-self: flex-end;
    margin-left: auto;
    margin-right: 10px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    display: inline-block; /* Mengubah dari block ke inline-block */
}

.bot-message {
    background-color: #f1f1f1; /* Warna abu-abu muda untuk pesan bot */
    color: #333;
    align-self: flex-start;
    margin-right: auto;
    margin-left: 10px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-history {
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow-y: auto;
}

.typing-indicator {
    display: inline-block;
    width: 50px;
    height: 20px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    float: left;
    margin: 0 1px;
    background-color: var(--light-gray);
    display: block;
    border-radius: 50%;
    opacity: 0.4;
    animation: blink 1s infinite;
}

.typing-indicator span:nth-of-type(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-of-type(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    50% {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .chat-window {
        width: 90%;
        right: 5%;
        left: 5%;
    }
}