File size: 2,185 Bytes
801abfd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
body {
font-family: sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
display: flex;
flex-direction: column;
min-height: 100vh;
}
header {
background-color: #007bff;
color: white;
padding: 10px 20px;
text-align: center;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
header h1 {
margin: 0;
font-size: 1.5em;
}
.chat-container {
flex-grow: 1;
display: flex;
flex-direction: column;
max-width: 800px;
margin: 20px auto;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
overflow: hidden;
}
.chatbox {
flex-grow: 1;
padding: 20px;
overflow-y: auto;
max-height: 60vh; /* Adjust as needed */
display: flex;
flex-direction: column;
}
.message {
margin-bottom: 15px;
padding: 10px 15px;
border-radius: 5px;
max-width: 80%;
word-wrap: break-word; /* Ensure long words wrap */
}
.user-message {
align-self: flex-end;
background-color: #dcf8c6;
color: #333;
}
.assistant-message {
align-self: flex-start;
background-color: #e9e9eb;
color: #333;
}
.input-area {
display: flex;
padding: 15px 20px;
border-top: 1px solid #eee;
gap: 10px; /* Space between input and buttons */
}
.input-area input[type="text"] {
flex-grow: 1;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1em;
}
.input-area button {
padding: 10px 15px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 1em;
transition: background-color 0.2s ease;
}
.input-area button:hover {
background-color: #0056b3;
}
.input-area button:disabled {
background-color: #cccccc;
cursor: not-allowed;
}
footer {
margin-top: auto; /* Push footer to the bottom */
background-color: #333;
color: white;
text-align: center;
padding: 10px 20px;
font-size: 0.9em;
}
footer p {
margin: 0;
}
/* Optional: Styling for loading indicator */
.loading-indicator {
font-style: italic;
color: #888;
align-self: flex-start;
margin-left: 10px;
} |