#chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    border: 1px solid #ccc;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: sans-serif;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    transition: opacity 0.3s, transform 0.3s;
    opacity: 1;
    transform: translateY(0);

    /* 👇 Fix transparency and stacking */
    background-color: #ffffff;
    backdrop-filter: none;
    z-index: 9999; /* ensures it's always on top */
}

#chat-container.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #6a0dad;  /* 👈 Rich purple tone */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#chat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(106, 13, 173, 0.6); /* 👈 Matching purple glow */
}

#chat-header {
    /*background-color: #007bff;*/
    background-color: #6a0dad; /* changed from blue to purple */
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 1.2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000; /* keep header visible even if chat overlaps */
}

#chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
}


#chat-messages {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;

    /* 👇 Ensure messages area also solid */
    background-color: #ffffff;
}

.message {
    /*margin-bottom: 10px;*/
    margin-bottom: 5px;
    /*padding: 8px 12px;*/
    padding: 2px 12px;  /* 👈 Reduced padding */
    /*border-radius: 18px;*/
    border-radius: 10px;
    max-width: 80%;
    line-height: 1.2;
    /*line-height: 1.4;*/
}

.user-message {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
}

.bot-message {
    background-color: #f1f1f1;
    color: black;
    align-self: flex-start;
}

#chat-input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;

    /* 👇 Make input area opaque */
    background-color: #ffffff;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px;
    font-size: 1em;
}

#chat-send-btn {
    /*background-color: #007bff;*/
    background-color: #6a0dad; /* changed from blue to purple */
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
}
#chat-send-btn:hover {
    background-color: #8b3ef7; /* lighter purple on hover */
}