body {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Viewport height */
    margin: 0;
}

#chat-container {
    display: flex;
    flex-direction: column; /* Stack children vertically */
    overflow-y: hidden;
    flex-grow: 1;
    flex-shrink: 1;
    background-color: #fff;
    box-sizing: border-box;
    margin-bottom: 92px;
}

#input-area {
    display: flex;
    justify-content: center; /* Center horizontally */
    flex-shrink: 0;
    align-items: flex-end; /* Align children with the bottom */
    margin-top: auto;
    margin-bottom: 2%;
    width: 100%; /* Take full width of the screen */
    position: fixed;
    bottom: 0;
    background-color: #fff;
    height: auto;
}

#messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    font-family: 'Menlo', 'Monaco', 'Courier New', 'monospace';
    font-size: 16px;
}

#messages::-webkit-scrollbar {
    display: none;
}

.message {
    padding: 10px;
    word-break: break-word;
    background-color: #fff; /* White background for messages */
    margin-left: 10px; /* Spacing from the left */
    position: relative; /* To position the avatar */
    padding-left: 50px; /* Make space for the avatar */
    display: flex;
    flex-direction: column;
    padding: 10px; /* Padding inside the message */
    max-width: 80%; /* Maximum width of a message */
    word-wrap: break-word; /* Ensure long words do not break the layout */
    margin: 4px 10px; /* Spacing between messages */
}

.user-message {
    align-self: flex-end;
    background-color: #d1e7ff;
}

.bot-message {
    align-self: flex-start;
    background-color: #ebebeb;
}

.sender-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 4px; /* Space between sender name and message text */
}

#input-wrapper {
    display: flex;
    align-items: flex-end; /* Align children to the bottom */
    gap: 16px;
    width: 100%;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}


#user-input {
    flex-grow: 1; /* Grow to take available space */
    padding: 10px;
    font-size: 16px;
    border: 2px solid #ddd;
    line-height: 1.5; /* Provides a comfortable line height for text */
    resize: none;
    white-space: pre-wrap;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    min-height: 48px; /* Minimum height to match the button */
    border-radius: 4px; /* Adds rounded corners to the input box */
    overflow: hidden;
}

#submit-btn {
    padding: 0; /* Adjust padding as needed */
    font-size: 24px; /* Adjust this value to increase the size of the arrow */
    border: 2px solid black; /* Black border */
    cursor: pointer;
    background-color: white; /* White background color */
    border-radius: 4px; /* Square with rounded corners */
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 38px; /* Fixed width */
    height: 38px; /* Fixed height to make the button square */
    align-self: end; /* Align the button to the end (bottom) of the flex container */
    margin-left: 1px; /* Add some whitespace to the left */
    margin-bottom: 5px;
}

.fa-up-long {
    pointer-events: none; /* Ensures the icon doesn't interfere with button functionality */
}

#cursor {
    font-weight: bold;
    opacity: 1;
}

@keyframes blink {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.thinking-dots {
    font-size: 24px;
    text-align: left;
    animation: blink 1s step-start 0s infinite;
}
