.chat-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 10px;
    font: inherit;
    color: inherit;
  	font-weight: 500;
    border: 1.5px solid var(--ast-border-color);
    border-radius: 6px;
    height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    margin: 8px 0;
    padding: 10px;
    border-radius: 6px;
    max-width: 100%;
    width: fit-content;    /* Breite passt sich dem Inhalt an */
    word-wrap: break-word;
    white-space: pre-wrap; /* Zeilenumbruch auch bei Leerzeichen */
    box-sizing: border-box;
}

.message.user {
    background: #f0f4f8;
    align-self: flex-end;  /* Rechtsbündig */
}

.message.assistant {
  	background: #e1f0ff;
    align-self: flex-start; /* Linksbündig */
}

.message.loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--ast-border-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chatsprecher {
  font-weight: bold;
}

.chat-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
}

.chat-form textarea,
.chat-form select {
  padding: 10px;
  border: 1.5px solid var(--ast-border-color);
  border-radius: 6px;
  font: inherit;
  background: #ffffff;
  color: inherit;
  resize: none;
}

.chat-form textarea:hover,
.chat-form select:hover {
  box-shadow: 0 0 0 1px rgba(0, 32, 96, 0.2);
}

.chat-form textarea:focus,
.chat-form select:focus {
  box-shadow: 0 0 0 4px rgba(0, 32, 96, 0.2);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;         /* Abstand zwischen Label und Eingabe */
}

.chat-form textarea::placeholder {
  color: #888;
  opacity: 1;
}

.chat-form select option[disabled] {
  color: #888;
}

.chat-form select:invalid {
  color: #888;
}

.chat-form select option:not([disabled]) {
  color: #002060;
}

.checkbox-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75em;
  align-items: center;
}

.checkbox-column {
   transform: scale(1.25);
}

.text-column {
  font-size: 0.8em;
  line-height: 1.0;
}

.button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px; /* Abstand zwischen den Buttons */
}

.button-wrapper button {
  margin-top: 6px;
  max-width: 100%;
  width: 100%;
  height: 2.5em;
}

#alter {
  width: fit-content;      
  max-width: 100%;
}

#neuer-chat-button {
  background-color: #002060;
}

#neuer-chat-button:hover {
  background-color: #ED7D31;
}