/* Eingebetteter Flugdaten-Chat (Startseite + Routenseiten) */
.db-chat {
  max-width: 680px;
  width: 100%;
  margin: 28px auto 0;
  text-align: left;
}

.results .db-chat {
  max-width: 1100px;
  margin: 20px auto 12px;
  padding: 0 4px;
}

.db-chat-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-page .db-chat-title {
  color: var(--home-muted, #5c6478);
}

.db-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding: 4px 0;
}

.db-chat-thread[hidden] {
  display: none !important;
}

.db-chat-msg {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.db-chat-msg.user {
  align-items: flex-end;
}

.db-chat-bubble {
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.45;
}

.db-chat-msg.user .db-chat-bubble {
  background: #eef3ff;
  border: 1px solid #c8d4f5;
  max-width: 90%;
  color: #1a1f2e;
}

.db-chat-msg.bot .db-chat-bubble {
  background: #fff;
  border: 1px solid #e2e6ef;
  color: #1a1f2e;
}

.db-chat-msg.bot .db-chat-bubble.error {
  border-color: #e57373;
  color: #c62828;
  background: #fff5f5;
}

.db-chat-bubble a {
  color: #1a56db;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.db-chat-details {
  background: #fff;
  border: 1px solid #e2e6ef;
  border-radius: 8px;
  margin-top: 0.25rem;
}

.db-chat-details > summary {
  cursor: pointer;
  padding: 0.45rem 0.65rem;
  color: #666;
  font-size: 0.8rem;
}

.db-chat-details pre {
  margin: 0;
  padding: 0 0.65rem 0.65rem;
  overflow-x: auto;
  font: 0.76rem/1.45 ui-monospace, Menlo, monospace;
  color: #003663;
}

.db-chat-tablewrap {
  overflow-x: auto;
  border: 1px solid #e2e6ef;
  border-radius: 8px;
  margin-top: 0.25rem;
  max-height: 200px;
  background: #fff;
}

.db-chat-tablewrap table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8rem;
}

.db-chat-tablewrap th,
.db-chat-tablewrap td {
  padding: 0.35rem 0.55rem;
  border-bottom: 1px solid #e2e6ef;
  text-align: left;
  white-space: nowrap;
}

.db-chat-inputrow {
  display: flex;
  gap: 0.55rem;
  align-items: flex-end;
}

.db-chat-inputrow textarea {
  flex: 1;
  resize: none;
  background: #fff;
  border: 1px solid #e2e6ef;
  color: #1a1f2e;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  min-height: 2.6rem;
  max-height: 8rem;
}

.db-chat-inputrow textarea:focus {
  outline: none;
  border-color: #c8d4f5;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.db-chat-send {
  background: #1a56db;
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 0 1rem;
  min-height: 2.6rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.db-chat-send:disabled {
  opacity: 0.5;
  cursor: default;
}

.db-chat-hint {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: #888;
  text-align: center;
}

.db-chat-typing {
  color: #888;
}
