#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-bubble {
    width: 60px;
    height: 60px;
    background-color: #1FA700;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
    border-radius: 50%;
    float: right;
}

.chat-bubble:hover {
    background-color: #25FF35;
}

.chat-icon {
    width: 30px !important;
    height: 30px !important;
    filter: invert(1);
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 375px;
    height: 525px;
    background-color: #FFFFFF;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-radius: 20px;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .chat-window {
        right: 0px; /* Removes margin on small screens */
        max-width: 375px;
        max-height: 525px;
        max-width: 100%;
    }
}

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

.chat-header {
    background-color: #1FA700;
    color: #fff;
    padding: 15px;
    display: flex;
    align-items: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.closebtn {
    position: relative;
    top: -12px;
    right: 4px;
    color: black;
    font-size: 26px;
    cursor: pointer;
}

.closebtn:hover {
    color: lightgrey;
}

.popup {
    background-color: #F7F7F7;
    margin-bottom: 5px;
    margin-right: 30px;
    max-width: 100%;
    padding: 15px 0px 1px 15px !important;
    line-height: 0.8;
    font-size: 16px;
    position: relative;
    border-radius: 15px;
    border-bottom-right-radius: 0;
    text-align: center;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #F7F7F7;
    display: flex;
    flex-direction: column;
}

.chat-input {
    display: flex;
    padding: 15px;
    background-color: #FFFFFF;
    border-top: 1px solid #E5E5E5;
}

#user-input {
    flex-grow: 1;
    border: 1px solid #E5E5E5;
    padding: 10px 15px;
    margin-right: 10px;
    font-size: 14px;
    border-radius: 20px;
}

#send-message {
    background-color: #1FA700;
    color: #FFFFFF;
    border: none;
    width: auto;
    height: auto;
    max-height: 40px;
    max-width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 50%;
}

#send-message:hover {
    background-color: #25FF35;
}

.send-icon {
    width: auto !important;
    height: auto !important;
    max-width: 25px;
    max-height: 25px;
    padding-top: 2px;
    padding-right: 2px;
}

.message {
    display: inline-block;
    margin-bottom: 15px;
    max-width: 95%;
    padding: 10px 15px;
    line-height: 1.4;
    font-size: 14px;
    position: relative;
    border-radius: 18px;
    clear: both;
    word-wrap: break-word;
}

.user-message {
    background-color: #1FA700;
    color: #FFFFFF;
    align-self: flex-end;
    float: right;
    border-bottom-right-radius: 0;
}

.bot-message {
    background-color: #E5E5E5;
    color: #333333;
    align-self: flex-start;
    float: left;
    border-bottom-left-radius: 0;
}


.typing-indicator {
    display: inline-flex;
    padding: 8px;
    background-color: #E5E5E5;
    border-radius: 18px;
    border-bottom-left-radius: 0;
    align-self: flex-start;
    margin-bottom: 15px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: #1FA700;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1s infinite ease-in-out;
}


.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.powered-by {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 5px;
    background-color: #F7F7F7;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    margin-right: 10px;
}

.message a {
    color: #0066cc;
    text-decoration: underline;
}

.message a:hover {
    text-decoration: none;
}
