#live-chatbot-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 450px;
    height: 60vh;
    max-height: 65vh;
    background: #fff;
    /* border: 1px solid #ccc; */
    border-radius: 10px;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

    /* REMOVE: display: none; */
    display: flex;

    opacity: 0;
    transform: translateY(30px) scale(0.95);
    visibility: hidden;
    pointer-events: none;

    z-index: 1001;
    transition:
        transform 0.4s ease-in-out,
        opacity 0.4s ease-in-out,
        visibility 0.4s ease-in-out;
}

#live-chatbot-container.expanded {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
}

#live-chatbot-header {
    background: #eb7800;
    color: white;
    padding: 10px;
    text-align: left;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px 10px 0 0;
}

#live-chatbot-messages {
    flex-grow: 1;
    /* Ensures messages fill available space */
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

/* User messages - Align to right */
.user-message {
    align-self: flex-end;
    background: rgb(255 247 237);
    text-align: left;
    padding: 10px;
    margin: 5px;
    border-radius: 25px 25px 0 25px;
    max-width: 70%;
    word-wrap: break-word;
}

/* Bot messages - Align to left */
.bot-message {
    align-self: flex-start;
    background: rgb(249 249 249);
    text-align: left;
    padding: 10px;
    margin: 5px;
    border-radius: 25px 25px 25px 0;
    max-width: 70%;
    word-wrap: break-word;
}

#error-message {
    color: red;
    font-weight: bold;
}

/* Chat input area - Stays fixed at bottom */
#live-chatbot-input-area {
    display: flex;
    padding: 10px;
    background: white;
    /* border-top: 1px solid #ccc; */
    align-items: center;
    justify-content: space-between;
}

#live-chatbot-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
}

/* Send Button */
#live-chatbot-send {
    background: #eb7800;
    color: white;
    border: none;
    border-radius: 100%;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    height: 40px;
    width: 40px;
}

#live-chatbot-send:hover {
    background: #af5700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease-in-out;
}

#live-chatbot-send i {
    font-size: 20px;
}

.bot-icon {
    font-size: 24px;
    color: #fff;
}

#live-chatbot-typing-indicator {
    display: none;
    font-style: italic;
    color: gray;
    padding: 5px;
}

#live-chatbot-typing-indicator span {
    display: inline-block;
    font-size: 16px;
    animation: typing-dots 1.5s infinite;
}

#live-chatbot-typing-indicator span:nth-child(2) {
    animation-delay: 0.3s;
}

#live-chatbot-typing-indicator span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes typing-dots {
    0% {
        opacity: 0.2;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-3px);
    }

    100% {
        opacity: 0.2;
        transform: translateY(0);
    }
}

.bot-message a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.bot-message a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Tablet View */
@media (max-width: 768px) {
    #live-chatbot-container {
        width: 80%;
        /* Adjust width for tablets */
        height: 60vh;
        /* Make it 60% of the viewport height */
        right: 10px;
        /* Position slightly closer to the left */
    }
}

/* Mobile View */
@media (max-width: 480px) {
    #live-chatbot-container {
        width: 100%;
        /* Full width on mobile */
        height: 80vh;
        /* Use 80% of the screen height */
        right: 0;
        left: 0;
        bottom: 0;
        border-radius: 10px 10px 0 0;
        /* Rounded top corners */
    }
}


/* Floating button styles */
/* Floating button styles */
.floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff8000, #ff8800);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 24px;
}

.floating-button i {
    font-size: 24px;
}

/* Ensure visibility when chat is collapsed */
.collapsed+.floating-button {
    display: flex;
}

/* Hide floating button when chat is expanded */
/* .expanded+.floating-button {
    display: none;
} */

.floating-button:hover {
    background-color: #d66400;
    transform: scale(1.1);
}

/* Close Button */
#live-chatbot-close {
    background: none;
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    border-radius: 100%;
    color: white;
    font-size: 22px;
    cursor: pointer;
}


/* Chat Header Icons */
#live-chatbot-header i {
    font-size: 20px;
    margin-right: 8px;
}


/* Chat Popup Styling */
.chat-popup {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: #ffffff;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    max-width: 280px;
    display: none;
    /* Initially hidden */
    font-size: 14px;
    color: #333;
    z-index: 9999;
    animation: fadeIn 0.5s ease-in-out;
}

.chat-popup p {
    margin: 0;
    font-weight: 600;
}

#chat-popup-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    float: right;
    margin-left: 10px;
}



textarea#live-chatbot-input {
    resize: none;
    font-family: inherit;
    border: 1px solid #f2f2f2;
    height:25px;
    font-size:15px;
}

textarea#live-chatbot-input:focus-visible {
    outline: none;
    border: 1px solid #ffa600;
    box-shadow: 0 0 0 3px rgba(255, 128, 0, 0.3);
    background-color: #ffffff;
    font-family: inherit;
    transition: all 0.2s ease-in-out;
}


/* Animation for smooth popup */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}