/* === デモ: 縦並びレイアウト === */
.demo-container {
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
}

/* 各パターンを囲むカード */
.rb-pattern {
  margin-bottom: 16px;
  padding: 20px;
  background: #F4F6F9;
  border-radius: 8px;
  max-width: 520px;
}
.rb-pattern:last-child { margin-bottom: 0; }

.rb-pattern-label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* 質問テキスト */
.rb-question {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1A2332;
}

/* ラジオボタンの選択肢グループ */
.rb-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

/* 各選択肢ラベル */
.rb-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #1A2332;
  cursor: pointer;
}
.rb-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #2B7FE8;
  cursor: pointer;
  flex-shrink: 0;
}

/* テキストボックス（パターン1） */
.rb-textbox {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  font-size: 14px;
  color: #1A2332;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
  font-family: sans-serif;
}
.rb-textbox:focus {
  border-color: #2B7FE8;
  box-shadow: 0 0 0 3px rgba(43, 127, 232, 0.12);
}
/* disabled 状態: 背景をグレーにして視覚的に無効と分かるようにする */
.rb-textbox:disabled {
  background: #E8EDF4;
  color: #9AA5B4;
  cursor: not-allowed;
}

/* 決定ボタン（パターン2） */
.rb-submit-btn {
  display: inline-block;
  padding: 9px 24px;
  background: #2B7FE8;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: sans-serif;
  transition: opacity 0.15s;
}
.rb-submit-btn:hover { opacity: 0.85; }

/* 結果表示エリア（パターン2） */
.rb-result {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
}
/* 値が入ったときにボーダーを表示 */
.rb-result.has-value {
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  color: #1A2332;
}
/* 警告メッセージ */
.rb-result.has-error {
  color: #E53935;
  font-weight: 600;
}

/* 更新日表示 */
.updated-at {
  font-size: 12px;
  color: #9AA5B4;
}

/* サンプルソースヒント */
.source-hint {
  margin: 0 0 16px;
  padding: 10px 14px;
  font-size: 13px;
  color: #5A6A7A;
  background: #F4F6F9;
  border-left: 3px solid #2B7FE8;
  border-radius: 0 6px 6px 0;
  line-height: 1.7;
}
.source-hint code {
  font-family: monospace;
  background: #E8EDF4;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

/* 複数プロンプトブロック */
.prompt-block { margin-bottom: 20px; }
.prompt-block:last-child { margin-bottom: 0; }
.prompt-block-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.04em;
}

/* プロンプト補足（注意・ヒント） */
.prompt-notes {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #F4F6F9;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
}
.prompt-note-caution {
  margin: 0 0 8px;
  color: #E65100;
}
.prompt-note-tip {
  margin: 0;
  color: #5A6A7A;
}

/* リセットボタン */
.demo-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.reset-btn {
  padding: 6px 16px;
  font-size: 13px;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s, border-color 0.15s;
}
.reset-btn:hover {
  background: #F4F6F9;
  border-color: #9AA5B4;
}

/* レスポンシブ: 600px 以下でカードを全幅に */
@media (max-width: 600px) {
  .rb-pattern { max-width: 100%; }
  .demo-container { padding: 16px; }
}
