/* chat */
#chat {
    margin: 0px;
    padding: 0px;
    border: none;
}

#chat-window {
    width: 100%;
    height: 600px;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 400px;
    border-radius: 10px;
}

#messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    gap: 10px; /* This handles spacing between messages */
}

/* This rule is no longer needed because of the 'gap' property above. */
/*
#messages div {
    margin-bottom: 10px;
}
*/

.message {
    background-color: #f0f0f0;
    padding: 8px 15px; /* Adjusted vertical padding for better balance */
    border-radius: 20px;
    max-width: 70%;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.message p {
    margin: 0;
}

.message.user {
    background-color: #007AFF;
    color: white;
    margin-left: auto;
}

.message.assistant {
    background-color: #f0f0f0;
    color: #333;
    margin-right: auto;
}

#chat-user-input-container {
    display: flex;
    gap: 10px;
    padding: 10px;
    align-items: center;
}

#chat-user-input {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: calc(100% - 120px);
    margin-right: 10px;
}

#chat-user-input::placeholder {
    font-size: 0.875em;
}

.status-line {
    font-size: 12px;
    opacity: 0.8;
    font-style: italic;
}
