#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    transition: bottom 0.3s ease, right 0.3s ease;
}

#chat-icon, #chat-icon-header {
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 50%;
}

#chat-window {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    /*width: 320px;*/
    height: 70%;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

#chat-header {
    background: #49018d;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

#close-btn {
    background: none;
    color: white;
    border: none;
    font-size: 50px;
    color: white;
    cursor: pointer;
    margin-left: auto;
}

#chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f1f1f1;
}

#chat-input {
    padding: 10px;
    background: #eee;
    display: flex;
    gap: 10px;
    border-top: 1px solid #ddd;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

#chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
}

#chat-input button {
    background: #49018d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
}

/* bot actions */
#chat-widget.chat-open {
    bottom: 100px; /* move up if chat is opened */
}

#chat-widget.chat-open #chat-icon {
    display: none; /* hide icon */
}

#chat-widget.chat-closed {
    bottom: 20px;
    right: 10px;
}

#chat-widget.chat-closed #chat-window {
    display: none; /* hide chat */
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.chat-message {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.user-message {
    justify-content: flex-end;
    text-align: right;
}

.bot-message {
    justify-content: flex-start;
    text-align: left;
}

.chat-message p {
    margin: 0;
    padding: 10px;
    border-radius: 10px;
    background-color: #350067;
    color: #000000;
    display: inline-block;
    max-width: 70%;
}

.user-message p {
    background-color: #8b8b8b;
    color: #000000
}

.bot-message p {
    background-color: #c47ffc;
}

#chat-body::-webkit-scrollbar {
    width: 5px;
}

#chat-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#chat-body::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}