/* General Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Times New Roman', Times, serif;
}

body, html {
    height: 100%;
    background-color: #f1f1f1;
}

/* Chat Container */
.chat-container {
    width: 700px; /* Fixed width for desktop */
    height: 100vh; /* Full screen height */
    margin: 0 auto;
    border: 1px solid #d3d3d3;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

/* Chat Header */
.chat-header {
    background-color: #004165;
    color: #ffffff;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chat-logo {
    max-height: 100px; /* Adjust the size as needed */
}

/* Chat Box */
.chat-box {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    background-color: #f9f9f9;
}

.user-message, .server-response {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    display: block;
    max-width: 80%;
    font-size: 16px;
}

.user-message {
    background-color: #005b96;
    color: #ffffff;
    text-align: right;
    margin-left: auto; /* Right-aligned */
    border: 1px solid #004165;
}

.server-response {
    background-color: #e7e7e7;
    color: #333;
    text-align: left; /* Left-aligned */
    border: 1px solid #004165;
}

.server-response code {
    background-color: #f5f5f5;
    border-radius: 3px;
    font-size: 14px;
    color: #333;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: none;
    overflow-x: auto;
}

.server-response code[class^="language-"] {
    margin-top: 10px;
    margin-bottom: 10px;
    display: block;
    padding: 5px;
    border: 1px solid #ccc;
}

.server-response ul, .server-response ol {
    margin-top: 10px;
    margin-bottom: 10px;
    padding-left: 20px;
}

/* Message Input */
.message-input {
    padding: 10px;
    background-color: #ffffff;
    border-top: 1px solid #d3d3d3;
    display: flex;
}

.message-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 18px;
    -webkit-text-size-adjust: 100%;
}

.message-input button {
    width: 38px;
    height: 38px;
    background-color: #007acc;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    border: 1px solid #d3d3d3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 0;
}


.message-input button:hover, .message-input button:focus {
    background-color: #005b96;
    outline: none;
}

a, button, input {
    outline: 3px solid transparent;
    outline-offset: 2px;
}

a:focus, button:focus, input:focus {
    outline: 3px solid #005b96;
}

.spinner img {
    width: 38px;
    height: 34px;
}

/* Media Query for Mobile Devices */
@media (max-width: 767px) {
    .chat-container {
        width: 100%; /* Full width on mobile */
        height: 100%; /* Adjusts to use available screen height */
        margin: 0;
        border: none;
        box-shadow: none;
    }

    body, html {
        margin: 0;
        overflow: hidden; /* Prevents scrolling outside the chat container */
    }
}
