/* public/style.css */
body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    background-color: #f4f4f4;
}

h1 {
    text-align: center;
    color: #333;
    padding: 10px;
    background-color: #e0e0e0;
    margin-top: 0;
}

#chatbox {
    flex-grow: 1; /* Takes up available space */
    overflow-y: auto; /* Allows scrolling */
    padding: 20px;
    border-bottom: 1px solid #ccc;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    margin-bottom: 10px;
    line-height: 1.4;
    word-wrap: break-word; /* Prevent long words from overflowing */
    white-space: pre-wrap; /* Respect line breaks from agent */
}

.user-message {
    background-color: #dcf8c6;
    align-self: flex-end; /* Align user messages to the right */
    border-bottom-right-radius: 0;
}

.agent-message {
    background-color: #e5e5ea;
    align-self: flex-start; /* Align agent messages to the left */
    border-bottom-left-radius: 0;
}

.error-message {
     background-color: #ffdddd;
     color: #d8000c;
     align-self: flex-start;
     border-bottom-left-radius: 0;
     font-weight: bold;
}

.loading-message {
    font-style: italic;
    color: #888;
    align-self: flex-start;
}


#input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid #ccc;
    background-color: #f0f0f0;
}

#userInput {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-right: 10px;
}

#sendButton {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#sendButton:hover {
    background-color: #0056b3;
}