/* =====================
  レイアウト・全体構造
  ===================== */
html,
body {
  height: 100%;
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
}

body {
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background: #484e63;
  position: relative;
}

.reset-btn {
  position: absolute;
  left: 12px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.reset-btn-text {
  font-size: 14px;
  font-weight: normal;
}

.reset-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.reset-btn:active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* =====================
  エラーメッセージ
  ===================== */
#error-message {
  display: none;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #f8d7da;
  color: #721c24;
  padding: 16px 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  font-size: 1.1em;
}

/* =====================
  サイドバー関連
  ===================== */
main.main-flex {
  display: flex;
  flex: 1;
  min-height: 0;
  background: #7993be;
}

/* --- サイドバー: ラジオボタン余白 --- */
.sidebar-radio-group input[type="radio"] {
  margin-right: 7px;
}

/* --- サイドバー: 非活性・未実装ラベル --- */
.disabled-label,
.disabled-label span {
  color: #b0b0b0;
}

/* --- サイドバー: checked属性が付与されたラベルを太字に --- */
.sidebar-radio-group label:has(input[type="radio"]:checked),
.sidebar-checkbox-group label:has(input[type="checkbox"]:checked) {
  font-weight: bold;
}

.not-implemented {
  font-size: 12px;
  color: #b0b0b0;
  margin-left: 2px;
}

.sidebar {
  width: 330px;
  background: #fff;
  border-right: 1px solid #c3d0e6;
  padding: 16px 16px 0 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 18px;
  font-weight: bold;
  color: #2a3b5d;
}

.sidebar-section-title {
  font-size: 12px;
  font-weight: bold;
  margin: 32px 0 6px 0;
  color: #666;
}

.sidebar-subsection .sidebar-section-title {
  margin: 0px 0 6px 0;
  font-weight: normal;
}

.sidebar-radio-group label {
  font-size: 15px;
  color: #2a3b5d;
  margin-bottom: 7px;
  display: block;
  cursor: pointer;
}

/* =====================
  サイドバー: オプション（チェックボックス）
  ===================== */
.sidebar-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.sidebar-checkbox-group label {
  font-size: 15px;
  color: #2a3b5d;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.sidebar-checkbox-group input[type="checkbox"] {
  margin-right: 7px;
}

/* =====================
  サイドバー追加装飾
  ===================== */
.sidebar-description {
  font-size: 13px;
  color: #4a5a6a;
  margin: 6px 0 0 0;
  line-height: 1.6;
}

.sidebar-select-group {
  width: 100%;
  margin-bottom: 10px;
}

.sidebar-select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #c3d0e6;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
  color: #2a3b5d;
  margin-top: 2px;
  margin-bottom: 2px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.sidebar-select:focus {
  border-color: #3f84ef;
  outline: none;
}

/* =====================
  メインコンテンツ（チャットエリア）
  ===================== */
.main-content {
  overflow: auto;
  width: 100%;
  background-color: #f4f7fb;
}

/* =====================
  フッター
  ===================== */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-top: 1px solid #c3d0e6;
}

a {
  text-decoration: none;
  color: #0063ff;
  font-weight: bold;
}

li {
  list-style: none;
}

.title {
  color: white;
  font-size: 24px;
}

/* =====================
  チャットバブル・会話エリア
  ===================== */
.chat-area {
  max-width: 1000px;
  margin: 0 auto;
}

.chat-block {
  margin: 20px 0;
  display: flex;
  flex-direction: column
}

.chat-bubble {
  display: flex;
  word-break: break-word;
}

.chat-bubble img {
  width: 50px;
  height: 50px;
  margin: 0 15px;
  border-radius: 25px;
  background-color: white;
  box-shadow: 4px 4px 4px 0px rgba(60, 80, 120, 0.4);
}

.chat-bubble p {
  max-width: 700px;
  padding: 10px;
  white-space: pre-line;
  border-radius: 10px;
  background: #ffffff;
  margin-right: 15px;
  box-shadow: 4px 4px 4px 0px rgba(60, 80, 120, 0.4);
  color: #2a2a2a;
}

.chat-bubble p a {
  font-size: 90%;
}

