/* チャット画面用の配色。一般的なチャットボットに寄せた白基調＋青アクセント。
   ウィジェット（iframe）埋め込みを想定し、タイトルは非表示・入力欄は最下部に固定。
   管理画面(admin.html)には読み込ませないので影響しない。 */
html, body { height: 100%; margin: 0; background: #fff; }

main {
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
}

#chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  margin-bottom: 0;
}

.msg { max-width: 82%; }

.msg.user {
  background: #2f7bf6;
  color: #fff;
  border-radius: 16px 16px 4px 16px;
}

.msg.assistant {
  background: #fff;
  color: #222;
  border: 1px solid #e2e4ea;
  border-radius: 16px 16px 16px 4px;
  padding-left: 42px;
  position: relative;
}
.msg.assistant::before {
  content: "AI";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: #2f7bf6;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.msg.assistant.pending { color: #999; }

.sources { color: #888; }
.sources span { background: #eef1f7; color: #555; }

#chat-form {
  flex-shrink: 0;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #e2e4ea;
}
#question {
  background: #f5f6f8;
  color: #222;
  border: 1px solid #dcdfe6;
}
#question::placeholder { color: #999; }

button { background: #2f7bf6; color: #fff; }
button:disabled { background: #b7c3d9; color: #fff; }

#disclaimer {
  flex-shrink: 0;
  margin: 0;
  padding: 4px 12px 10px;
  background: #fff;
  color: #999;
  font-size: 10px;
}
