/* styles.css - 介護支援ボット 最適化版 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%;
  font-family: "Noto Sans JP", sans-serif;
  background-color: #f5f5f5;
}

/* ヘッダー */
#chat-header {
  background-color: #007bff;
  color: #fff;
  text-align: center;
  padding: 12px 0;
  font-size: 1.5rem;
}

/* チャット画面 */
#chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background-color: #fff;
  margin: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
  max-height: 40vh;
}
.message {
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  line-height: 1.4;
}
.message.caregiver {
  background-color: #e0f7fa;
  color: #006064;
  align-self: flex-end;
}
.message.caree {
  background-color: #fff3e0;
  color: #e65100;
  align-self: flex-start;
}

/* 入力パネル */
.input-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px;
  background-color: #fff;
  border-top: 1px solid #ddd;
}
.role-label.caregiver {
  color: #007bff;
  font-weight: bold;
  margin-right: 8px;
}
.role-label.caree {
  color: #28a745;
  font-weight: bold;
  margin-right: 8px;
}
.input-panel input {
  flex: 1;
  min-width: 120px;
  padding: 8px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin: 4px 8px 4px 0;
}
.input-panel button {
  width: 40px;
  height: 40px;
  font-size: 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin: 4px 8px 4px 0;
}
.input-panel button:hover {
  background-color: #0056b3;
}

/* テンプレート切り替えUI */
.template-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 16px 0;
}
.template-buttons button {
  font-size: 1.2rem; /* 大きめ */
  padding: 12px 20px;
  margin: 6px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
}

/* カテゴリー選択ボタン */
.template-buttons.category button {
  background-color: #6c757d;
  color: white;
  font-weight: bold;
}

/* 介護士テンプレート */
.template-buttons.caregiver button {
  background-color: #007bff;
  color: white;
  font-weight: bold;
}

/* 被介護者テンプレート */
.template-buttons.caree button {
  background-color: #ff9800;
  color: white;
  font-weight: bold;
}

/* その他機能のUI */
.tts-panel, #glossary, #translation-panel, .action-buttons {
  display: flex;
  align-items: center;
  padding: 8px;
  background-color: #fff;
  border-top: 1px solid #ddd;
  gap: 8px;
}
.tts-panel label, #translation-panel select {
  margin-right: 8px;
}
#glossary input, #translation-panel select {
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
#glossary button, #translation-panel button, .action-buttons button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
#glossary button {
  background-color: #17a2b8;
  color: #fff;
}
#glossary button:hover {
  background-color: #138496;
}
#translation-panel button {
  background-color: #6c757d;
  color: #fff;
}
#translation-panel button:hover {
  background-color: #5a6268;
}
.action-buttons button {
  background-color: #343a40;
  color: #fff;
}
.action-buttons button:hover {
  background-color: #23272b;
}

/* モバイル対応 */
@media only screen and (max-width: 600px) {
  #chat-header {
    font-size: 1.25rem;
    padding: 10px 0;
  }
  #chat-window {
    margin: 4px;
    padding: 8px;
    max-height: 30vh;
  }
  .input-panel, .tts-panel, #glossary, #translation-panel, .action-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .input-panel input, .input-panel button, .template-start {
    width: 100%;
    margin: 4px 0;
  }
}

/* タイトル */
.chat-title {
  text-align: center !important;
  font-size: 2rem;
  font-weight: bold;
  color: #007bff;
  margin: 1rem 0;
}

/* === テンプレート開始ボタンの強調 === */
#template-start-btn {
  background-color: #28a745;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 1rem 2rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: block;
  margin: 1rem auto;
  width: 60%;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#template-start-btn:hover {
  background-color: #218838;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  #template-start-btn {
    width: 90%;
    font-size: 1.2rem;
    padding: 0.8rem 1rem;
  }
}

/* === テンプレートボタン === */
.template-btn {
  background-color: #007bff;
  color: white;
  font-size: 1.2rem;
  padding: 0.8rem 1.2rem;
  margin: 0.4rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.template-btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .template-btn {
    width: 45%;
    font-size: 1rem;
    padding: 1rem;
  }
}

/* === スマホ対応 === */
@media (max-width: 768px) {
  #template-start-btn {
    width: 90%;         /* スマホでは横幅いっぱいに近く */
    font-size: 1.2rem;  /* 少し小さめ文字で調整 */
    padding: 0.8rem 1rem;
  }
}


