/* Basic styling for the main widget container */
.my-virtual-assistant-container {
    font-family: 'Inter', sans-serif; /* Using Inter font for a modern look */
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px; /* Rounded corners for the container */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 15px;
    max-width: 350px; /* Max width for the widget */
    margin: 20px auto; /* Center the widget if placed in a full-width area */
    display: flex;
    flex-direction: column;
    height: auto; /* Adjust height based on content */
    min-height: 250px; /* Minimum height for the chat box */
}

/* Chatbox styling */
.my-virtual-assistant-chat-box {
    flex-grow: 1; /* Allows chatbox to take available space */
    border: 1px solid #f0f0f0;
    border-radius: 8px; /* Rounded corners */
    padding: 10px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    overflow-y: auto; /* Enable scrolling for chat history */
    max-height: 300px; /* Max height for scrollable area */
    min-height: 150px; /* Minimum height to ensure visibility */
}

/* Styling for HTML links within the assistant's messages */
.my-virtual-assistant-message a {
    color: #007bff; /* Keep the link color consistent with the button */
    text-decoration: underline; /* Add the underline as requested */
}

/* Individual message styling */
.my-virtual-assistant-message {
    padding: 8px 12px;
    border-radius: 18px; /* Pill-shaped messages */
    margin-bottom: 8px;
    max-width: 85%; /* Limit message width */
    word-wrap: break-word; /* Break long words */
    line-height: 1.4;
    font-size: 0.95em;
}

/* User message styling */
.my-virtual-assistant-message.user-message {
    background-color: #e6f7ff; /* Light blue for user messages */
    color: #333;
    align-self: flex-end; /* Align to the right */
    margin-left: auto; /* Push to the right */
    border-bottom-right-radius: 4px; /* Slightly less rounded on one corner */
}

/* Assistant message styling */
.my-virtual-assistant-message.assistant-message {
    background-color: #f0f0f0; /* Light gray for assistant messages */
    color: #333;
    align-self: flex-start; /* Align to the left */
    margin-right: auto; /* Push to the left */
    border-bottom-left-radius: 4px; /* Slightly less rounded on one corner */
}

/* Form styling */
.my-virtual-assistant-form {
    display: flex;
    gap: 10px; /* Space between input and button */
}

/* Input field styling */
.my-virtual-assistant-form input[type="text"] {
    flex-grow: 1; /* Allows input to take available space */
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 8px; /* Rounded corners */
    font-size: 1em;
    outline: none; /* Remove outline on focus */
    transition: border-color 0.3s ease;
}

.my-virtual-assistant-form input[type="text"]:focus {
    border-color: #007bff; /* Highlight on focus */
}

/* Button styling */
.my-virtual-assistant-form button {
    padding: 10px 18px;
    background-color: #007bff; /* Blue background */
    color: white;
    border: none;
    border-radius: 8px; /* Rounded corners */
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2); /* Subtle shadow */
}

.my-virtual-assistant-form button:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-1px); /* Slight lift effect */
}

.my-virtual-assistant-form button:active {
    transform: translateY(0); /* Press effect */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Loading indicator styling */
.my-virtual-assistant-loading,
.my-virtual-assistant-error {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.my-virtual-assistant-error {
    color: #dc3545; /* Red for errors */
    font-weight: bold;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .my-virtual-assistant-container {
        padding: 10px;
        margin: 10px auto;
        max-width: 95%; /* Adjust max-width for smaller screens */
    }

    .my-virtual-assistant-form {
        flex-direction: column; /* Stack input and button on small screens */
        gap: 8px;
    }

    .my-virtual-assistant-form button {
        width: 100%; /* Full width button */
    }
}
