.logo {
    width: 50px;
    background-color: #21ABE11A;
    /* border: 0.4px solid #333333; */
    border-radius: 50%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Dulling effect */
    z-index: 999;
    /* Ensure it's behind the chatbot but above other elements */
}

#chatbot-overlay {
    position: fixed;
    z-index: 9999;
    bottom: 30px;
    right: 0%;
    border-radius: 16px;
    width: 400px;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.header-container {
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chat-container {
    background-color: #FFFFFF;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background-color: #FFFFFF;
    color: #333333;
    text-align: center;
    font-weight: 400;
    font-size: 24px;
}

.chat-body {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: white;
}

.chat-sub-body {
    height: 64vh;
    max-height: 70vh;
    border-radius: 16px;
    padding: 12px 16px;
    overflow-y: auto;
    scrollbar-width: none;
    /* For Firefox */
    -ms-overflow-style: none;
    /* For IE and Edge */
    scroll-behavior: smooth;
    /* Smooth scroll */
}

.chat-message {
    display: flex;
    flex-direction: column;
    margin: 8px 0px;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.bot {
    align-items: flex-start;
}

.chat-message .message-bubble {
    max-width: 360px;
    width: max-content;
    padding: 8px;
    border-radius: 16px;
    font-family: Montserrat;
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
}

.user-message {
    font-family: Montserrat;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    margin: 0px;
}

.res-message {
    font-family: Montserrat;
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
    margin: 0px;
    margin-top: 6px;
}

.chat-message.user .message-bubble {
    background-color: #21ABE1;
    color: #FFFFFF;
    border-bottom-right-radius: 4px;
}

.chat-message.bot .message-bubble {
    background-color: rgba(200, 200, 200, 0.35);
    color: black;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-footer {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-top: 0px;
    background-color: white;
}

.chat-footer input {
    flex: 1;
    border: 1px solid #757575 !important;
    border-radius: 40px !important;
    padding: 10px 12px !important;
    font-size: 14px;
    font-family: Montserrat;
}

.chat-footer input:focus {
    border: 1px solid black !important;
}

.chat-footer button {
    background-color: #21ABE1;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-family: Montserrat;
}

.chat-footer button img {
    width: 20px;
}

.close-btn {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: end;
}

.close-in {
    width: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: end;
}

.chat-date-header {
    text-align: center;
    color: #888;
    font-family: Montserrat;
    font-size: 12px;
    font-weight: 600;
}

.message-time {
    font-family: Montserrat;
    font-size: 10px;
    font-weight: 500;
    color: #888;
    padding-left: 8px;
}

.chat-date-container {
    display: flex;
    align-items: center;
    margin: 0px;
}

.chat-date-line {
    flex: 1;
    border: none;
    border-top: 1px solid #ccc;
    margin: 0px;
    padding: 0px;
}

.chat-sub-body::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar in Chrome/Safari */
}

/* Responsive adjustments */

@media (max-width: 1280px) {
    .chat-sub-body {
        height: 64vh;
    }
}

@media (max-width: 768px) {
    #chatbot-overlay {
        width: 100%;
    }

    .chat-sub-body {
        height: 55vh;
    }

    .chat-footer {
        flex-wrap: wrap;
        padding: 8px 12px;
    }

    .chat-footer input {
        flex: 1;
        margin-bottom: 8px;
    }

    .close-btn {
        justify-content: flex-end;
        padding: 8px 12px;
    }
}

@media (min-width: 320px) and (max-width: 480px) {
    #chatbot-overlay {
        width: 100%;
        height: 100%;
        max-width: 100%;
        top: 0px;
        border-radius: 0px;
    }

    .chat-container {
        height: 100%;
    }

    .chat-message .message-bubble {
        max-width: 320px;
    }

    .chat-sub-body {
        height: 72vh;
        max-height: 100%;
    }

    .chat-footer {
        padding: 12px;
    }

    .chat-footer input {
        font-size: 14px;
    }

    .chat-footer button {
        font-size: 14px;
        width: 36px;
        height: 36px;
    }

    .close-btn {
        padding: 8px 12px;
    }
}

/* Dots Animation Using CSS */
.dots-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    height: 20px;
}

.dots-loading span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #333333;
    /* Default color for the dots */
    animation: dotColorChange 1.5s infinite ease-in-out;
}

.dots-loading span:nth-child(1) {
    animation-delay: 0s;
}

.dots-loading span:nth-child(2) {
    animation-delay: 0.3s;
}

.dots-loading span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes dotColorChange {

    0%,
    80%,
    100% {
        transform: scale(1);
        background-color: #333333;
        /* Default */
    }

    40% {
        transform: scale(1.5);
        background-color: #21ABE1;
        /* Active */
    }
}