/* Basic Reset & Font */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  height: 100vh;
}

/* Main App Layout */
.app-container {
  width: 100%;
  max-width: 700px;
  height: 90vh;
  max-height: 800px;
  background-color: #1e1e1e;
  border-radius: 8px;
  -webkit-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
          box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  overflow: hidden;
}

header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #333;
  text-align: center;
  -ms-flex-negative: 0;
      flex-shrink: 0;
}
header h1 {
  margin: 0;
  font-size: 1.5rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  gap: 0.5rem;
}
header p {
  margin: 0.25rem 0 0;
  color: #888;
  font-size: 0.9rem;
}
header .header-logo {
  height: 1.75rem;
  width: auto;
}

/* Chat Area */
.chat-container {
  -webkit-box-flex: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 1rem;
  /* Scrollbar styling for a better look */
}
.chat-container::-webkit-scrollbar {
  width: 8px;
}
.chat-container::-webkit-scrollbar-track {
  background: #1e1e1e;
}
.chat-container::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 4px;
}

/* Individual Messages */
.message {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  line-height: 1.4;
  word-wrap: break-word;
}

.user-message {
  background-color: #3a3a3a;
  color: #e0e0e0;
  -ms-flex-item-align: end;
      align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.grog-message {
  background-color: #004d40;
  color: #e0f2f1;
  -ms-flex-item-align: start;
      align-self: flex-start;
  border-bottom-left-radius: 4px;
  /* Special styling for messages containing an image */
}
.grog-message.thinking {
  color: #80cbc4;
  font-style: italic;
}
.grog-message.has-image {
  background-color: transparent;
  padding: 0;
  max-width: 300px; /* Or whatever max size you prefer for images */
}

.grog-image {
  max-width: 100%;
  border-radius: 12px;
  display: block; /* Prevents extra space below the image */
}

/* Form at the bottom */
footer {
  padding: 1rem;
  border-top: 1px solid #333;
  background-color: #1e1e1e;
  -ms-flex-negative: 0;
      flex-shrink: 0;
}

.prompt-form {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 0.5rem;
  -webkit-box-align: end;
      -ms-flex-align: end;
          align-items: flex-end;
}
.prompt-form button {
  background-color: #00796b;
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  cursor: pointer;
  -webkit-transition: background-color 0.2s;
  transition: background-color 0.2s;
  -ms-flex-negative: 0;
      flex-shrink: 0;
}
.prompt-form button:hover:not(:disabled) {
  background-color: #004d40;
}
.prompt-form button :disabled {
  background-color: #444;
  cursor: not-allowed;
}

#prompt-input {
  -webkit-box-flex: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
  background-color: #2a2a2a;
  border: 1px solid #444;
  border-radius: 18px;
  padding: 0.75rem 1rem;
  color: #e0e0e0;
  font-family: inherit;
  font-size: 1rem;
  resize: none;
  line-height: 1.4;
  max-height: 150px;
  overflow-y: auto;
}
#prompt-input:focus {
  outline: none;
  border-color: #00796b;
}