@charset "utf-8";

/* ベース設定 */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', sans-serif;
  background-color: #F2F4F7;
}

/* チャット全体コンテナ */
.chat-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100vh;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background-color: #F2F4F7;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 0px;
  overflow: hidden;
}

/* ヘッダー */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1C2D5A;
  color: #fff;
  width: 100%;
  padding: 1em;
  box-sizing: border-box;
}

.chat-header h1, .chat-title {
  font-size: 1.1em;
  margin: 0;
}

.close-button {
  background: none;
  border: none;
  font-size: 1.2em;
  color: #fff;
  cursor: pointer;
}

/* チャット表示エリア */
#chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 1em;
  display: flex;
  flex-direction: column;
  gap: 1em;
  width: 100%;
  box-sizing: border-box;
  background-color: #F2F4F7;
}

/* 入力欄（最新版） */
.chat-input-area {
  padding: 0.5em 1em 1em;
  border-top: 1px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  position: sticky;
  bottom: 0;
  z-index: 2;
  gap: 0.5em;
}

.chat-input-area input[type="text"] {
  flex: 1;
  padding: 0.6em 1em;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 0px 0 0 0px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  outline: none;
}

.chat-input-area button {
  background-color: #4a4a4a;
  color: white;
  border: none;
  border-radius: 0 0px 0px 0;
  padding: 0.6em 1.2em;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.chat-input-area button:hover {
  background-color: #696a6a;
}
.chat-disclaimer {
  font-size: 12px;
  color: #666666;
  margin-top: 6px;
  padding: 0 10px;
  line-height: 1.4;
  text-align: left;
  background-color: #F2F4F7;
}

/* メッセージ共通 */
.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.chat-message.left {
  align-self: flex-start;
  width: 80%;
}

.chat-message.right {
  align-self: flex-end;
  width: 80%;
}

/* ラベル（ユーザー / サポート） */
.label {
  font-size: 0.75em;
  color: #888;
  margin-bottom: 0.2em;
}

/* 吹き出し共通 */
.bubble {
  padding: 10px 15px;
  border-radius: 0px;
  display: inline-block;
  font-size: 1.05em;
  line-height: 1.6em;
  white-space: pre-wrap;
  word-wrap: break-word;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  box-sizing: border-box;
  width: 100%;
}

/* ユーザー吹き出し */
.bubble.user {
  background-color: #eef3f7;
  color: #333333;
  border-radius: 0;
  max-width: 100%;
  animation: fadeIn 0.4s ease;
}

/* サポート吹き出し */
.bubble.support {
  background-color: #fcfcfc;
  color: #333333;
  border: 1px solid #eee;
  width: 100%;
  padding: 12px 16px;
  border-radius: 0px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  align-self: flex-end;
  text-align: left;
  direction: ltr;
  white-space: pre-wrap;
  word-wrap: break-word;
  box-sizing: border-box;
}

.bubble.support a {
  color: #0066cc;       /* 濃い青 */
  text-decoration: underline;
  font-weight: bold;
}

/* アニメーション */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pop {
  0%   { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* スピナー */
.spinner-icon {
  margin: 0 auto;
  width: 24px;
  height: 24px;
  border: 3px solid #ccc;
  border-top: 3px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* フィードバックボタン */
.feedback-btn {
  background: linear-gradient(135deg, #f7f7f7, #e6e6e6);
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.9em;
  color: #444;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.feedback-btn:hover {
  background: #ffffff;
  color: #222;
  border-color: #aaa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}
/* チャットボックス内の段落の上下余白を調整 */
.bubble.support p {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}

/* 最後の段落（定型文など）だけ間隔を詰める */
.bubble.support p:last-of-type {
  margin-top: 0.2em;
}
#send-button {
  background-color: #1C2D5A;  /* 背景色 */
  color: #FFFFFF;             /* 文字色 */
  border: none;               /* 境界線なし */
  padding: 0.5em 1em;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#send-button:hover {
  background-color: #5C7EC9; /* ホバー時の濃い色 */
}
