﻿/* Styles for the floating chatbot icon */
#chatbot-icon-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000; /* Ensure it's above other content */
}

#chatbot-icon {
    background-color: #10b981; /* Green */
    border-radius: 50%;
    width: 60px; /* Larger icon */
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
    border: none; /* Remove default button border */
}

    #chatbot-icon:hover {
        transform: scale(1.05);
    }

    #chatbot-icon img {
        width: 35px; /* Adjust image size within the circle */
        height: 35px;
    }

/* Styles for the chatbot pop-up window */
#chatbot-window {
    position: fixed;
    bottom: 90px; /* Position above the icon */
    right: 20px;
    z-index: 999;
    background-color: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 380px; /* Slightly smaller width for pop-up */
    height: 500px; /* Fixed height for pop-up */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Initial state for hidden window */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95); /* Start slightly smaller and lower */
    transition: all 0.3s ease-out; /* Smooth transition for all properties */
}

/* Class to make the window hidden by default and animate its appearance */
.hidden-window {
    opacity: 0 !important; /* Use !important to ensure it overrides .visible */
    visibility: hidden !important;
    transform: translateY(20px) scale(0.95) !important;
}

/* Class to make the window visible */
#chatbot-window.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    background-color: #3b82f6; /* Blue header */
    color: white;
    padding: 1rem 1.5rem;
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.chat-title {
    font-size: 1.25rem;
}

#close-chatbot {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    #close-chatbot img {
        filter: brightness(0) invert(1); /* Makes the close icon white */
    }

.chat-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.chat-input-container {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem; /* Padding matches the original container */
    border-top: 1px solid #e2e8f0;
}

    .chat-input-container input[type="text"] {
        flex-grow: 1;
        padding: 0.75rem 1rem;
        border: 1px solid #cbd5e1;
        border-radius: 1.5rem;
        outline: none;
        transition: border-color 0.2s;
    }

        .chat-input-container input[type="text"]:focus {
            border-color: #3b82f6;
        }

    .chat-input-container button {
        background-color: #10b981;
        color: white;
        padding: 0.75rem 1rem; /* Adjusted for icon */
        border: none;
        border-radius: 1.5rem;
        cursor: pointer;
        transition: background-color 0.2s;
        font-weight: 600;
        white-space: nowrap;
        display: flex; /* For centering icon */
        align-items: center;
        justify-content: center;
    }

        .chat-input-container button:hover {
            background-color: #059669;
        }

/* Existing chat styles from the original file */
.message {
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background-color: #3b82f6;
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 0.25rem;
}

.bot-message {
    background-color: #e2e8f0;
    color: #333;
    align-self: flex-start;
    margin-right: auto;
    border-bottom-left-radius: 0.25rem;
}

.loading-indicator {
    text-align: center;
    padding: 1rem;
    color: #64748b;
    font-style: italic;
    /* Ensure it's hidden by default, can be overridden by .hidden */
    display: none;
}

/* Utility class to ensure elements are hidden */
.hidden {
    display: none !important;
}

/* Hide the original full-page chat container if it still exists from previous versions */
.chat-container {
    display: none;
}
