#chatbot-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 15px;
    border: none;
    background-color: #1087FF;
    color: #fff;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001; /* Ensure the button is above the chatbot popup */
}

@media (min-width: 540px){
    .chatbot-popup {
        display: none;
        position: fixed;
        bottom: 90px;
        right: 20px;
        background-color: #fff;
        border-radius: 15px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        width: 400px;
        z-index: 1000;
    }

    chatbot-container {
        font-family: "Poppins", sans-serif;
        background-color: #f9f9f9;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
    }

    .chat-box {
        max-height: 350px;
        overflow-y: auto;
        padding: 15px 20px;
    }

    #close-btn {
        background-color: transparent;
        border: none;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
    }
}

@media (max-width: 540px) {
    chatbot-container {
        font-family: "Poppins", sans-serif;
        background-color: #f9f9f9;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 97vh;
    }

    .chatbot-popup {
        height: 100vh;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .chat-box {
        flex-grow: 2;
        overflow-y: auto;
        padding: 15px 20px;
    }

    #chatbot-toggle-btn {
        display: none;
    }

    #close-btn {
        display: none;
    }
}

#chatbot-toggle-btn:hover {
    background-color: #0074CC;
}

.chat-header {
    background-color: #1087FF;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-input {
    display: flex;
    align-items: center;
    padding: 10px 10px;
    border-top: 1px solid #ddd;
}

#user-input {
    min-width: 140px;
    font-family: "Poppins";
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
    outline: none;
}

.send-btn {
    font-family: "Poppins", sans-serif;
    padding: 10px 20px;
    border: none;
    background-color: #1087FF;
    color: #fff;
    border-radius: 12px;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.send-btn:hover {
    background-color: #0074CC;
}

.send-btn-disabled {
    background-color: #0074CC;
}

.user-message {
    display: flex;
    align-items: end;
    flex-direction: row-reverse;
}

.user-message div {
    min-width: 20px;
    background-color: #f3f3f3;
    color: #333;
    padding: 14px;
    border-radius: 15px;
}

.bot-message {
    margin-bottom: 10px;
    margin-top: 15px;
    align-self: flex-start;
    position: relative;
    display: flex;
    align-items: center;
}

.bot-message div {
    background-color: #1087FF;
    color: #fff;
    padding: 14px;
    border-radius: 15px;
    min-width: 50px;
}

.bot-message::before {
    content: "\1F916";
    position: absolute;
    bottom: -17px;
    left: -14px;
    margin-bottom: 4px;
    font-size: 20px;
    background-color: #1087FF;
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.button-container {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.button-container button {
    padding: 10px 50px;
    border: none;
    background-color: #1087FF;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button-container button:hover {
    background-color: #0074CC;
}

.loader {
    border: 6px solid #f3f3f3; /* Light grey */
    border-top: 6px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 2s linear infinite;
}
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