.chat-bubble p a.auto-link {
  font-weight: normal;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-bubble p a.auto-link:hover {
  opacity: 0.7;
  transform: translateY(-1px);
}

.chat-bubble p small {
  display: block;
  font-size: 90%;
}

.chat-bubble-r {
  justify-content: flex-end;
}

.chat-bubble-r p {
  margin-right: 15px;
  margin-left: 80px;
  background-color: #ffffff;
  box-shadow: 4px 4px 4px 0px rgba(60, 80, 120, 0.4);
}

.chat-bubble small i.link-copy-icon {
  position: relative;
  margin-left: 8px;
}

/* Copied! ツールチップ */
.chat-bubble small .link-copy-tooltip {
  position: absolute;
  background-color: #EEE;
  font-size: 12px;
  font-style: normal;
  color: #333;
  padding: 3px 7px 4px 7px;
  margin-left: 7px;
  border-radius: 3px;
}

.chat-feedback {
  display: flex;
  height: 25px;
  margin-bottom: 14px;
  margin-top: 6px;
}

.chat-feedback-star-rating {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 85px;
}

.chat-feedback-star-rating img {
  width: 17px;
  filter: drop-shadow(1px 1px 1px rgba(60, 80, 120, 1));
}

.chat-feedback-comment-btn {
  display: none;
  margin-left: 10px;
  text-align: center;
  color: #4444FF;
  font-size: 12px;
  font-weight: bold;
}

.chat-related-inquiries {
  margin-left: 85px;
}

.chat-related-inquiries h3 {
  color: #2a3b5d;
  margin-bottom: 5px;
}

.chat-related-inquiries ul {
  display: flex;
  flex-direction: column;
  max-width: 40%;
}

.chat-related-inquiries ul li {
  border-top: 1px solid #c3d0e6;
}

.chat-related-inquiries ul li button {
  width: 100%;
  padding: 5px;
  text-align: left;
  color: #2a3b5d;
  font-size: 14px;
  font-weight: bold;
}

.chat-related-inquiries ul li button:hover {
  color: #3f84ef;
}

/* =====================
  モーダル
  ===================== */
.modal {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.modal.is-open {
  display: flex;
  animation: modalopen 0.2s ease-in;
}

@keyframes modalopen {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-contents {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 500px;
  min-height: 180px;
  border-radius: 20px;
  background: #FFFFFF;
}

.modal-title {
  width: 100%;
  padding: 3px;
  border-radius: 20px 20px 0 0;
  margin-bottom: 5px;
  background: #007dbc;
  text-align: center;
  color: white;
  font-size: 20px;
}

.modal-text {
  width: 100%;
  padding: 0 20px;
  margin-bottom: 10px;
}

.modal-text--border {
  border-left: 3px solid #ccc;
  padding-left: 14px;
  padding-right: 20px;
  margin: 10px 0 20px 17px;
  width: calc(100% - 20px);
}

.modal-text--highlight {
  color: #d32f2f;
  text-decoration: underline;
  font-weight: bold;
}

.modal-text--alert {
  color: #d32f2f;
  font-weight: bold;
}

.modal-text--small {
  display: block;
  font-size: 0.875em;
  color: #555;
  line-height: 1.6;
  margin-top: 8px;
}

.modal-comment {
  width: 95%;
  min-height: 120px;
  padding: 5px 10px;
  margin-bottom: 10px;
  background: #F6F6F6;
  border-radius: 10px;
  color: black;
  font-size: 16px;
}

.modal-ctrl-btns {
  display: flex;
  justify-content: space-evenly;
  width: 200px;
  margin-bottom: 10px;
}

.modal-button {
  min-width: 80px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #3f84ef;
  color: white;
  font-size: 15px;
  font-weight: bold;
}

.modal-button:hover {
  background: #0056b3;
}

.modal-button--confirm {
  margin: 5px 0 15px;
  padding: 8px 15px;
}

.modal-button--cancel {
  color: #666666;
  background: #CCCCCC;
}

.modal-button--cancel:hover {
  background: #b3b3b3;
}

.inquiry-textarea {
  width: 70%;
  max-width: 600px;
  max-height: 250px;
  margin-right: 15px;
  padding: 5px 10px;
  border: 1px solid #e9e9ed;
  border-radius: 15px;
  background-color: #f6f6f6;
  resize: none;
  field-sizing: content;
}

.inquiry-send-btn {
  padding: 6px;
  border: none;
  border-radius: 5px;
  background-color: #3f84ef;
  color: white;
}

.inquiry-send-btn:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
}