/* System prompt editor styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 10px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.button-container {
  display: flex;
  gap: 5px;
}

#system-prompt-container {
  margin: 10px;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  background-color: #fff3e0;
  transition: all 0.3s ease;
  border: 1px solid #ccc;
}

#system-prompt-container h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.editor-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.system-prompt-textarea {
  width: 100%;
  min-height: 200px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
  resize: vertical;
}

.prompt-controls {
  display: flex;
  justify-content: flex-end;
}

#save-confirmation {
  color: #4caf50;
  font-weight: bold;
  padding: 5px;
  margin-bottom: 10px;
}

/* Ensure the message content is properly aligned */
.message.assistant {
  text-align: left;
  align-self: flex-start;
}

.message.user {
  text-align: right;
  align-self: flex-end;
}

/* Text alignment within message bubbles */
.message.assistant .message-content {
  text-align: left;
}

.message.user .message-content {
  text-align: right;
}

/* Update bubble styles to match the image */
.message {
  margin: 10px 0;
  padding: 12px;
  border-radius: 12px;
  position: relative;
  max-width: 70%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
}

.message.user {
  background-color: #4285f4; /* Google blue color */
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px; /* Speech bubble effect */
}

.message.assistant {
  background-color: #dadce0; /* Light gray for assistant */
  color: #202124; /* Dark gray text */
  margin-right: auto;
  border-bottom-left-radius: 4px; /* Speech bubble effect */
}

/* Remove message-time class as we're not using it anymore */
.message-time {
  display: none;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  #system-prompt-container {
    background-color: #2d3436;
    color: #b2bec3;
  }

  .system-prompt-textarea {
    background-color: #1e1e1e;
    color: #e4e4e4;
    border-color: #333;
  }

  #save-confirmation {
    color: #a5d6a7;
  }

  .message.assistant {
    background-color: #3c4043; /* Darker gray for dark mode */
    color: #e8eaed; /* Lighter text for dark mode */
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-controls {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-top: 10px;
  }

  .button-container {
    width: 100%;
    justify-content: space-between;
  }

  .system-prompt-textarea {
    min-height: 150px;
  }
}
