/* styles.css */

/* Basic styling for the body */
body {
  font-family: sans-serif;
  margin: 0;
  background-color: #f0f0f0;
}

/* Container for the chat interface */
#chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid #ccc;
  background-color: #fff;
}

/* Container for chat messages */
#chat-messages {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Form for sending messages */
#chat-form {
  display: flex;
  padding: 1rem;
  border-top: 1px solid #ccc;
}

#message-input {
  flex-grow: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#chat-form button {
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  background-color: #007bff;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

/* Styling for the web component */
chat-message p {
  margin: 0.5rem 0;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  max-width: 70%;
}

/* Style for sent messages */
chat-message[sent] p {
  background-color: #007bff;
  color: #fff;
  align-self: flex-end; /* Align to the right */
  border-bottom-right-radius: 0;
}

/* Style for received messages */
chat-message:not([sent]) p {
  background-color: #e5e5ea;
  color: #000;
  align-self: flex-start; /* Align to the left */
  border-bottom-left-radius: 0;
}
