/* CSS Color Theme */
:root {
    --primary-color: #FFCC00;
    --primary-gradient-color: #FFAF00;
    --secondary-color: #0078DA;
    --secondary-gradient-color: #00B4FF;
    --text-color: #001836;
    --user-bg-color: #E5E5E5; /* Light gray for user messages */
    --agent-bg-color: linear-gradient(to right, var(--secondary-color), var(--secondary-gradient-color)); /* Blue gradient for agent messages */
    --message-text-color: #fff; /* White text for messages */
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

.container {
    display: flex;
    justify-content: space-between;
    max-width: 100%;
    padding: 20px;
}

.chat-container {
    width: 80%;
    max-width: 500px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 90vh; /* Changed the height to 90vh */
    margin: 20px;
}

.chat-header {
    background: linear-gradient(to right, var(--primary-color), var(--primary-gradient-color));
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 24px;
}

.chat-body {
    flex-grow: 1;
    padding: 10px;
    overflow-y: scroll;
    display: flex;
    flex-direction: column; /* Ensure chat bubbles are stacked vertically */
    gap: 10px; /* Add space between chat bubbles */
}

.message-container {
    display: flex;
    justify-content: flex-end; /* Right-align user's message container */
}

.user-message {
    background: linear-gradient(to right, var(--primary-color), var(--primary-gradient-color));
    color: var(--message-text-color);
    border-radius: 10px;
    padding: 10px;
    max-width: 70%; /* Adjust the maximum width of messages */
    text-align: right; /* Right-align text within the user's message */
    margin-left: auto; /* Push user's chat bubble to the right */
}

.agent-message-container {
    display: flex;
    justify-content: flex-start; /* Left-align agent's message container */
}

.agent-message {
    background: var(--agent-bg-color); /* Blue gradient for agent's chat bubble */
    color: var(--message-text-color);
    border-radius: 10px;
    padding: 10px;
    max-width: 70%; /* Adjust the maximum width of messages */
    text-align: left; /* Left-align text within the agent's message */
    margin-right: auto; /* Push agent's chat bubble to the left */
}

.chat-input {
    display: flex;
    flex-direction: column; /* Stack input and button vertically */
    padding: 10px;
    background-color: #f2f2f2;
}

input[type="text"] {
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    flex-grow: 1;
    margin-bottom: 10px;
}

#send-button {
    background: var(--agent-bg-color); /* Blue gradient similar to agent chat bubble */
    color: var(--message-text-color);
    border: none;
    border-radius: 4px;
    padding: 12px 20px; /* Increased height and padding */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.full-width {
    width: 100%; /* Make the button expand to the width of the chatbox */
}

/* Add styles for error messages */
.error-message {
    color: red;
    font-weight: bold;
    margin-bottom: 5px;
}
